日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。
Revision | 8b992fb87f6f000f8f1b640de6b027258641623d (tree) |
---|---|
Time | 2015-12-03 08:49:55 |
Author | Fumihisa TONAKA <fumi.ftnk@gmai...> |
Commiter | Fumihisa TONAKA |
SFEperl-package-stash: bump to 0.37
@@ -1,104 +1,351 @@ | ||
1 | -# | |
2 | -# spec file for package: SFEperl-package-stash | |
3 | -# | |
4 | -# This file and all modifications and additions to the pristine | |
5 | -# package are under the same license as the package itself. | |
6 | -# | |
7 | -# includes module(s): | |
8 | -# | |
9 | 1 | %include Solaris.inc |
10 | 2 | |
11 | -%define tarball_version 0.34 | |
12 | -%define tarball_name Package-Stash | |
3 | +%define build584 0 | |
4 | +%define build510 %( if [ -x /usr/perl5/5.10/bin/perl ]; then echo '1'; else echo '0'; fi) | |
5 | +%define build512 %( if [ -x /usr/perl5/5.12/bin/perl ]; then echo '1'; else echo '0'; fi) | |
6 | +%define build516 %( if [ -x /usr/perl5/5.16/bin/perl ]; then echo '1'; else echo '0'; fi) | |
7 | +%define build520 %( if [ -x /usr/perl5/5.20/bin/perl ]; then echo '1'; else echo '0'; fi) | |
8 | +%define include_executable 1 | |
13 | 9 | |
14 | -Name: SFEperl-package-stash | |
15 | -IPS_package_name: library/perl-5/package-stash | |
16 | -Version: 0.34 | |
17 | -IPS_component_version: 0.34 | |
18 | -Summary: Package::Stash | |
19 | -License: Artistic | |
20 | -Distribution: OpenSolaris | |
21 | -Vendor: OpenSolaris Community | |
22 | -Url: http://search.cpan.org/~doy/%{tarball_name}-%{tarball_version} | |
23 | -SUNW_Basedir: %{_basedir} | |
24 | -SUNW_Copyright: %{name}.copyright | |
25 | -Source0: http://search.cpan.org/CPAN/authors/id/D/DO/DOY/Package-Stash-%{tarball_version}.tar.gz | |
10 | +%define cpan_name Package-Stash | |
11 | +%define sfe_cpan_name package-stash | |
12 | +%define ips_cpan_name package-stash | |
26 | 13 | |
27 | -BuildRequires: runtime/perl-512 | |
28 | - | |
29 | -Meta(info.maintainer): roboporter by pkglabo.justplayer.com <pkgadmin@justplayer.com> | |
30 | -Meta(info.upstream): Jesse Luehrs <doy@cpan.org> | |
31 | -Meta(info.upstream_url): http://search.cpan.org/~doy/%{tarball_name}-%{tarball_version} | |
32 | -Meta(info.classification): org.opensolaris.category.2008:Development/Perl | |
14 | +Summary: routines for manipulating stashes | |
15 | +Name: SFEperl-%{sfe_cpan_name} | |
16 | +IPS_package_name: library/perl-5/%{ips_cpan_name} | |
17 | +Version: 0.37 | |
18 | +IPS_component_version: 0.37 | |
19 | +License: perl_5 | |
20 | +URL: https://metacpan.org/pod/Package::Stash | |
21 | +Source0: http://cpan.metacpan.org/authors/id/D/DO/DOY/Package-Stash-%{version}.tar.gz | |
22 | +BuildRoot: %{_tmppath}/%{name}-%{version}-build | |
33 | 23 | |
34 | 24 | %description |
25 | +routines for manipulating stashes | |
26 | + | |
27 | +%if %{build584} | |
28 | +%package 584 | |
29 | +IPS_package_name: library/perl-5/%{ips_cpan_name}-584 | |
30 | +Summary: routines for manipulating stashes | |
31 | +BuildRequires: runtime/perl-584 = * | |
32 | +BuildRequires: library/perl-5/dist-checkconflicts-584 | |
33 | +BuildRequires: library/perl-5/extutils-makemaker-584 | |
34 | +BuildRequires: library/perl-5/io-584 | |
35 | +BuildRequires: library/perl-5/pathtools-584 | |
36 | +BuildRequires: library/perl-5/test-fatal-584 | |
37 | +BuildRequires: library/perl-5/test-requires-584 | |
38 | +BuildRequires: library/perl-5/test-simple-584 | |
39 | +BuildRequires: library/perl-5/text-parsewords-584 | |
40 | +Requires: runtime/perl-584 = * | |
41 | +Requires: library/perl-5/%{ips_cpan_name} | |
42 | +Requires: library/perl-5/carp-584 | |
43 | +Requires: library/perl-5/constant-584 | |
44 | +Requires: library/perl-5/dist-checkconflicts-584 | |
45 | +Requires: library/perl-5/getopt-long-584 | |
46 | +Requires: library/perl-5/module-implementation-584 | |
47 | +Requires: library/perl-5/package-stash-xs-584 | |
48 | +Requires: library/perl-5/scalar-list-utils-584 | |
49 | +Requires: library/perl-5/symbol-584 | |
50 | + | |
51 | +%description 584 | |
52 | +routines for manipulating stashes | |
53 | +%endif | |
54 | + | |
55 | +%if %{build510} | |
56 | +%package 510 | |
57 | +IPS_package_name: library/perl-5/%{ips_cpan_name}-510 | |
58 | +Summary: routines for manipulating stashes | |
59 | +BuildRequires: runtime/perl-510 = * | |
60 | +BuildRequires: library/perl-5/dist-checkconflicts-510 | |
61 | +BuildRequires: library/perl-5/extutils-makemaker-510 | |
62 | +BuildRequires: library/perl-5/io-510 | |
63 | +BuildRequires: library/perl-5/pathtools-510 | |
64 | +BuildRequires: library/perl-5/test-fatal-510 | |
65 | +BuildRequires: library/perl-5/test-requires-510 | |
66 | +BuildRequires: library/perl-5/test-simple-510 | |
67 | +BuildRequires: library/perl-5/text-parsewords-510 | |
68 | +Requires: runtime/perl-510 = * | |
69 | +Requires: library/perl-5/%{ips_cpan_name} | |
70 | +Requires: library/perl-5/carp-510 | |
71 | +Requires: library/perl-5/constant-510 | |
72 | +Requires: library/perl-5/dist-checkconflicts-510 | |
73 | +Requires: library/perl-5/getopt-long-510 | |
74 | +Requires: library/perl-5/module-implementation-510 | |
75 | +Requires: library/perl-5/package-stash-xs-510 | |
76 | +Requires: library/perl-5/scalar-list-utils-510 | |
77 | +Requires: library/perl-5/symbol-510 | |
78 | + | |
79 | +%description 510 | |
80 | +routines for manipulating stashes | |
81 | +%endif | |
82 | + | |
83 | +%if %{build512} | |
84 | +%package 512 | |
85 | +IPS_package_name: library/perl-5/%{ips_cpan_name}-512 | |
86 | +Summary: routines for manipulating stashes | |
87 | +BuildRequires: runtime/perl-512 = * | |
88 | +BuildRequires: library/perl-5/dist-checkconflicts-512 | |
89 | +BuildRequires: library/perl-5/extutils-makemaker-512 | |
90 | +BuildRequires: library/perl-5/io-512 | |
91 | +BuildRequires: library/perl-5/pathtools-512 | |
92 | +BuildRequires: library/perl-5/test-fatal-512 | |
93 | +BuildRequires: library/perl-5/test-requires-512 | |
94 | +BuildRequires: library/perl-5/test-simple-512 | |
95 | +BuildRequires: library/perl-5/text-parsewords-512 | |
96 | +Requires: runtime/perl-512 = * | |
97 | +Requires: library/perl-5/%{ips_cpan_name} | |
98 | +Requires: library/perl-5/carp-512 | |
99 | +Requires: library/perl-5/constant-512 | |
100 | +Requires: library/perl-5/dist-checkconflicts-512 | |
101 | +Requires: library/perl-5/getopt-long-512 | |
102 | +Requires: library/perl-5/module-implementation-512 | |
103 | +Requires: library/perl-5/package-stash-xs-512 | |
104 | +Requires: library/perl-5/scalar-list-utils-512 | |
105 | +Requires: library/perl-5/symbol-512 | |
106 | + | |
107 | +%description 512 | |
108 | +routines for manipulating stashes | |
109 | +%endif | |
110 | + | |
111 | +%if %{build516} | |
112 | +%package 516 | |
113 | +IPS_package_name: library/perl-5/%{ips_cpan_name}-516 | |
114 | +Summary: routines for manipulating stashes | |
115 | +BuildRequires: runtime/perl-516 = * | |
116 | +BuildRequires: library/perl-5/dist-checkconflicts-516 | |
117 | +BuildRequires: library/perl-5/extutils-makemaker-516 | |
118 | +BuildRequires: library/perl-5/io-516 | |
119 | +BuildRequires: library/perl-5/pathtools-516 | |
120 | +BuildRequires: library/perl-5/test-fatal-516 | |
121 | +BuildRequires: library/perl-5/test-requires-516 | |
122 | +BuildRequires: library/perl-5/test-simple-516 | |
123 | +BuildRequires: library/perl-5/text-parsewords-516 | |
124 | +Requires: runtime/perl-516 = * | |
125 | +Requires: library/perl-5/%{ips_cpan_name} | |
126 | +Requires: library/perl-5/carp-516 | |
127 | +Requires: library/perl-5/constant-516 | |
128 | +Requires: library/perl-5/dist-checkconflicts-516 | |
129 | +Requires: library/perl-5/getopt-long-516 | |
130 | +Requires: library/perl-5/module-implementation-516 | |
131 | +Requires: library/perl-5/package-stash-xs-516 | |
132 | +Requires: library/perl-5/scalar-list-utils-516 | |
133 | +Requires: library/perl-5/symbol-516 | |
134 | + | |
135 | +%description 516 | |
136 | +routines for manipulating stashes | |
137 | +%endif | |
138 | + | |
139 | +%if %{build520} | |
140 | +%package 520 | |
141 | +IPS_package_name: library/perl-5/%{ips_cpan_name}-520 | |
142 | +Summary: routines for manipulating stashes | |
143 | +BuildRequires: runtime/perl-520 = * | |
144 | +BuildRequires: library/perl-5/dist-checkconflicts-520 | |
145 | +BuildRequires: library/perl-5/extutils-makemaker-520 | |
146 | +BuildRequires: library/perl-5/io-520 | |
147 | +BuildRequires: library/perl-5/pathtools-520 | |
148 | +BuildRequires: library/perl-5/test-fatal-520 | |
149 | +BuildRequires: library/perl-5/test-requires-520 | |
150 | +BuildRequires: library/perl-5/test-simple-520 | |
151 | +BuildRequires: library/perl-5/text-parsewords-520 | |
152 | +Requires: runtime/perl-520 = * | |
153 | +Requires: library/perl-5/%{ips_cpan_name} | |
154 | +Requires: library/perl-5/carp-520 | |
155 | +Requires: library/perl-5/constant-520 | |
156 | +Requires: library/perl-5/dist-checkconflicts-520 | |
157 | +Requires: library/perl-5/getopt-long-520 | |
158 | +Requires: library/perl-5/module-implementation-520 | |
159 | +Requires: library/perl-5/package-stash-xs-520 | |
160 | +Requires: library/perl-5/scalar-list-utils-520 | |
161 | +Requires: library/perl-5/symbol-520 | |
162 | + | |
163 | +%description 520 | |
164 | +routines for manipulating stashes | |
165 | +%endif | |
35 | 166 | |
36 | 167 | |
37 | -# %package 584 | |
38 | -# IPS_package_name: library/perl-5/package-stash-584 | |
39 | -# Summary: Package::Stash for perl-584 | |
40 | -# BuildRequires: runtime/perl-584 | |
41 | -# BuildRequires: runtime/perl-584 | |
42 | -# Requires: runtime/perl-584 | |
43 | - | |
44 | -%package 512 | |
45 | -IPS_package_name: library/perl-5/package-stash-512 | |
46 | -Summary: Package::Stash for perl-512 | |
47 | -BuildRequires: runtime/perl-512 | |
48 | -BuildRequires: library/perl-5/package-deprecationmanager-512 | |
49 | -BuildRequires: library/perl-5/dist-checkconflicts-512 | |
50 | -BuildRequires: library/perl-5/module-implementation-512 | |
51 | -Requires: runtime/perl-512 | |
52 | -Requires: library/perl-5/package-stash | |
53 | - | |
54 | 168 | %prep |
55 | -%setup -q -n %{tarball_name}-%{tarball_version} | |
169 | +%setup -q -n %{cpan_name}-%{version} | |
170 | +rm -rf %{buildroot} | |
56 | 171 | |
57 | 172 | %build |
58 | -# export PERL5LIB=/usr/perl5/vendor_perl/5.8.4 | |
59 | -# /usr/perl5/5.8.4/bin/perl Makefile.PL PREFIX=%{_prefix} \ | |
60 | -# DESTDIR=$RPM_BUILD_ROOT \ | |
61 | -# LIB=/usr/perl5/vendor_perl/5.8.4 | |
62 | -# make | |
63 | -# make test | |
173 | +build_with_makefile.pl_for() { | |
174 | + perl_ver=$1 | |
175 | + test=$2 | |
176 | + bindir="/usr/perl5/${perl_ver}/bin" | |
177 | + vendor_dir="/usr/perl5/vendor_perl/${perl_ver}" | |
64 | 178 | |
65 | -# rm -rf $RPM_BUILD_ROOT | |
66 | -# make pure_install | |
179 | + export PERL5LIB=${vendor_dir} | |
180 | + ${bindir}/perl Makefile.PL PREFIX=%{_prefix} \ | |
181 | + DESTDIR=$RPM_BUILD_ROOT \ | |
182 | + LIB=${vendor_dir} | |
183 | + make | |
184 | + [ x${test} = 'xwithout_test' ] || make test | |
185 | + make pure_install | |
186 | +} | |
67 | 187 | |
68 | -export PERL5LIB=/usr/perl5/vendor_perl/5.12 | |
69 | -/usr/perl5/5.12/bin/perl Makefile.PL PREFIX=%{_prefix} \ | |
70 | - DESTDIR=$RPM_BUILD_ROOT \ | |
71 | - LIB=/usr/perl5/vendor_perl/5.12 | |
72 | -make | |
73 | -make test | |
188 | +build_with_build.pl_for() { | |
189 | + perl_ver=$1 | |
190 | + test=$2 | |
191 | + bindir="/usr/perl5/${perl_ver}/bin" | |
192 | + vendor_dir="/usr/perl5/vendor_perl/${perl_ver}" | |
193 | + | |
194 | + export PERL5LIB=${vendor_dir} | |
195 | + ${bindir}/perl Build.PL \ | |
196 | + --installdirs vendor \ | |
197 | + --destdir $RPM_BUILD_ROOT | |
198 | + ${bindir}/perl ./Build | |
199 | + [ x${test} = 'xwithout_test' ] || ${bindir}/perl ./Build test | |
200 | + ${bindir}/perl ./Build install --destdir $RPM_BUILD_ROOT | |
201 | + ${bindir}/perl ./Build clean | |
202 | +} | |
203 | + | |
204 | +modify_bin_dir() { | |
205 | + perl_ver=$1 | |
206 | + if [ -d $RPM_BUILD_ROOT/usr/bin ] | |
207 | + then | |
208 | + [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver} ] || mkdir -p $RPM_BUILD_ROOT/usr/perl5/${perl_ver} | |
209 | + mv $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin | |
210 | + fi | |
211 | + | |
212 | + if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin ] | |
213 | + then | |
214 | + for i in $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin/* | |
215 | + do | |
216 | + sed -i.bak -e "s/\/usr\/bin\/env ruby/\/usr\/perl5\/${perl-ver}\/bin\/ruby/" ${i} | |
217 | + [ -f ${i}.bak] || rm -f ${i}.bak | |
218 | + done | |
219 | + fi | |
220 | +} | |
221 | + | |
222 | +modify_man_dir() { | |
223 | + perl_ver=$1 | |
224 | + if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man ] | |
225 | + then | |
226 | + if [ -d $RPM_BUILD_ROOT%{_datadir}/man ] | |
227 | + then | |
228 | + rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man | |
229 | + else | |
230 | + mkdir -p $RPM_BUILD_ROOT%{_datadir} | |
231 | + mv $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man $RPM_BUILD_ROOT%{_datadir}/ | |
232 | + rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man | |
233 | + fi | |
234 | + if [ %{include_executable} -eq 0 ] | |
235 | + then | |
236 | + rmdir $RPM_BUILD_ROOT/usr/perl5/${perl_ver} | |
237 | + fi | |
238 | + | |
239 | + fi | |
240 | +} | |
241 | + | |
242 | +build_for() { | |
243 | + if [ -f Build.PL ]; | |
244 | + then | |
245 | + build_with_build.pl_for $* | |
246 | + elif [ -f Makefile.PL ]; | |
247 | + then | |
248 | + build_with_makefile.pl_for $* | |
249 | + fi | |
250 | + | |
251 | + modify_bin_dir $* | |
252 | + modify_man_dir $* | |
253 | +} | |
254 | + | |
255 | +# To build without test, pass 'without_test' to build_for commaond. | |
256 | +# like 'build_for version without_test' | |
257 | +%if %{build584} | |
258 | +build_for 5.8.4 | |
259 | +%endif | |
260 | + | |
261 | +%if %{build510} | |
262 | +build_for 5.10 | |
263 | +%endif | |
264 | + | |
265 | +%if %{build512} | |
266 | +build_for 5.12 | |
267 | +%endif | |
268 | + | |
269 | +%if %{build516} | |
270 | +build_for 5.16 | |
271 | +%endif | |
272 | + | |
273 | +%if %{build520} | |
274 | +build_for 5.20 | |
275 | +%endif | |
74 | 276 | |
75 | 277 | %install |
76 | -rm -rf $RPM_BUILD_ROOT | |
77 | -make pure_install | |
78 | -mkdir -p $RPM_BUILD_ROOT%{_datadir} | |
79 | -mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir} | |
80 | -mv $RPM_BUILD_ROOT%{_datadir}/man/man3 $RPM_BUILD_ROOT%{_datadir}/man/man3perl | |
278 | +if [ -d $RPM_BUILD_ROOT%{_prefix}/man ] | |
279 | +then | |
280 | + mkdir -p $RPM_BUILD_ROOT%{_datadir} | |
281 | + mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir} | |
282 | +fi | |
283 | +if [ -d $RPM_BUILD_ROOT%{_datadir}/man/man3 ] | |
284 | +then | |
285 | + mv $RPM_BUILD_ROOT%{_datadir}/man/man3 $RPM_BUILD_ROOT%{_datadir}/man/man3perl | |
286 | +fi | |
81 | 287 | |
82 | 288 | %clean |
83 | -rm -rf $RPM_BUILD_ROOT | |
289 | +rm -rf %{buildroot} | |
84 | 290 | |
85 | 291 | %files |
86 | -%defattr(-,root,bin) | |
87 | -#%{_prefix}/perl5 | |
88 | -%attr(0755,root,sys) %dir %{_datadir} | |
89 | -%{_mandir} | |
90 | -%attr(0755,root,bin) %dir %{_bindir} | |
91 | -%{_bindir}/* | |
292 | +%defattr(0755,root,bin,-) | |
293 | +%{_datadir}/man | |
92 | 294 | |
93 | -# %files 584 | |
94 | -# %defattr (-, root, bin) | |
95 | -# %{_prefix}/perl5/vendor_perl/5.8.4 | |
295 | +%if %{build584} | |
296 | +%files 584 | |
297 | +%defattr(0755,root,bin,-) | |
298 | +%dir %attr (0755, root, sys) /usr | |
299 | +/usr/perl5/vendor_perl/5.8.4 | |
300 | +%if %{include_executable} | |
301 | +/usr/perl5/5.8.4 | |
302 | +%endif | |
303 | +%endif | |
96 | 304 | |
305 | +%if %{build510} | |
306 | +%files 510 | |
307 | +%defattr(0755,root,bin,-) | |
308 | +%dir %attr (0755, root, sys) /usr | |
309 | +/usr/perl5/vendor_perl/5.10 | |
310 | +%if %{include_executable} | |
311 | +/usr/perl5/5.1.0 | |
312 | +%endif | |
313 | +%endif | |
314 | + | |
315 | +%if %{build512} | |
97 | 316 | %files 512 |
98 | -%defattr (-, root, bin) | |
99 | -%{_prefix}/perl5/vendor_perl/5.12 | |
317 | +%defattr(0755,root,bin,-) | |
318 | +%dir %attr (0755, root, sys) /usr | |
319 | +/usr/perl5/vendor_perl/5.12 | |
320 | +%if %{include_executable} | |
321 | +/usr/perl5/5.12 | |
322 | +%endif | |
323 | +%endif | |
324 | + | |
325 | +%if %{build516} | |
326 | +%files 516 | |
327 | +%defattr(0755,root,bin,-) | |
328 | +%dir %attr (0755, root, sys) /usr | |
329 | +/usr/perl5/vendor_perl/5.16 | |
330 | +%if %{include_executable} | |
331 | +/usr/perl5/5.16 | |
332 | +%endif | |
333 | +%endif | |
334 | + | |
335 | +%if %{build520} | |
336 | +%files 520 | |
337 | +%defattr(0755,root,bin,-) | |
338 | +%dir %attr (0755, root, sys) /usr | |
339 | +/usr/perl5/vendor_perl/5.20 | |
340 | +%if %{include_executable} | |
341 | +/usr/perl5/5.20 | |
342 | +%endif | |
343 | +%endif | |
344 | + | |
100 | 345 | |
101 | 346 | %changelog |
347 | +* Thu Dec 03 2015 - Fumihisa TONAKA <fumi.ftnk@gmail.com> | |
348 | +- bump to 0.37 | |
102 | 349 | * Mon Nov 25 2013 - Fumihisa TONAKA <fumi.ftnk@gmail.com> |
103 | 350 | - add BuildRequires |
104 | 351 | * Thu Nov 14 2013 - Fumihisa TONAKA <fumi.ftnk@gmail.com> |