RT notifier: parse templates without header correctly
[openxpki.git] / trunk / package / suse / external-dependencies / Class-Data-Inheritable.spec
blob5ffa32f5161d2182cc7380f99b534655969204bd
2 # - Class::Data::Inheritable -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=0.06 '--author=Tony Bowden' Class-Data-Inheritable-0.06.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Class-Data-Inheritable
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-Class-Data-Inheritable
15 summary: Class-Data-Inheritable - Inheritable, overridable class data
16 version: 0.06
17 release: 1
18 vendor: Tony Bowden
19 packager: Arix International <cpan2rpm@arix.com>
20 license: Artistic
21 group: Applications/CPAN
22 url: http://www.cpan.org
23 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
24 buildarch: noarch
25 prefix: %(echo %{_prefix})
26 source: Class-Data-Inheritable-0.06.tar.gz
28 %description
29 Class::Data::Inheritable is for creating accessor/mutators to class
30 data. That is, if you want to store something about your class as a
31 whole (instead of about a single object). This data is then inherited
32 by your subclasses and can be overriden.
34 For example:
36 Pere::Ubu->mk_classdata('Suitcase');
38 will generate the method Suitcase() in the class Pere::Ubu.
40 This new method can be used to get and set a piece of class data.
42 Pere::Ubu->Suitcase('Red');
43 $suitcase = Pere::Ubu->Suitcase;
45 The interesting part happens when a class inherits from Pere::Ubu:
47 package Raygun;
48 use base qw(Pere::Ubu);
50 # Raygun's suitcase is Red.
51 $suitcase = Raygun->Suitcase;
53 Raygun inherits its Suitcase class data from Pere::Ubu.
55 Inheritance of class data works analogous to method inheritance. As
56 long as Raygun does not "override" its inherited class data (by using
57 Suitcase() to set a new value) it will continue to use whatever is set
58 in Pere::Ubu and inherit further changes:
60 # Both Raygun's and Pere::Ubu's suitcases are now Blue
61 Pere::Ubu->Suitcase('Blue');
63 However, should Raygun decide to set its own Suitcase() it has now
64 "overridden" Pere::Ubu and is on its own, just like if it had
65 overriden a method:
67 # Raygun has an orange suitcase, Pere::Ubu's is still Blue.
68 Raygun->Suitcase('Orange');
70 Now that Raygun has overridden Pere::Ubu futher changes by Pere::Ubu
71 no longer effect Raygun.
73 # Raygun still has an orange suitcase, but Pere::Ubu is using Samsonite.
74 Pere::Ubu->Suitcase('Samsonite');
77 # This package was generated automatically with the cpan2rpm
78 # utility. To get this software or for more information
79 # please visit: http://perl.arix.com/
82 %prep
83 %setup -q -n %{pkgname}-%{version}
84 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
86 %build
87 grep -rsl '^#!.*perl' . |
88 grep -v '.bak$' |xargs --no-run-if-empty \
89 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
90 CFLAGS="$RPM_OPT_FLAGS"
91 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
92 %{__make}
93 %if %maketest
94 %{__make} test
95 %endif
97 %install
98 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
100 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
102 cmd=/usr/share/spec-helper/compress_files
103 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
104 [ -x $cmd ] && $cmd
106 # SuSE Linux
107 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
108 then
109 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
110 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
111 | %{__sed} -e s+%{buildroot}++g \
112 > %{buildroot}/var/adm/perl-modules/%{name}
115 # remove special files
116 find %{buildroot} -name "perllocal.pod" \
117 -o -name ".packlist" \
118 -o -name "*.bs" \
119 |xargs -i rm -f {}
121 # no empty directories
122 find %{buildroot}%{_prefix} \
123 -type d -depth \
124 -exec rmdir {} \; 2>/dev/null
126 %{__perl} -MFile::Find -le '
127 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
128 print "%doc doc Changes README";
129 for my $x (sort @dirs, @files) {
130 push @ret, $x unless indirs($x);
132 print join "\n", sort @ret;
134 sub wanted {
135 return if /auto$/;
137 local $_ = $File::Find::name;
138 my $f = $_; s|^\Q%{buildroot}\E||;
139 return unless length;
140 return $files[@files] = $_ if -f $f;
142 $d = $_;
143 /\Q$d\E/ && return for reverse sort @INC;
144 $d =~ /\Q$_\E/ && return
145 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
147 $dirs[@dirs] = $_;
150 sub indirs {
151 my $x = shift;
152 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
154 ' > %filelist
156 [ -z %filelist ] && {
157 echo "ERROR: empty %files listing"
158 exit -1
161 %clean
162 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
164 %files -f %filelist
165 %defattr(-,root,root)
167 %changelog
168 * Thu Nov 23 2006 root@dca02
169 - Initial build.