• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revision78cbc2d29af61ff9faef5024934ccab3e926d2a5 (tree)
Time2020-02-14 17:03:25
AuthorFumihisa TONAKA <fumi.ftnk@gmai...>
CommiterFumihisa TONAKA

Log Message

SFEperl-digest-sha1: only build for JPOSUG perl packages

Change Summary

Incremental Difference

diff -r 5f62850007e2 -r 78cbc2d29af6 specs/SFEperl-digest-sha1.spec
--- a/specs/SFEperl-digest-sha1.spec Fri May 11 17:54:14 2018 +0900
+++ b/specs/SFEperl-digest-sha1.spec Fri Feb 14 17:03:25 2020 +0900
@@ -1,11 +1,7 @@
11 %include Solaris.inc
22
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 build522 %( if [ -x /usr/perl5/5.22/bin/perl ]; then echo '1'; else echo '0'; fi)
8-%define build526 %( if [ -x /usr/perl5/5.26/bin/perl ]; then echo '1'; else echo '0'; fi)
3+%define build526 %( if [ -x /opt/jposug/perl5/5.26/bin/perl ]; then echo '1'; else echo '0'; fi)
4+%define build530 %( if [ -x /opt/jposug/perl5/5.30/bin/perl ]; then echo '1'; else echo '0'; fi)
95 %define enable_test %( if [ "x${PERL_DISABLE_TEST}" = 'xtrue' ]; then echo '0'; else echo '1'; fi )
106
117 %define include_executable 0
@@ -28,119 +24,57 @@
2824 %description
2925 Perl interface to the SHA-1 algorithm
3026
31-%if %{build584}
32-%package 584
33-IPS_package_name: library/perl-5/%{ips_cpan_name}-584
34-Summary: Perl interface to the SHA-1 algorithm
35-BuildRequires: runtime/perl-584 = *
36-BuildRequires: library/perl-5/extutils-makemaker-584
37-%if %{enable_test}
38-BuildRequires: library/perl-5/digest-584
39-%endif
40-Requires: runtime/perl-584 = *
41-Requires: library/perl-5/%{ips_cpan_name}
42-Requires: library/perl-5/digest-584
43-
44-%description 584
45-Perl interface to the SHA-1 algorithm
46-%endif
47-
48-%if %{build510}
49-%package 510
50-IPS_package_name: library/perl-5/%{ips_cpan_name}-510
51-Summary: Perl interface to the SHA-1 algorithm
52-BuildRequires: runtime/perl-510 = *
53-BuildRequires: library/perl-5/extutils-makemaker-510
54-BuildRequires: library/perl-5/digest-510
55-Requires: runtime/perl-510 = *
56-Requires: library/perl-5/%{ips_cpan_name}
57-Requires: library/perl-5/digest-510
58-
59-%description 510
60-Perl interface to the SHA-1 algorithm
61-%endif
62-
63-%if %{build512}
64-%package 512
65-IPS_package_name: library/perl-5/%{ips_cpan_name}-512
66-Summary: Perl interface to the SHA-1 algorithm
67-BuildRequires: runtime/perl-512 = *
68-BuildRequires: library/perl-5/extutils-makemaker-512
69-%if %{enable_test}
70-BuildRequires: library/perl-5/digest-512
71-%endif
72-Requires: runtime/perl-512 = *
73-Requires: library/perl-5/%{ips_cpan_name}
74-Requires: library/perl-5/digest-512
75-
76-%description 512
77-Perl interface to the SHA-1 algorithm
78-%endif
79-
80-%if %{build516}
81-%package 516
82-IPS_package_name: library/perl-5/%{ips_cpan_name}-516
83-Summary: Perl interface to the SHA-1 algorithm
84-BuildRequires: runtime/perl-516 = *
85-BuildRequires: library/perl-5/extutils-makemaker-516
86-Requires: library/perl-5/%{ips_cpan_name}
87-%if %{enable_test}
88-BuildRequires: library/perl-5/digest-516
89-%endif
90-Requires: runtime/perl-516 = *
91-Requires: library/perl-5/%{ips_cpan_name}
92-Requires: library/perl-5/digest-516
93-
94-%description 516
95-Perl interface to the SHA-1 algorithm
96-%endif
97-
98-%if %{build522}
99-%package 522
100-IPS_package_name: library/perl-5/%{ips_cpan_name}-522
101-Summary: Perl interface to the SHA-1 algorithm
102-BuildRequires: runtime/perl-522 = *
103-BuildRequires: library/perl-5/extutils-makemaker-522
104-%if %{enable_test}
105-BuildRequires: library/perl-5/digest-522
106-%endif
107-Requires: runtime/perl-522 = *
108-Requires: library/perl-5/%{ips_cpan_name}
109-Requires: library/perl-5/digest-522
110-
111-%description 522
112-Perl interface to the SHA-1 algorithm
113-%endif
114-
11527 %if %{build526}
11628 %package 526
117-IPS_package_name: library/perl-5/%{ips_cpan_name}-526
29+IPS_package_name: library/perl-5/%{ips_cpan_name}-526jposug
11830 Summary: Perl interface to the SHA-1 algorithm
119-BuildRequires: runtime/perl-526 = *
120-BuildRequires: library/perl-5/extutils-makemaker-526
31+BuildRequires: runtime/perl-526jposug = *
32+BuildRequires: library/perl-5/extutils-makemaker-526jposug
12133 %if %{enable_test}
122-BuildRequires: library/perl-5/digest-526
34+BuildRequires: library/perl-5/digest-526jposug
12335 %endif
124-Requires: runtime/perl-526 = *
125-Requires: library/perl-5/%{ips_cpan_name}
126-Requires: library/perl-5/digest-526
36+Requires: runtime/perl-526jposug = *
37+# Requires: library/perl-5/%{ips_cpan_name}
38+Requires: library/perl-5/digest-526jposug
12739
12840 %description 526
12941 Perl interface to the SHA-1 algorithm
13042 %endif
13143
44+%if %{build530}
45+%package 530
46+IPS_package_name: library/perl-5/%{ips_cpan_name}-530jposug
47+Summary: Perl interface to the SHA-1 algorithm
48+BuildRequires: runtime/perl-530jposug = *
49+BuildRequires: jposug/library/perl-5/extutils-makemaker-530jposug
50+%if %{enable_test}
51+BuildRequires: jposug/library/perl-5/digest-530jposug
52+%endif
53+Requires: runtime/perl-530jposug = *
54+# Requires: library/perl-5/%{ips_cpan_name}
55+Requires: jposug/library/perl-5/digest-530jposug
56+
57+%description 530
58+Perl interface to the SHA-1 algorithm
59+%endif
60+
61+
13262 %prep
13363 %setup -q -n %{cpan_name}-%{version}
13464 [ -d %{buildroot} ] && rm -rf %{buildroot}
13565
13666 %build
13767 build_with_makefile.pl_for() {
68+ [ -f xdefine ] && rm -f xdefine
69+ [ -d blib ] && rm -rf blib
13870 perl_ver=$1
13971 test=$2
140- perl_dir_prefix="/usr/perl5/${perl_ver}"
72+ prefix=/opt/jposug
73+
74+ perl_dir_prefix="${prefix}/perl5/${perl_ver}"
14175 bindir="${perl_dir_prefix}/bin"
142- vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
143- site_dir="/usr/perl5/site_perl/${perl_ver}"
76+ vendor_dir="${prefix}/perl5/vendor_perl/${perl_ver}"
77+ site_dir="${prefix}/perl5/site_perl/${perl_ver}"
14478
14579 export PERL5LIB=${vendor_dir}
14680 %if %{install_to_site_dir}
@@ -149,25 +83,26 @@
14983 perl_libdir="${vendor_dir}"
15084 %endif
15185
152- ${bindir}/perl Makefile.PL PREFIX=%{_prefix} \
86+ ${bindir}/perl Makefile.PL PREFIX=${prefix} \
15387 DESTDIR=$RPM_BUILD_ROOT \
15488 LIB=${perl_libdir}
15589
156- export CC='cc -m32'
157- export LD='cc -m32'
158- echo ${perl_ver} | egrep '5\.(84|12)' > /dev/null || (export CC='cc -m64'; export LD='cc -m64')
90+ export CC='cc -m64'
91+ export LD='cc -m64'
15992 make CC="${CC}" LD="${LD}"
16093 [ "x${PERL_DISABLE_TEST}" = 'xtrue' ] || [ "x${test}" = 'xwithout_test' ] || make test CC="${CC}" "LD=${LD}"
16194 make pure_install
16295 }
16396
16497 build_with_build.pl_for() {
165- perl_ver=$1
16698 test=$2
167- perl_dir_prefix="/usr/perl5/${perl_ver}"
99+ perl_ver=$$1
100+ prefix=/opt/jposug
101+
102+ perl_dir_prefix="${prefix}/perl5/${perl_ver}"
168103 bindir="${perl_dir_prefix}/bin"
169- vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
170- site_dir="/usr/perl5/site_perl/${perl_ver}"
104+ vendor_dir="${prefix}/perl5/vendor_perl/${perl_ver}"
105+ site_dir="${prefix}/perl5/site_perl/${perl_ver}"
171106
172107 %if %{install_to_site_dir}
173108 installdir='site'
@@ -186,17 +121,19 @@
186121
187122 modify_bin_dir() {
188123 perl_ver=$1
189- if [ -d $RPM_BUILD_ROOT/usr/bin ]
124+ prefix=/opt/jposug
125+
126+ if [ -d $RPM_BUILD_ROOT/${prefix}/bin ]
190127 then
191- [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver} ] || mkdir -p $RPM_BUILD_ROOT/usr/perl5/${perl_ver}
192- mv $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin
128+ [ -d ${RPM_BUILD_ROOT}${prefix}/perl5/${perl_ver} ] || mkdir -p ${RPM_BUILD_ROOT}${prefix}/perl5/${perl_ver}
129+ mv $RPM_BUILD_ROOT${prefix}/bin $RPM_BUILD_ROOT/${prefix}/perl5/${perl_ver}/bin
193130 fi
194-
195- if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin ]
131+
132+ if [ -d ${RPM_BUILD_ROOT}${prefix}/perl5/${perl_ver}/bin ]
196133 then
197- for i in $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin/*
134+ for i in ${RPM_BUILD_ROOT}${prefix}/perl5/${perl_ver}/bin/*
198135 do
199- sed -i.bak -e "s!/usr/bin/env perl!/usr/perl5/${perl-ver}/bin/perl!" ${i}
136+ sed -i.bak -e "s!/usr/bin/env perl!${prefix}/perl5/${perl_ver}/bin/perl!" ${i}
200137 [ -f ${i}.bak] || rm -f ${i}.bak
201138 done
202139 fi
@@ -204,19 +141,21 @@
204141
205142 modify_man_dir() {
206143 perl_ver=$1
207- if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man ]
144+ prefix=/opt/jposug
145+
146+ if [ -d $RPM_BUILD_ROOT${prefix}/perl5/${perl_ver}/man ]
208147 then
209148 if [ -d $RPM_BUILD_ROOT%{_datadir}/man ]
210149 then
211- rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man
150+ rm -rf $RPM_BUILD_ROOT${prefix}/perl5/${perl_ver}/man
212151 else
213152 mkdir -p $RPM_BUILD_ROOT%{_datadir}
214- mv $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man $RPM_BUILD_ROOT%{_datadir}/
215- rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man
153+ mv $RPM_BUILD_ROOT${prefix}/perl5/${perl_ver}/man $RPM_BUILD_ROOT%{_datadir}/
154+ rm -rf $RPM_BUILD_ROOT${prefix}/perl5/${perl_ver}/man
216155 fi
217156 if [ %{include_executable} -eq 0 ]
218157 then
219- rmdir $RPM_BUILD_ROOT/usr/perl5/${perl_ver}
158+ rmdir $RPM_BUILD_ROOT${prefix}/perl5/${perl_ver}
220159 fi
221160
222161 fi
@@ -237,28 +176,12 @@
237176
238177 # To build without test, pass 'without_test' to build_for commaond.
239178 # like 'build_for version without_test'
240-%if %{build584}
241-build_for 5.8.4
242-%endif
243-
244-%if %{build510}
245-build_for 5.10
179+%if %{build526}
180+build_for 5.26
246181 %endif
247182
248-%if %{build512}
249-build_for 5.12
250-%endif
251-
252-%if %{build516}
253-build_for 5.16
254-%endif
255-
256-%if %{build522}
257-build_for 5.22
258-%endif
259-
260-%if %{build526}
261-build_for 5.26
183+%if %{build530}
184+build_for 5.30
262185 %endif
263186
264187 %install
@@ -267,6 +190,18 @@
267190 mkdir -p $RPM_BUILD_ROOT%{_datadir}
268191 mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}
269192 fi
193+
194+if [ -d $RPM_BUILD_ROOT/opt/jposug/man ]
195+then
196+ if [ -d $RPM_BUILD_ROOT%{_datadir}/man ]
197+ then
198+ rm -rf $RPM_BUILD_ROOT/opt/jposug/man
199+ else
200+ [ -d $RPM_BUILD_ROOT%{_datadir} ] || mkdir -p $RPM_BUILD_ROOT%{_datadir}
201+ mv $RPM_BUILD_ROOT/opt/jposug/man $RPM_BUILD_ROOT%{_datadir}
202+ fi
203+fi
204+
270205 if [ -d $RPM_BUILD_ROOT%{_datadir}/man/man3 ]
271206 then
272207 mv $RPM_BUILD_ROOT%{_datadir}/man/man3 $RPM_BUILD_ROOT%{_datadir}/man/man3perl
@@ -279,91 +214,37 @@
279214 %defattr(0755,root,bin,-)
280215 %{_datadir}/man
281216
282-%if %{build584}
283-%files 584
217+%if %{build526}
218+%files 526
284219 %defattr(0755,root,bin,-)
285-%dir %attr (0755, root, sys) /usr
220+%dir %attr (0755, root, sys) /opt
286221 %if %{install_to_site_dir}
287-/usr/perl5/site_perl/5.8.4
222+/opt/jposug/perl5/site_perl/5.26
288223 %else
289-/usr/perl5/vendor_perl/5.8.4
224+/opt/jposug/perl5/vendor_perl/5.26
290225 %endif
291226 %if %{include_executable}
292-/usr/perl5/5.8.4
293-%endif
294-%endif
295-
296-%if %{build510}
297-%files 510
298-%defattr(0755,root,bin,-)
299-%dir %attr (0755, root, sys) /usr
300-%if %{install_to_site_dir}
301-/usr/perl5/site_perl/5.10
302-%else
303-/usr/perl5/vendor_perl/5.10
304-%endif
305-%if %{include_executable}
306-/usr/perl5/5.1.0
227+/opt/jposug/perl5/5.26
307228 %endif
308229 %endif
309230
310-%if %{build512}
311-%files 512
231+%if %{build530}
232+%files 530
312233 %defattr(0755,root,bin,-)
313-%dir %attr (0755, root, sys) /usr
234+%dir %attr (0755, root, sys) /opt
314235 %if %{install_to_site_dir}
315-/usr/perl5/site_perl/5.12
236+/opt/jposug/perl5/site_perl/5.30
316237 %else
317-/usr/perl5/vendor_perl/5.12
318-%endif
319-%if %{include_executable}
320-/usr/perl5/5.12
321-%endif
322-%endif
323-
324-%if %{build516}
325-%files 516
326-%defattr(0755,root,bin,-)
327-%dir %attr (0755, root, sys) /usr
328-%if %{install_to_site_dir}
329-/usr/perl5/site_perl/5.16
330-%else
331-/usr/perl5/vendor_perl/5.16
238+/opt/jposug/perl5/vendor_perl/5.30
332239 %endif
333240 %if %{include_executable}
334-/usr/perl5/5.16
335-%endif
336-%endif
337-
338-%if %{build522}
339-%files 522
340-%defattr(0755,root,bin,-)
341-%dir %attr (0755, root, sys) /usr
342-%if %{install_to_site_dir}
343-/usr/perl5/site_perl/5.22
344-%else
345-/usr/perl5/vendor_perl/5.22
346-%endif
347-%if %{include_executable}
348-/usr/perl5/5.22
349-%endif
350-%endif
351-
352-%if %{build526}
353-%files 526
354-%defattr(0755,root,bin,-)
355-%dir %attr (0755, root, sys) /usr
356-%if %{install_to_site_dir}
357-/usr/perl5/site_perl/5.26
358-%else
359-/usr/perl5/vendor_perl/5.26
360-%endif
361-%if %{include_executable}
362-/usr/perl5/5.26
241+/opt/jposug/perl5/5.30
363242 %endif
364243 %endif
365244
366245 %changelog
246+* Fri Feb 14 2020 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
247+- only build for JPOSUG perl packages
367248 * Fri May 11 2018 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
368249 - build packages for perl-52{2,6}
369250 * Wed Nov 11 2015 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
Show on old repository browser