• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revision891741e71429414b6e5e96a50c52679dcfb16645 (tree)
Time2015-11-11 22:23:04
AuthorFumihisa TONAKA <fumi.ftnk@gmai...>
CommiterFumihisa TONAKA

Log Message

SFEperl-www-robotrules: build packages for perl-510, perl-516 and perl-520

Change Summary

Incremental Difference

diff -r 5f6ecd5e740d -r 891741e71429 specs/SFEperl-www-robotrules.spec
--- a/specs/SFEperl-www-robotrules.spec Wed Nov 11 22:17:57 2015 +0900
+++ b/specs/SFEperl-www-robotrules.spec Wed Nov 11 22:23:04 2015 +0900
@@ -1,103 +1,253 @@
1-#
2-# spec file for package: SFEperl-www-robotrules
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 6.02
12-%define tarball_name WWW-RobotRules
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-www-robotrules
15-IPS_package_name: library/perl-5/www-robotrules
16-Version: 6.02
10+%define cpan_name WWW-RobotRules
11+%define sfe_cpan_name www-robotrules
12+
13+Summary: database of robots.txt-derived permissions
14+Name: SFEperl-%{sfe_cpan_name}
15+IPS_package_name: library/perl-5/%{sfe_cpan_name}
16+Version: 6.02
1717 IPS_component_version: 6.2
18-Summary: Parse /robots.txt file
19-License: Artistic
20-Distribution: OpenSolaris
21-Vendor: OpenSolaris Community
22-Url: http://search.cpan.org/~lwwwp/%{tarball_name}-%{tarball_version}
23-SUNW_Basedir: %{_basedir}
24-SUNW_Copyright: %{name}.copyright
25-Source0: http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/WWW-RobotRules-%{tarball_version}.tar.gz
26-
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): The libwww-perl mailing list <libwww@perl.org>
32-Meta(info.upstream_url): http://search.cpan.org/~lwwwp/%{tarball_name}-%{tarball_version}
33-Meta(info.classification): org.opensolaris.category.2008:Development/Perl
18+License: perl_5
19+URL: https://metacpan.org/pod/WWW::RobotRules
20+Source0: http://cpan.metacpan.org/authors/id/G/GA/GAAS/WWW-RobotRules-%{version}.tar.gz
21+BuildRoot: %{_tmppath}/%{name}-%{version}-build
3422
3523 %description
36-Parse /robots.txt file
24+database of robots.txt-derived permissions
3725
26+%if %{build584}
3827 %package 584
39-IPS_package_name: library/perl-5/www-robotrules-584
40-Summary: Parse /robots.txt file for perl-584
41-BuildRequires: runtime/perl-584
42-BuildRequires: library/perl-5/file-sharedir-584
43-BuildRequires: library/perl-5/uri-584
44-Requires: runtime/perl-584
28+IPS_package_name: library/perl-5/%{sfe_cpan_name}-584
29+Summary: database of robots.txt-derived permissions
30+BuildRequires: runtime/perl-584 = *
31+BuildRequires: library/perl-5/extutils-makemaker-584
32+Requires: runtime/perl-584 = *
33+Requires: library/perl-5/anydbm_file-584
34+Requires: library/perl-5/fcntl-584
35+Requires: library/perl-5/uri-584
4536
37+%description 584
38+database of robots.txt-derived permissions
39+%endif
40+
41+%if %{build510}
42+%package 510
43+IPS_package_name: library/perl-5/%{sfe_cpan_name}-510
44+Summary: database of robots.txt-derived permissions
45+BuildRequires: runtime/perl-510 = *
46+BuildRequires: library/perl-5/extutils-makemaker-510
47+Requires: runtime/perl-510 = *
48+Requires: library/perl-5/anydbm_file-510
49+Requires: library/perl-5/fcntl-510
50+Requires: library/perl-5/uri-510
51+
52+%description 510
53+database of robots.txt-derived permissions
54+%endif
55+
56+%if %{build512}
4657 %package 512
47-IPS_package_name: library/perl-5/www-robotrules-512
48-Summary: Parse /robots.txt file for perl-512
49-BuildRequires: runtime/perl-512
50-BuildRequires: library/perl-5/file-sharedir-512
51-BuildRequires: library/perl-5/uri-512
52-Requires: runtime/perl-512
58+IPS_package_name: library/perl-5/%{sfe_cpan_name}-512
59+Summary: database of robots.txt-derived permissions
60+BuildRequires: runtime/perl-512 = *
61+BuildRequires: library/perl-5/extutils-makemaker-512
62+Requires: runtime/perl-512 = *
63+Requires: library/perl-5/anydbm_file-512
64+Requires: library/perl-5/fcntl-512
65+Requires: library/perl-5/uri-512
66+
67+%description 512
68+database of robots.txt-derived permissions
69+%endif
70+
71+%if %{build516}
72+%package 516
73+IPS_package_name: library/perl-5/%{sfe_cpan_name}-516
74+Summary: database of robots.txt-derived permissions
75+BuildRequires: runtime/perl-516 = *
76+BuildRequires: library/perl-5/extutils-makemaker-516
77+Requires: runtime/perl-516 = *
78+Requires: library/perl-5/anydbm_file-516
79+Requires: library/perl-5/fcntl-516
80+Requires: library/perl-5/uri-516
81+
82+%description 516
83+database of robots.txt-derived permissions
84+%endif
85+
86+%if %{build520}
87+%package 520
88+IPS_package_name: library/perl-5/%{sfe_cpan_name}-520
89+Summary: database of robots.txt-derived permissions
90+BuildRequires: runtime/perl-520 = *
91+BuildRequires: library/perl-5/extutils-makemaker-520
92+Requires: runtime/perl-520 = *
93+Requires: library/perl-5/anydbm_file-520
94+Requires: library/perl-5/fcntl-520
95+Requires: library/perl-5/uri-520
96+
97+%description 520
98+database of robots.txt-derived permissions
99+%endif
53100
54101
55102 %prep
56-%setup -q -n %{tarball_name}-%{tarball_version}
103+%setup -q -n %{cpan_name}-%{version}
104+rm -rf %{buildroot}
57105
58106 %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
107+build_with_makefile.pl_for() {
108+ perl_ver=$1
109+ test=$2
110+ bindir="/usr/perl5/${perl_ver}/bin"
111+ vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
65112
66-rm -rf $RPM_BUILD_ROOT
67-make pure_install
113+ export PERL5LIB=${vendor_dir}
114+ ${bindir}/perl Makefile.PL PREFIX=%{_prefix} \
115+ DESTDIR=$RPM_BUILD_ROOT \
116+ LIB=${vendor_dir}
117+ make
118+ [ ${test} = 'without_test' ] || make test
119+ make pure_install
120+}
68121
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
122+build_with_build.pl_for() {
123+ perl_ver=$1
124+ test=$2
125+ bindir="/usr/perl5/${perl_ver}/bin"
126+ vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
127+
128+ export PERL5LIB=${vendor_dir}
129+ ${bindir}/perl Build.PL \
130+ --installdirs vendor \
131+ --destdir $RPM_BUILD_ROOT
132+ ${bindir}/perl ./Build
133+ [ ${test} = 'without_test' ] || ${bindir}/perl ./Build test
134+ ${bindir}/perl ./Build install --destdir $RPM_BUILD_ROOT
135+}
136+
137+modify_bin_dir() {
138+ perl_ver=$1
139+ if [ -d $RPM_BUILD_ROOT/usr/bin ]
140+ then
141+ [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver} ] || mkdir -p $RPM_BUILD_ROOT/usr/perl5/${perl_ver}
142+ mv $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin
143+ fi
144+}
145+
146+build_for() {
147+ if [ -f Build.PL ];
148+ then
149+ build_with_build.pl_for $*
150+ elif [ -f Makefile.PL ];
151+ then
152+ build_with_makefile.pl_for $*
153+ fi
154+
155+ modify_bin_dir $*
156+}
157+
158+# To build without test, pass 'without_test' to build_for commaond.
159+# like 'build_for version without_test'
160+%if %{build584}
161+build_for 5.8.4
162+%endif
163+
164+%if %{build510}
165+build_for 5.10
166+%endif
167+
168+%if %{build512}
169+build_for 5.12
170+%endif
171+
172+%if %{build516}
173+build_for 5.16
174+%endif
175+
176+%if %{build520}
177+build_for 5.20
178+%endif
75179
76180 %install
77-make pure_install
78181 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
182+if [ -d $RPM_BUILD_ROOT%{_prefix}/man ]
183+then
184+ mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}
185+fi
186+if [ -d $RPM_BUILD_ROOT%{_datadir}/man/man3 ]
187+then
188+ mv $RPM_BUILD_ROOT%{_datadir}/man/man3 $RPM_BUILD_ROOT%{_datadir}/man/man3perl
189+fi
81190
82191 %clean
83-rm -rf $RPM_BUILD_ROOT
192+rm -rf %{buildroot}
84193
85194 %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}/*
195+%defattr(0755,root,bin,-)
196+%{_datadir}/man
92197
198+%if %{build584}
93199 %files 584
94-%defattr (-, root, bin)
95-%{_prefix}/perl5/vendor_perl/5.8.4
200+%defattr(0755,root,bin,-)
201+%dir %attr (0755, root, sys) /usr
202+/usr/perl5/vendor_perl/5.8.4
203+%if %{include_executable}
204+/usr/perl5/5.8.4
205+%endif
206+%endif
96207
208+%if %{build510}
209+%files 510
210+%defattr(0755,root,bin,-)
211+%dir %attr (0755, root, sys) /usr
212+/usr/perl5/vendor_perl/5.10
213+%if %{include_executable}
214+/usr/perl5/5.1.0
215+%endif
216+%endif
217+
218+%if %{build512}
97219 %files 512
98-%defattr (-, root, bin)
99-%{_prefix}/perl5/vendor_perl/5.12
220+%defattr(0755,root,bin,-)
221+%dir %attr (0755, root, sys) /usr
222+/usr/perl5/vendor_perl/5.12
223+%if %{include_executable}
224+/usr/perl5/5.12
225+%endif
226+%endif
227+
228+%if %{build516}
229+%files 516
230+%defattr(0755,root,bin,-)
231+%dir %attr (0755, root, sys) /usr
232+/usr/perl5/vendor_perl/5.16
233+%if %{include_executable}
234+/usr/perl5/5.16
235+%endif
236+%endif
237+
238+%if %{build520}
239+%files 520
240+%defattr(0755,root,bin,-)
241+%dir %attr (0755, root, sys) /usr
242+/usr/perl5/vendor_perl/5.20
243+%if %{include_executable}
244+/usr/perl5/5.20
245+%endif
246+%endif
247+
100248
101249 %changelog
250+* Wed Nov 11 2015 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
251+- build packages for perl-510, perl-516 and perl-520
102252 * Thu Jun 14 2012 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
103253 - initial commit
Show on old repository browser