• R/O
  • SSH

contrib-spec-files: Commit

日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。


Commit MetaInfo

Revision7df195d616a46cb366bf38e309736c094fee78c8 (tree)
Time2015-12-05 15:41:01
AuthorFumihisa TONAKA <fumi.ftnk@gmai...>
CommiterFumihisa TONAKA

Log Message

merge spec_SFEperl-parallel-prefork to default

Change Summary

Incremental Difference

diff -r 4793a9e69e57 -r 7df195d616a4 specs/SFEperl-parallel-prefork.spec
--- a/specs/SFEperl-parallel-prefork.spec Sat Dec 05 15:38:54 2015 +0900
+++ b/specs/SFEperl-parallel-prefork.spec Sat Dec 05 15:41:01 2015 +0900
@@ -1,105 +1,323 @@
1-#
2-# spec file for package: SFEperl-parallel-prefork
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-#
91 %include Solaris.inc
102
11-%define tarball_version 0.13
12-%define tarball_name Parallel-Prefork
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 0
139
14-Name: SFEperl-parallel-prefork
15-IPS_package_name: library/perl-5/parallel-prefork
16-Version: 0.13
17-IPS_component_version: 0.13
18-Summary: Parallel-Prefork
19-License: Artistic
20-Distribution: OpenSolaris
21-Vendor: OpenSolaris Community
22-Url: http://search.cpan.org/~kazuho/%{tarball_name}-%{tarball_version}
23-SUNW_Basedir: %{_basedir}
24-SUNW_Copyright: %{name}.copyright
25-Source0: http://search.cpan.org/CPAN/authors/id/K/KA/KAZUHO/Parallel-Prefork-%{tarball_version}.tar.gz
10+%define cpan_name Parallel-Prefork
11+%define sfe_cpan_name parallel-prefork
12+%define ips_cpan_name parallel-prefork
2613
27-# BuildRequires: runtime/perl-584
28-BuildRequires: runtime/perl-512
29-
30-Meta(info.maintainer): roboporter by pkglabo.justplayer.com <pkgadmin@justplayer.com>
31-Meta(info.upstream): Kazuho Oku <kazuhooku@gmail.com>
32-Meta(info.upstream_url): http://search.cpan.org/~kazuho/%{tarball_name}-%{tarball_version}
33-Meta(info.classification): org.opensolaris.category.2008:Development/Perl
14+Summary: A simple prefork server framework
15+Name: SFEperl-%{sfe_cpan_name}
16+IPS_package_name: library/perl-5/%{ips_cpan_name}
17+Version: 0.17
18+IPS_component_version: 0.17
19+License: perl_5
20+URL: https://metacpan.org/pod/Parallel::Prefork
21+Source0: http://cpan.metacpan.org/authors/id/K/KA/KAZUHO/Parallel-Prefork-%{version}.tar.gz
22+BuildRoot: %{_tmppath}/%{name}-%{version}-build
3423
3524 %description
36-Parallel-Prefork
25+A simple prefork server framework
3726
38-# %package 584
39-# IPS_package_name: library/perl-5/parallel-prefork-584
40-# Summary: Parallel-Prefork for perl-584
41-# BuildRequires: runtime/perl-584
42-# BuildRequires: library/perl-5/test-sharedfork-584
43-# Requires: runtime/perl-584
27+%if %{build584}
28+%package 584
29+IPS_package_name: library/perl-5/%{ips_cpan_name}-584
30+Summary: A simple prefork server framework
31+BuildRequires: runtime/perl-584 = *
32+BuildRequires: library/perl-5/extutils-makemaker-584
33+BuildRequires: library/perl-5/test-requires-584
34+BuildRequires: library/perl-5/test-sharedfork-584
35+BuildRequires: library/perl-5/proc-wait3-584
36+BuildRequires: library/perl-5/scope-guard-584
37+BuildRequires: library/perl-5/signal-mask-584
38+Requires: runtime/perl-584 = *
39+Requires: library/perl-5/%{ips_cpan_name}
40+Requires: library/perl-5/class-accessor-lite-584
41+Requires: library/perl-5/list-moreutils-584
4442
43+%description 584
44+A simple prefork server framework
45+%endif
46+
47+%if %{build510}
48+%package 510
49+IPS_package_name: library/perl-5/%{ips_cpan_name}-510
50+Summary: A simple prefork server framework
51+BuildRequires: runtime/perl-510 = *
52+BuildRequires: library/perl-5/extutils-makemaker-510
53+BuildRequires: library/perl-5/test-requires-510
54+BuildRequires: library/perl-5/test-sharedfork-510
55+BuildRequires: library/perl-5/proc-wait3-510
56+BuildRequires: library/perl-5/scope-guard-510
57+BuildRequires: library/perl-5/signal-mask-510
58+Requires: runtime/perl-510 = *
59+Requires: library/perl-5/%{ips_cpan_name}
60+Requires: library/perl-5/class-accessor-lite-510
61+Requires: library/perl-5/list-moreutils-510
62+Requires: library/perl-5/proc-wait3-510
63+Requires: library/perl-5/scope-guard-510
64+Requires: library/perl-5/signal-mask-510
65+
66+%description 510
67+A simple prefork server framework
68+%endif
69+
70+%if %{build512}
4571 %package 512
46-IPS_package_name: library/perl-5/parallel-prefork-512
47-Summary: Parallel-Prefork for perl-512
48-BuildRequires: runtime/perl-512
49-BuildRequires: library/perl-5/test-sharedfork-512
50-BuildRequires: library/perl-5/proc-wait3-512
51-BuildRequires: library/perl-5/scope-guard
52-Requires: runtime/perl-512
72+IPS_package_name: library/perl-5/%{ips_cpan_name}-512
73+Summary: A simple prefork server framework
74+BuildRequires: runtime/perl-512 = *
75+BuildRequires: library/perl-5/extutils-makemaker-512
76+BuildRequires: library/perl-5/test-requires-512
77+BuildRequires: library/perl-5/test-sharedfork-512
78+BuildRequires: library/perl-5/proc-wait3-512
79+BuildRequires: library/perl-5/scope-guard-512
80+BuildRequires: library/perl-5/signal-mask-512
81+Requires: runtime/perl-512 = *
82+Requires: library/perl-5/%{ips_cpan_name}
83+Requires: library/perl-5/class-accessor-lite-512
84+Requires: library/perl-5/list-moreutils-512
85+Requires: library/perl-5/proc-wait3-512
86+Requires: library/perl-5/scope-guard-512
87+Requires: library/perl-5/signal-mask-512
88+
89+%description 512
90+A simple prefork server framework
91+%endif
92+
93+%if %{build516}
94+%package 516
95+IPS_package_name: library/perl-5/%{ips_cpan_name}-516
96+Summary: A simple prefork server framework
97+BuildRequires: runtime/perl-516 = *
98+BuildRequires: library/perl-5/extutils-makemaker-516
99+BuildRequires: library/perl-5/test-requires-516
100+BuildRequires: library/perl-5/test-sharedfork-516
101+BuildRequires: library/perl-5/proc-wait3-516
102+BuildRequires: library/perl-5/scope-guard-516
103+BuildRequires: library/perl-5/signal-mask-516
104+Requires: runtime/perl-516 = *
105+Requires: library/perl-5/%{ips_cpan_name}
106+Requires: library/perl-5/class-accessor-lite-516
107+Requires: library/perl-5/list-moreutils-516
108+Requires: library/perl-5/proc-wait3-516
109+Requires: library/perl-5/scope-guard-516
110+Requires: library/perl-5/signal-mask-516
111+
112+%description 516
113+A simple prefork server framework
114+%endif
115+
116+%if %{build520}
117+%package 520
118+IPS_package_name: library/perl-5/%{ips_cpan_name}-520
119+Summary: A simple prefork server framework
120+BuildRequires: runtime/perl-520 = *
121+BuildRequires: library/perl-5/extutils-makemaker-520
122+BuildRequires: library/perl-5/test-requires-520
123+BuildRequires: library/perl-5/test-sharedfork-520
124+BuildRequires: library/perl-5/proc-wait3-520
125+BuildRequires: library/perl-5/scope-guard-520
126+BuildRequires: library/perl-5/signal-mask-520
127+Requires: runtime/perl-520 = *
128+Requires: library/perl-5/%{ips_cpan_name}
129+Requires: library/perl-5/class-accessor-lite-520
130+Requires: library/perl-5/list-moreutils-520
131+Requires: library/perl-5/proc-wait3-520
132+Requires: library/perl-5/scope-guard-520
133+Requires: library/perl-5/signal-mask-520
134+
135+%description 520
136+A simple prefork server framework
137+%endif
53138
54139
55140 %prep
56-%setup -q -n %{tarball_name}-%{tarball_version}
141+%setup -q -n %{cpan_name}-%{version}
142+rm -rf %{buildroot}
57143
58-# %build
59-# export PERL5LIB=/usr/perl5/vendor_perl/5.8.4
60-# /usr/perl5/5.8.4/bin/perl Makefile.PL PREFIX=%{_prefix} \
61-# DESTDIR=$RPM_BUILD_ROOT \
62-# LIB=/usr/perl5/vendor_perl/5.8.4
63-# make
64-# make test
144+%build
145+build_with_makefile.pl_for() {
146+ perl_ver=$1
147+ test=$2
148+ bindir="/usr/perl5/${perl_ver}/bin"
149+ vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
65150
66-# rm -rf $RPM_BUILD_ROOT
67-# make pure_install
151+ export PERL5LIB=${vendor_dir}
152+ ${bindir}/perl Makefile.PL PREFIX=%{_prefix} \
153+ DESTDIR=$RPM_BUILD_ROOT \
154+ LIB=${vendor_dir}
155+ make
156+ [ x${test} = 'xwithout_test' ] || make test
157+ make pure_install
158+}
68159
69-export PERL5LIB=/usr/perl5/vendor_perl/5.12
70-/usr/perl5/5.12/bin/perl Makefile.PL PREFIX=%{_prefix} \
71- DESTDIR=$RPM_BUILD_ROOT \
72- LIB=/usr/perl5/vendor_perl/5.12
73-make
74-make test
160+build_with_build.pl_for() {
161+ perl_ver=$1
162+ test=$2
163+ bindir="/usr/perl5/${perl_ver}/bin"
164+ vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
165+
166+ export PERL5LIB=${vendor_dir}
167+ ${bindir}/perl Build.PL \
168+ --installdirs vendor \
169+ --destdir $RPM_BUILD_ROOT
170+ ${bindir}/perl ./Build
171+ [ x${test} = 'xwithout_test' ] || ${bindir}/perl ./Build test
172+ ${bindir}/perl ./Build install --destdir $RPM_BUILD_ROOT
173+ ${bindir}/perl ./Build clean
174+}
175+
176+modify_bin_dir() {
177+ perl_ver=$1
178+ if [ -d $RPM_BUILD_ROOT/usr/bin ]
179+ then
180+ [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver} ] || mkdir -p $RPM_BUILD_ROOT/usr/perl5/${perl_ver}
181+ mv $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin
182+ fi
183+
184+ if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin ]
185+ then
186+ for i in $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin/*
187+ do
188+ sed -i.bak -e "s/\/usr\/bin\/env ruby/\/usr\/perl5\/${perl-ver}\/bin\/ruby/" ${i}
189+ [ -f ${i}.bak] || rm -f ${i}.bak
190+ done
191+ fi
192+}
193+
194+modify_man_dir() {
195+ perl_ver=$1
196+ if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man ]
197+ then
198+ if [ -d $RPM_BUILD_ROOT%{_datadir}/man ]
199+ then
200+ rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man
201+ else
202+ mkdir -p $RPM_BUILD_ROOT%{_datadir}
203+ mv $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man $RPM_BUILD_ROOT%{_datadir}/
204+ rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man
205+ fi
206+ if [ %{include_executable} -eq 0 ]
207+ then
208+ rmdir $RPM_BUILD_ROOT/usr/perl5/${perl_ver}
209+ fi
210+
211+ fi
212+}
213+
214+build_for() {
215+ if [ -f Build.PL ];
216+ then
217+ build_with_build.pl_for $*
218+ elif [ -f Makefile.PL ];
219+ then
220+ build_with_makefile.pl_for $*
221+ fi
222+
223+ modify_bin_dir $*
224+ modify_man_dir $*
225+}
226+
227+# To build without test, pass 'without_test' to build_for commaond.
228+# like 'build_for version without_test'
229+%if %{build584}
230+build_for 5.8.4
231+%endif
232+
233+%if %{build510}
234+build_for 5.10
235+%endif
236+
237+%if %{build512}
238+build_for 5.12
239+%endif
240+
241+%if %{build516}
242+build_for 5.16
243+%endif
244+
245+%if %{build520}
246+build_for 5.20
247+%endif
75248
76249 %install
77-rm -rf $RPM_BUILD_ROOT
78-make pure_install
79-mkdir -p $RPM_BUILD_ROOT%{_datadir}
80-mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}
81-mv $RPM_BUILD_ROOT%{_datadir}/man/man3 $RPM_BUILD_ROOT%{_datadir}/man/man3perl
250+if [ -d $RPM_BUILD_ROOT%{_prefix}/man ]
251+then
252+ mkdir -p $RPM_BUILD_ROOT%{_datadir}
253+ mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}
254+fi
255+if [ -d $RPM_BUILD_ROOT%{_datadir}/man/man3 ]
256+then
257+ mv $RPM_BUILD_ROOT%{_datadir}/man/man3 $RPM_BUILD_ROOT%{_datadir}/man/man3perl
258+fi
82259
83260 %clean
84-rm -rf $RPM_BUILD_ROOT
261+rm -rf %{buildroot}
85262
86263 %files
87-%defattr(-,root,bin)
88-#%{_prefix}/perl5
89-%attr(0755,root,sys) %dir %{_datadir}
90-%{_mandir}
91-#%attr(0755,root,bin) %dir %{_bindir}
92-#%{_bindir}/*
264+%defattr(0755,root,bin,-)
265+%{_datadir}/man
93266
94-# %files 584
95-# %defattr (-, root, bin)
96-# %{_prefix}/perl5/vendor_perl/5.8.4
267+%if %{build584}
268+%files 584
269+%defattr(0755,root,bin,-)
270+%dir %attr (0755, root, sys) /usr
271+/usr/perl5/vendor_perl/5.8.4
272+%if %{include_executable}
273+/usr/perl5/5.8.4
274+%endif
275+%endif
97276
277+%if %{build510}
278+%files 510
279+%defattr(0755,root,bin,-)
280+%dir %attr (0755, root, sys) /usr
281+/usr/perl5/vendor_perl/5.10
282+%if %{include_executable}
283+/usr/perl5/5.1.0
284+%endif
285+%endif
286+
287+%if %{build512}
98288 %files 512
99-%defattr (-, root, bin)
100-%{_prefix}/perl5/vendor_perl/5.12
289+%defattr(0755,root,bin,-)
290+%dir %attr (0755, root, sys) /usr
291+/usr/perl5/vendor_perl/5.12
292+%if %{include_executable}
293+/usr/perl5/5.12
294+%endif
295+%endif
296+
297+%if %{build516}
298+%files 516
299+%defattr(0755,root,bin,-)
300+%dir %attr (0755, root, sys) /usr
301+/usr/perl5/vendor_perl/5.16
302+%if %{include_executable}
303+/usr/perl5/5.16
304+%endif
305+%endif
306+
307+%if %{build520}
308+%files 520
309+%defattr(0755,root,bin,-)
310+%dir %attr (0755, root, sys) /usr
311+/usr/perl5/vendor_perl/5.20
312+%if %{include_executable}
313+/usr/perl5/5.20
314+%endif
315+%endif
316+
101317
102318 %changelog
319+* Fri Dec 04 2015 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
320+- bump to 0.17
103321 * Mon Feb 11 2013 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
104322 - add BuildRequires
105323 * Thu Jun 14 2012 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
Show on old repository browser