3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=1.03 '--author=Andy Wardley' Class-Singleton-1.03.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Class
-Singleton
10 %define filelist
%{pkgname}-%{version}-filelist
11 %define NVR
%{pkgname}-%{version}-%{release}
14 name
: perl
-Class
-Singleton
15 summary
: Class
-Singleton
- Implementation of a "Singleton" class
19 packager
: Arix International
<cpan2rpm@arix.com
>
21 group
: Applications
/CPAN
22 url
: http
://www.cpan.org
23 buildroot
: %{_tmppath}/%{name}-%{version}-%
(id
-u
-n
)
25 prefix
: %
(echo %{_prefix})
26 source: Class
-Singleton
-1.03.tar.gz
29 This is the Class
::Singleton module. A Singleton describes an object class
30 that can have only one instance
in any system. An example of a Singleton
31 might be a print spooler or system registry. This module implements a
32 Singleton class from which other classes can be derived. By itself
, the
33 Class
::Singleton module does very little other than manage the instantiation
34 of a single object. In deriving a class from Class
::Singleton
, your module
35 will inherit the Singleton instantiation method and can implement whatever
36 specific functionality is required.
38 For a description and discussion of the Singleton class
, see
39 "Design Patterns"
, Gamma et al
, Addison
-Wesley
, 1995, ISBN
0-201-63361-2.
42 # This package was generated automatically with the cpan2rpm
43 # utility. To get this software or for more information
44 # please visit: http://perl.arix.com/
48 %setup -q
-n
%{pkgname}-%{version}
49 chmod
-R u
+w
%{_builddir}/%{pkgname}-%{version}
52 grep
-rsl '^
#!.*perl' . |
53 grep
-v '.bak$' |xargs
--no
-run
-if-empty \
54 %__perl -MExtUtils
::MakeMaker
-e 'MY
->fixin
(@ARGV
)'
55 CFLAGS
="$RPM_OPT_FLAGS"
56 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}|
if \$ExtUtils
::MakeMaker
::VERSION
=~
/5\
.9[1-6]|
6\
.0[0-5]/ '`
63 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
65 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
67 cmd
=/usr
/share
/spec
-helper
/compress_files
68 [ -x $cmd
] || cmd
=/usr
/lib
/rpm
/brp
-compress
72 if [ -e
/etc
/SuSE
-release
-o
-e
/etc
/UnitedLinux
-release
]
74 %{__mkdir_p} %{buildroot}/var
/adm
/perl
-modules
75 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
76 |
%{__sed} -e s+%{buildroot}++g \
77 > %{buildroot}/var/adm/perl-modules/%{name}
80 # remove special files
81 find
%{buildroot} -name "perllocal.pod" \
82 -o
-name ".packlist" \
86 # no empty directories
87 find
%{buildroot}%{_prefix} \
89 -exec rmdir {} \
; 2>/dev
/null
91 %{__perl} -MFile
::Find
-le '
92 find
({ wanted
=> \
&wanted
, no_chdir
=> 1}, "
%{buildroot}"
);
93 print "
%doc Changes README"
;
94 for my $x
(sort @
dirs, @files
) {
95 push @ret
, $x unless indirs
($x
);
97 print join "\n"
, sort @ret
;
102 local $_
= $File
::Find
::name
;
103 my $f
= $_
; s|^\Q
%{buildroot}\E||
;
104 return unless length
;
105 return $files
[@files
] = $_
if -f $f
;
108 /\Q$d\E
/ && return for reverse sort @INC
;
109 $d
=~
/\Q$_\E
/ && return
110 for qw|
/etc
%_prefix/man
%_prefix/bin
%_prefix/share|
;
117 $x
=~
/^\Q$_\E\
// && $x ne $_
&& return 1 for @
dirs;
121 [ -z
%filelist ] && {
122 echo "ERROR
: empty
%files listing"
127 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
130 %defattr(-,root
,root
)
133 * Thu Nov
23 2006 root@dca02