/[smeserver]/rpms/perl-Object-Persistence/sme8/perl-Object-Persistence.spec
ViewVC logotype

Annotation of /rpms/perl-Object-Persistence/sme8/perl-Object-Persistence.spec

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


Revision 1.1 - (hide annotations) (download)
Tue Jun 12 20:24:22 2007 UTC (17 years, 5 months ago) by slords
Branch: MAIN
CVS Tags: perl-Object-Persistence-0_92-4_el5_sme
Import on branch sme8 of package perl-Object-Persistence-0.92-4.el5.sme.src.rpm

1 slords 1.1 #
2     # - Object-Persistence -
3     # This spec file was automatically generated by cpan2rpm [ver: 2.026]
4     # The following arguments were used:
5     # --no-requires=Crypt::Random --release=3 Persistence::Object::Simple
6     # For more information on cpan2rpm please visit: http://perl.arix.com/
7     #
8     %define pkgname Object-Persistence
9     %define filelist %{pkgname}-%{version}-filelist
10     %define NVR %{pkgname}-%{version}-%{release}
11     %define maketest 1
12     %define custom_find_req %{_tmppath}/%{NVR}-find-requires
13     %define _use_internal_dependency_generator 0
14     %define __find_requires %{custom_find_req}
15     %define __perl_requires %{custom_find_req}
16    
17     name: perl-Object-Persistence
18     summary: Object-Persistence - Object Persistence with Data::Dumper.
19     version: 0.92
20     release: 4%{?dist}
21     license: Artistic
22     group: Applications/CPAN
23     url: http://www.cpan.org
24     buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
25     buildarch: noarch
26     prefix: %(echo %{_prefix})
27     source: http://search.cpan.org/dist/V/VI/VIPUL/Object-Persistence-0.92.tar.gz
28     Patch0: %{pkgname}-%{version}.patch.2002052300
29     Patch1: %{pkgname}-%{version}.patch.2004092700
30     Patch2: %{pkgname}-%{version}.patch.forceDumpperl
31    
32     %description
33     P::O::S provides persistence functionality to its objects. Object definitions
34     are stored as stringified perl data structures, generated with Data::Dumper,
35     that are amenable to manual editing and external processing from outside the
36     class interface.
37    
38     Persistence is achieved with a blessed hash container that holds the object
39     data. The container can store objects that employ non-hash structures as
40     well. See L<"Inheriting Persistence::Object::Simple">, L<"Class Methods"> and
41     the persistent list class example (examples/Plist.pm).
42    
43     #
44     # This package was generated automatically with the cpan2rpm
45     # utility. To get this software or for more information
46     # please visit: http://perl.arix.com/
47     #
48    
49     %prep
50     %setup -q -n %{pkgname}-%{version}
51     chmod -R u+w %{_builddir}/%{pkgname}-%{version}
52     %patch0 -p1
53     %patch1 -p1
54     %patch2 -p1
55    
56     %build
57     grep -rsl '^#!.*perl' . |
58     grep -v '.bak$' |xargs --no-run-if-empty \
59     %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
60     CFLAGS="$RPM_OPT_FLAGS"
61     %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
62     %{__make}
63     %if %maketest
64     %{__make} test
65     %endif
66    
67     %install
68     [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
69     cat <<EOF > %{custom_find_req}
70     #!/bin/sh
71     /usr/lib/rpm/find-requires |grep -v -e 'Crypt::Random'
72     EOF
73     chmod 755 %{custom_find_req}
74    
75     %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
76    
77     [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
78    
79     # SuSE Linux
80     if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
81     then
82     %{__mkdir_p} %{buildroot}/var/adm/perl-modules
83     %{__cat} `find %{buildroot} -name "perllocal.pod"` \
84     | %{__sed} -e s+%{buildroot}++g \
85     > %{buildroot}/var/adm/perl-modules/%{name}
86     fi
87    
88     # remove special files
89     find %{buildroot} -name "perllocal.pod" \
90     -o -name ".packlist" \
91     -o -name "*.bs" \
92     |xargs -i rm -f {}
93    
94     # no empty directories
95     find %{buildroot}%{_prefix} \
96     -type d -depth \
97     -exec rmdir {} \; 2>/dev/null
98    
99     %{__perl} -MFile::Find -le '
100     find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
101     print "%doc Changes examples";
102     for my $x (sort @dirs, @files) {
103     push @ret, $x unless indirs($x);
104     }
105     print join "\n", sort @ret;
106    
107     sub wanted {
108     return if /auto$/;
109    
110     local $_ = $File::Find::name;
111     my $f = $_; s|^\Q%{buildroot}\E||;
112     return unless length;
113     return $files[@files] = $_ if -f $f;
114    
115     $d = $_;
116     /\Q$d\E/ && return for reverse sort @INC;
117     $d =~ /\Q$_\E/ && return
118     for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
119    
120     $dirs[@dirs] = $_;
121     }
122    
123     sub indirs {
124     my $x = shift;
125     $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
126     }
127     ' > %filelist
128    
129     [ -z %filelist ] && {
130     echo "ERROR: empty %files listing"
131     exit -1
132     }
133    
134     %clean
135     [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
136     rm -f %{custom_find_req}
137    
138     %files -f %filelist
139     %defattr(-,root,root)
140    
141     %changelog
142     * Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
143     - Clean up spec so package can be built by koji/plague
144    
145     * Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
146     - Update to new release naming. No functional changes.
147     - Make Packager generic
148    
149     * Wed Sep 13 2006 Michael Soulier <michael_soulier@mitel.com>
150     - Forced Data::Dumper to use Dumpperl to work around interpreter crash.
151     [sme 1837]
152    
153     * Mon Sep 27 2004 Charlie Brady <charlieb@e-smith.com>
154     - [0.92-3es01]
155     - Remove "AutoReqProv: no" so that rpmbuild calculates proper
156     provides. Remove Provides header thus made redudent.
157     [charlieb MN00040240]
158     - Fix croak in Simple.pm so that problems with cache file opens
159     are reported [charlieb ]
160     - Use new cpan2rpm template for build (for compat with CentOS).
161    
162     * Wed Sep 22 2004 Michael Soulier <michael_soulier@mitel.com>
163     - [0.92-2es01]
164     - Rebuilding to get proper provides. [msoulier MN00040240]
165    
166     * Thu May 23 2002 Mark Knox <markk@e-smith.com>
167     - [0.92-2]
168     - Changed untaint to slurp in all contents of temp file in order to prevent
169     semicolons in values from corrupting the session. [markk 3630]
170    
171     * Mon Feb 18 2002 Charlie Brady <charlieb@e-smith.com>
172     - Upgrade to version 0.92 (received by email).
173    
174     * Mon Feb 26 2001 Tony Clayton <tonyc@e-smith.com>
175     - initial release

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