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

Contents of /rpms/perl-Object-Persistence/sme9/perl-Object-Persistence.spec

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


Revision 1.1 - (show annotations) (download)
Wed Sep 9 07:00:20 2015 UTC (9 years, 2 months ago) by vip-ire
Branch: MAIN
CVS Tags: perl-Object-Persistence-0_92-4_el6_sme
Import perl-Object-Persistence in SME9 tree

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

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