• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revision8d3ef7f388b99d26d98a6c3576418f8dc0bb87f8 (tree)
Time2015-12-21 14:56:05
AuthorFumihisa TONAKA <fumi.ftnk@gmai...>
CommiterFumihisa TONAKA

Log Message

SFEperl-www-form-urlencoded-xs: bump to 0.23 and build packages for perl-510, perl-516 and perl-520

Change Summary

Incremental Difference

diff -r a39165afb14c -r 8d3ef7f388b9 specs/SFEperl-www-form-urlencoded-xs.spec
--- a/specs/SFEperl-www-form-urlencoded-xs.spec Sun Nov 15 02:21:16 2015 +0900
+++ b/specs/SFEperl-www-form-urlencoded-xs.spec Mon Dec 21 14:56:05 2015 +0900
@@ -1,100 +1,290 @@
1-#
2-# spec file for package: SFEperl-www-form-urlencoded-xs
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
10-%include packagenamemacros.inc
112
12-%define tarball_version 0.20
13-%define tarball_name WWW-Form-UrlEncoded-XS
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
149
15-Name: perl-www-form-urlencoded-xs
16-IPS_package_name: library/perl-5/www-form-urlencoded-xs
17-Version: %{tarball_version}
18-IPS_component_version: %{tarball_version}
19-Summary: XS implementation of parser and builder for application/x-www-form-urlencoded
20-License: perl_5
21-Url: http://search.cpan.org/~kazeburo/%{tarball_name}-%{tarball_version}
22-Source0: http://search.cpan.org/CPAN/authors/id/K/KA/KAZEBURO/WWW-Form-UrlEncoded-XS-%{tarball_version}.tar.gz
10+%define cpan_name WWW-Form-UrlEncoded-XS
11+%define sfe_cpan_name www-form-urlenc-xs
12+%define ips_cpan_name www-form-urlencoded-xs
2313
24-BuildRequires: runtime/perl-584
25-BuildRequires: runtime/perl-512
14+Summary: XS implementation of parser and builder for application/x-www-form-urlencoded
15+Name: perl-%{sfe_cpan_name}
16+IPS_package_name: library/perl-5/%{ips_cpan_name}
17+Version: 0.23
18+IPS_component_version: 0.23
19+License: perl_5
20+URL: https://metacpan.org/pod/WWW::Form::UrlEncoded::XS
21+Source0: http://cpan.metacpan.org/authors/id/K/KA/KAZEBURO/WWW-Form-UrlEncoded-XS-%{version}.tar.gz
22+BuildRoot: %{_tmppath}/%{name}-%{version}-build
2623
2724 %description
2825 XS implementation of parser and builder for application/x-www-form-urlencoded
2926
30-# %package 584
31-# IPS_package_name: library/perl-5/www-form-urlencoded-xs-584
32-# Summary: XS implementation of parser and builder for application/x-www-form-urlencoded
33-# BuildRequires: runtime/perl-584
34-# Requires: runtime/perl-584
27+%if %{build584}
28+%package 584
29+IPS_package_name: library/perl-5/%{ips_cpan_name}-584
30+Summary: XS implementation of parser and builder for application/x-www-form-urlencoded
31+BuildRequires: runtime/perl-584 = *
32+BuildRequires: library/perl-5/json-584
33+BuildRequires: library/perl-5/module-build-tiny-584
34+BuildRequires: library/perl-5/test-simple-584
35+Requires: runtime/perl-584 = *
36+Requires: library/perl-5/%{ips_cpan_name}
37+Requires: library/perl-5/exporter-584
3538
39+%description 584
40+XS implementation of parser and builder for application/x-www-form-urlencoded
41+%endif
42+
43+%if %{build510}
44+%package 510
45+IPS_package_name: library/perl-5/%{ips_cpan_name}-510
46+Summary: XS implementation of parser and builder for application/x-www-form-urlencoded
47+BuildRequires: runtime/perl-510 = *
48+BuildRequires: library/perl-5/json-510
49+BuildRequires: library/perl-5/module-build-tiny-510
50+BuildRequires: library/perl-5/test-simple-510
51+Requires: runtime/perl-510 = *
52+Requires: library/perl-5/%{ips_cpan_name}
53+Requires: library/perl-5/exporter-510
54+
55+%description 510
56+XS implementation of parser and builder for application/x-www-form-urlencoded
57+%endif
58+
59+%if %{build512}
3660 %package 512
37-IPS_package_name: library/perl-5/www-form-urlencoded-xs-512
38-Summary: XS implementation of parser and builder for application/x-www-form-urlencoded
39-BuildRequires: runtime/perl-512
40-Requires: runtime/perl-512
61+IPS_package_name: library/perl-5/%{ips_cpan_name}-512
62+Summary: XS implementation of parser and builder for application/x-www-form-urlencoded
63+BuildRequires: runtime/perl-512 = *
64+BuildRequires: library/perl-5/json-512
65+BuildRequires: library/perl-5/module-build-tiny-512
66+BuildRequires: library/perl-5/test-simple-512
67+Requires: runtime/perl-512 = *
68+Requires: library/perl-5/%{ips_cpan_name}
69+Requires: library/perl-5/exporter-512
70+
71+%description 512
72+XS implementation of parser and builder for application/x-www-form-urlencoded
73+%endif
74+
75+%if %{build516}
76+%package 516
77+IPS_package_name: library/perl-5/%{ips_cpan_name}-516
78+Summary: XS implementation of parser and builder for application/x-www-form-urlencoded
79+BuildRequires: runtime/perl-516 = *
80+BuildRequires: library/perl-5/json-516
81+BuildRequires: library/perl-5/module-build-tiny-516
82+BuildRequires: library/perl-5/test-simple-516
83+Requires: runtime/perl-516 = *
84+Requires: library/perl-5/%{ips_cpan_name}
85+Requires: library/perl-5/exporter-516
86+
87+%description 516
88+XS implementation of parser and builder for application/x-www-form-urlencoded
89+%endif
90+
91+%if %{build520}
92+%package 520
93+IPS_package_name: library/perl-5/%{ips_cpan_name}-520
94+Summary: XS implementation of parser and builder for application/x-www-form-urlencoded
95+BuildRequires: runtime/perl-520 = *
96+BuildRequires: library/perl-5/json-520
97+BuildRequires: library/perl-5/module-build-tiny-520
98+BuildRequires: library/perl-5/test-simple-520
99+Requires: runtime/perl-520 = *
100+Requires: library/perl-5/%{ips_cpan_name}
101+Requires: library/perl-5/exporter-520
102+
103+%description 520
104+XS implementation of parser and builder for application/x-www-form-urlencoded
105+%endif
41106
42107
43108 %prep
44-%setup -q -n %{tarball_name}-%{tarball_version}
109+%setup -q -n %{cpan_name}-%{version}
110+rm -rf %{buildroot}
45111
46112 %build
47-# export PERL5LIB=/usr/perl5/vendor_perl/5.8.4
48-
49-# /usr/perl5/5.8.4/bin/perl Build.PL \
50-# --installdirs vendor \
51-# --destdir $RPM_BUILD_ROOT
52-# /usr/perl5/5.8.4/bin/perl ./Build
53-# /usr/perl5/5.8.4/bin/perl ./Build test
113+build_with_makefile.pl_for() {
114+ perl_ver=$1
115+ test=$2
116+ bindir="/usr/perl5/${perl_ver}/bin"
117+ vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
54118
55-# rm -rf $RPM_BUILD_ROOT
56-# /usr/perl5/5.8.4/bin/perl ./Build install --destdir $RPM_BUILD_ROOT
57-# /usr/perl5/5.8.4/bin/perl ./Build install clean
119+ export PERL5LIB=${vendor_dir}
120+ ${bindir}/perl Makefile.PL PREFIX=%{_prefix} \
121+ DESTDIR=$RPM_BUILD_ROOT \
122+ LIB=${vendor_dir}
123+ make
124+ [ x${test} = 'xwithout_test' ] || make test
125+ make pure_install
126+}
58127
59-export PERL5LIB=/usr/perl5/vendor_perl/5.12
60-/usr/perl5/5.12/bin/perl Build.PL \
61- --installdirs vendor \
62- --destdir $RPM_BUILD_ROOT
63-/usr/perl5/5.12/bin/perl ./Build
64-/usr/perl5/5.12/bin/perl ./Build test
128+build_with_build.pl_for() {
129+ perl_ver=$1
130+ test=$2
131+ bindir="/usr/perl5/${perl_ver}/bin"
132+ vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
65133
134+ export PERL5LIB=${vendor_dir}
135+ ${bindir}/perl Build.PL \
136+ --installdirs vendor \
137+ --destdir $RPM_BUILD_ROOT
138+ ${bindir}/perl ./Build
139+ [ x${test} = 'xwithout_test' ] || ${bindir}/perl ./Build test
140+ ${bindir}/perl ./Build install --destdir $RPM_BUILD_ROOT
141+ ${bindir}/perl ./Build clean
142+}
143+
144+modify_bin_dir() {
145+ perl_ver=$1
146+ if [ -d $RPM_BUILD_ROOT/usr/bin ]
147+ then
148+ [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver} ] || mkdir -p $RPM_BUILD_ROOT/usr/perl5/${perl_ver}
149+ mv $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin
150+ fi
151+
152+ if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin ]
153+ then
154+ for i in $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin/*
155+ do
156+ sed -i.bak -e "s/\/usr\/bin\/env ruby/\/usr\/perl5\/${perl-ver}\/bin\/ruby/" ${i}
157+ [ -f ${i}.bak] || rm -f ${i}.bak
158+ done
159+ fi
160+}
161+
162+modify_man_dir() {
163+ perl_ver=$1
164+ if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man ]
165+ then
166+ if [ -d $RPM_BUILD_ROOT%{_datadir}/man ]
167+ then
168+ rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man
169+ else
170+ mkdir -p $RPM_BUILD_ROOT%{_datadir}
171+ mv $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man $RPM_BUILD_ROOT%{_datadir}/
172+ rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man
173+ fi
174+ if [ %{include_executable} -eq 0 ]
175+ then
176+ rmdir $RPM_BUILD_ROOT/usr/perl5/${perl_ver}
177+ fi
178+
179+ fi
180+}
181+
182+build_for() {
183+ if [ -f Build.PL ];
184+ then
185+ build_with_build.pl_for $*
186+ elif [ -f Makefile.PL ];
187+ then
188+ build_with_makefile.pl_for $*
189+ fi
190+
191+ modify_bin_dir $*
192+ modify_man_dir $*
193+}
194+
195+# To build without test, pass 'without_test' to build_for commaond.
196+# like 'build_for version without_test'
197+%if %{build584}
198+build_for 5.8.4
199+%endif
200+
201+%if %{build510}
202+build_for 5.10
203+%endif
204+
205+%if %{build512}
206+build_for 5.12
207+%endif
208+
209+%if %{build516}
210+build_for 5.16
211+%endif
212+
213+%if %{build520}
214+build_for 5.20
215+%endif
66216
67217 %install
68-rm -rf $RPM_BUILD_ROOT
69-
70-/usr/perl5/5.12/bin/perl ./Build install --destdir $RPM_BUILD_ROOT
71-mkdir -p $RPM_BUILD_ROOT%{_datadir}/man
72-# rm -rf $RPM_BUILD_ROOT/usr/perl5/5.8.4/man
73-mv $RPM_BUILD_ROOT/usr/perl5/5.12/man $RPM_BUILD_ROOT%{_datadir}
74-mv $RPM_BUILD_ROOT%{_datadir}/man/man3 $RPM_BUILD_ROOT%{_datadir}/man/man3perl
75-
76-# rm -rf $RPM_BUILD_ROOT/usr/perl5/5.8.4
77-rm -rf $RPM_BUILD_ROOT/usr/perl5/5.12
218+if [ -d $RPM_BUILD_ROOT%{_prefix}/man ]
219+then
220+ mkdir -p $RPM_BUILD_ROOT%{_datadir}
221+ mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}
222+fi
223+if [ -d $RPM_BUILD_ROOT%{_datadir}/man/man3 ]
224+then
225+ mv $RPM_BUILD_ROOT%{_datadir}/man/man3 $RPM_BUILD_ROOT%{_datadir}/man/man3perl
226+fi
78227
79228 %clean
80-rm -rf $RPM_BUILD_ROOT
229+rm -rf %{buildroot}
81230
82231 %files
83-%defattr(-,root,bin)
84-#%{_prefix}/perl5
85-%attr(0755,root,sys) %dir %{_datadir}
86-%{_mandir}
87-#%attr(0755,root,bin) %dir %{_bindir}
88-#%{_bindir}/*
232+%defattr(0755,root,bin,-)
233+%{_datadir}/man
89234
90-# %files 584
91-# %defattr (-, root, bin)
92-# %{_prefix}/perl5/vendor_perl/5.8.4
235+%if %{build584}
236+%files 584
237+%defattr(0755,root,bin,-)
238+%dir %attr (0755, root, sys) /usr
239+/usr/perl5/vendor_perl/5.8.4
240+%if %{include_executable}
241+/usr/perl5/5.8.4
242+%endif
243+%endif
93244
245+%if %{build510}
246+%files 510
247+%defattr(0755,root,bin,-)
248+%dir %attr (0755, root, sys) /usr
249+/usr/perl5/vendor_perl/5.10
250+%if %{include_executable}
251+/usr/perl5/5.1.0
252+%endif
253+%endif
254+
255+%if %{build512}
94256 %files 512
95-%defattr (-, root, bin)
96-%{_prefix}/perl5/vendor_perl/5.12
257+%defattr(0755,root,bin,-)
258+%dir %attr (0755, root, sys) /usr
259+/usr/perl5/vendor_perl/5.12
260+%if %{include_executable}
261+/usr/perl5/5.12
262+%endif
263+%endif
264+
265+%if %{build516}
266+%files 516
267+%defattr(0755,root,bin,-)
268+%dir %attr (0755, root, sys) /usr
269+/usr/perl5/vendor_perl/5.16
270+%if %{include_executable}
271+/usr/perl5/5.16
272+%endif
273+%endif
274+
275+%if %{build520}
276+%files 520
277+%defattr(0755,root,bin,-)
278+%dir %attr (0755, root, sys) /usr
279+/usr/perl5/vendor_perl/5.20
280+%if %{include_executable}
281+/usr/perl5/5.20
282+%endif
283+%endif
284+
97285
98286 %changelog
287+* Mon Dec 21 2015 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
288+- bump to 0.23 and build packages for perl-510, perl-516 and perl-520
99289 * Fri Jan 30 2015 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
100290 - initial commit
Show on old repository browser