RT notifier: parse templates without header correctly
[openxpki.git] / trunk / package / suse / external-dependencies / Class-Observable.spec
blob8807782857e186234d94d041efd3d49f3e0adeee
2 # - Class::Observable -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=1.04 '--author=Chris Winters' Class-Observable-1.04.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Class-Observable
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-Class-Observable
15 summary: Class-Observable - Allow any number of items to respond to changes in your class/object
16 version: 1.04
17 release: 1
18 vendor: Chris Winters
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-Observable-1.04.tar.gz
28 %description
29 If you have ever used Java, you may have run across the
30 "java.util.Observable" class and the "java.util.Observer"
31 interface. With them you can decouple an object from the one or more
32 objects that wish to be notified whenever particular events occur.
34 These events occur based on a contract with the observed item. They
35 may occur at the beginning, in the middle or end of a method. In
36 addition, the object knows that it is being observed. It just does
37 not know how many or what types of objects are doing the observing. It
38 can therefore control when the messages get sent to the obsevers.
40 The behavior of the observers is up to you. However, be aware that we
41 do not do any error handling from calls to the observers. If an
42 observer throws a "die", it will bubble up to the observed item and
43 require handling there. So be careful.
45 Throughout this documentation we refer to an 'observed item' or
46 'observable item'. This ambiguity refers to the fact that both a class
47 and an object can be observed. The behavior when notifying observers
48 is identical. The only difference comes in which observers are
49 notified. (See "Observable Classes and Objects" for more
50 information.)
53 # This package was generated automatically with the cpan2rpm
54 # utility. To get this software or for more information
55 # please visit: http://perl.arix.com/
58 %prep
59 %setup -q -n %{pkgname}-%{version}
60 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
62 %build
63 grep -rsl '^#!.*perl' . |
64 grep -v '.bak$' |xargs --no-run-if-empty \
65 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
66 CFLAGS="$RPM_OPT_FLAGS"
67 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
68 %{__make}
69 %if %maketest
70 %{__make} test
71 %endif
73 %install
74 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
76 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
78 cmd=/usr/share/spec-helper/compress_files
79 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
80 [ -x $cmd ] && $cmd
82 # SuSE Linux
83 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
84 then
85 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
86 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
87 | %{__sed} -e s+%{buildroot}++g \
88 > %{buildroot}/var/adm/perl-modules/%{name}
91 # remove special files
92 find %{buildroot} -name "perllocal.pod" \
93 -o -name ".packlist" \
94 -o -name "*.bs" \
95 |xargs -i rm -f {}
97 # no empty directories
98 find %{buildroot}%{_prefix} \
99 -type d -depth \
100 -exec rmdir {} \; 2>/dev/null
102 %{__perl} -MFile::Find -le '
103 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
104 print "%doc Changes README";
105 for my $x (sort @dirs, @files) {
106 push @ret, $x unless indirs($x);
108 print join "\n", sort @ret;
110 sub wanted {
111 return if /auto$/;
113 local $_ = $File::Find::name;
114 my $f = $_; s|^\Q%{buildroot}\E||;
115 return unless length;
116 return $files[@files] = $_ if -f $f;
118 $d = $_;
119 /\Q$d\E/ && return for reverse sort @INC;
120 $d =~ /\Q$_\E/ && return
121 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
123 $dirs[@dirs] = $_;
126 sub indirs {
127 my $x = shift;
128 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
130 ' > %filelist
132 [ -z %filelist ] && {
133 echo "ERROR: empty %files listing"
134 exit -1
137 %clean
138 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
140 %files -f %filelist
141 %defattr(-,root,root)
143 %changelog
144 * Thu Nov 23 2006 root@dca02
145 - Initial build.