/[smeserver]/rpms/perl-Unix-ConfigFile/sme8/Unix-ConfigFile.spec
ViewVC logotype

Annotation of /rpms/perl-Unix-ConfigFile/sme8/Unix-ConfigFile.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Sun Mar 30 20:55:57 2008 UTC (16 years, 7 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Packages maintained upstream

1 slords 1.1 #
2     # - Unix::ConfigFile -
3     # This spec file was automatically generated by cpan2rpm [ver: 2.026]
4     # The following arguments were used:
5     # --release 2 Unix::PasswdFile
6     # For more information on cpan2rpm please visit: http://perl.arix.com/
7     #
8     %define pkgname Unix-ConfigFile
9     %define filelist %{pkgname}-%{version}-filelist
10     %define NVR %{pkgname}-%{version}-%{release}
11     %define maketest 1
12    
13     name: perl-Unix-ConfigFile
14     summary: Unix-ConfigFile - Perl interface to various Unix configuration files
15     version: 0.06
16     release: 3%{?dist}
17     license: Artistic
18     group: Applications/CPAN
19     url: http://www.cpan.org
20     buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
21     buildarch: noarch
22     prefix: %(echo %{_prefix})
23     source: http://search.cpan.org/dist/S/SS/SSNODGRA/Unix-ConfigFile-0.06.tar.gz
24    
25     %description
26     The Unix::ConfigFile module provides a base class from which the other
27     Unix::*File modules are derived. It provides some basic facilities like file
28     opening, locking, and closing. You do not need to use this module directly
29     unless you are developing a derived module for an unsupported configuration
30     file. However, some of the methods documented here are intended for public
31     use by users of Unix::ConfigFile submodules, so you may find this
32     documentation useful even if you are not developing your own module.
33    
34     The ConfigFile object also provides a sequencing API for modules that wish to
35     preserve the order of the configuration file they read and write. The
36     sequencer maintains a list of arbitrary data that a submodule may append,
37     insert, and delete from. Use of the sequencer is completely optional.
38    
39     A module that subclasses from Unix::ConfigFile must, at a minimum, provide two
40     methods, called "read" and "write". Both methods will receive a filehandle as
41     a parameter (besides the regular object parameter). The read method is called
42     after the file is opened. It is expected to read in the configuration file
43     and initialize the subclass-specific data structures associated with the
44     object. The write method is called when an object is committed and is
45     expected to write out the new configuration to the supplied filehandle.
46    
47     #
48     # This package was generated automatically with the cpan2rpm
49     # utility. To get this software or for more information
50     # please visit: http://perl.arix.com/
51     #
52    
53     %prep
54     %setup -q -n %{pkgname}-%{version}
55     chmod -R u+w %{_builddir}/%{pkgname}-%{version}
56    
57     %build
58     grep -rsl '^#!.*perl' . |
59     grep -v '.bak$' |xargs --no-run-if-empty \
60     %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
61     CFLAGS="$RPM_OPT_FLAGS"
62     %{__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     %{__make}
64     %if %maketest
65     %{__make} test
66     %endif
67    
68     %install
69     [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
70    
71     %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
72    
73     [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
74    
75     # SuSE Linux
76     if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
77     then
78     %{__mkdir_p} %{buildroot}/var/adm/perl-modules
79     %{__cat} `find %{buildroot} -name "perllocal.pod"` \
80     | %{__sed} -e s+%{buildroot}++g \
81     > %{buildroot}/var/adm/perl-modules/%{name}
82     fi
83    
84     # remove special files
85     find %{buildroot} -name "perllocal.pod" \
86     -o -name ".packlist" \
87     -o -name "*.bs" \
88     |xargs -i rm -f {}
89    
90     # no empty directories
91     find %{buildroot}%{_prefix} \
92     -type d -depth \
93     -exec rmdir {} \; 2>/dev/null
94    
95     %{__perl} -MFile::Find -le '
96     find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
97     print "%doc Changes examples README";
98     for my $x (sort @dirs, @files) {
99     push @ret, $x unless indirs($x);
100     }
101     print join "\n", sort @ret;
102    
103     sub wanted {
104     return if /auto$/;
105    
106     local $_ = $File::Find::name;
107     my $f = $_; s|^\Q%{buildroot}\E||;
108     return unless length;
109     return $files[@files] = $_ if -f $f;
110    
111     $d = $_;
112     /\Q$d\E/ && return for reverse sort @INC;
113     $d =~ /\Q$_\E/ && return
114     for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
115    
116     $dirs[@dirs] = $_;
117     }
118    
119     sub indirs {
120     my $x = shift;
121     $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
122     }
123     ' > %filelist
124    
125     [ -z %filelist ] && {
126     echo "ERROR: empty %files listing"
127     exit -1
128     }
129    
130     %clean
131     [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
132    
133     %files -f %filelist
134     %defattr(-,root,root)
135    
136     %changelog
137     * Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
138     - Clean up spec so package can be built by koji/plague
139    
140     * Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
141     - Update to new release naming. No functional changes.
142     - Make Packager generic
143    
144     * Mon Jul 04 2005 slords@mail.com
145     - Rebuild for centos 4.1
146    
147     * Wed Sep 22 2004 charlieb@charlieb-centos
148     - Initial build.

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed