• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revision732f4bc3a03a869b75f7d92a5c12394e9fe206a3 (tree)
Time2015-12-05 14:49:00
AuthorFumihisa TONAKA <fumi.ftnk@gmai...>
CommiterFumihisa TONAKA

Log Message

merge spec_SFEperl-text-aligner to default

Change Summary

Incremental Difference

diff -r 1f5f32b07372 -r 732f4bc3a03a .hgtags
--- a/.hgtags Sat Dec 05 14:47:12 2015 +0900
+++ b/.hgtags Sat Dec 05 14:49:00 2015 +0900
@@ -449,3 +449,4 @@
449449 83353a5412b75133ea60ba6d7fa554007b1e40ac spec_SFEperl-exporter-tiny_base
450450 13f1c15eac6fb1b5b365b63a5a95cc0c70b2dd18 spec_SFEperl-cpan-meta-check_base
451451 f0ce11e9e39c7b529a148cdcfcf13fe905d74535 spec_SFEperl-term-ansicolor_base
452+1f5f32b073727d21072bbcbf5bdea53a146ccae7 spec_SFEperl-text-aligner_base
diff -r 1f5f32b07372 -r 732f4bc3a03a specs/SFEperl-text-aligner.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/SFEperl-text-aligner.spec Sat Dec 05 14:49:00 2015 +0900
@@ -0,0 +1,313 @@
1+%include Solaris.inc
2+
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
9+
10+%define cpan_name Text-Aligner
11+%define sfe_cpan_name text-aligner
12+%define ips_cpan_name text-aligner
13+
14+Summary: module to align text.
15+Name: SFEperl-%{sfe_cpan_name}
16+IPS_package_name: library/perl-5/%{ips_cpan_name}
17+Version: 0.12
18+IPS_component_version: 0.12
19+License: mit
20+URL: https://metacpan.org/pod/Text::Aligner
21+Source0: http://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Text-Aligner-%{version}.tar.gz
22+BuildRoot: %{_tmppath}/%{name}-%{version}-build
23+
24+%description
25+module to align text.
26+
27+%if %{build584}
28+%package 584
29+IPS_package_name: library/perl-5/%{ips_cpan_name}-584
30+Summary: module to align text.
31+BuildRequires: runtime/perl-584 = *
32+BuildRequires: library/perl-5/constant-584
33+BuildRequires: library/perl-5/extutils-makemaker-584
34+BuildRequires: library/perl-5/file-temp-584
35+BuildRequires: library/perl-5/io-584
36+BuildRequires: library/perl-5/module-build-584
37+BuildRequires: library/perl-5/pathtools-584
38+BuildRequires: library/perl-5/test-simple-584
39+Requires: runtime/perl-584 = *
40+Requires: library/perl-5/%{ips_cpan_name}
41+Requires: library/perl-5/exporter-584
42+Requires: library/perl-5/term-ansicolor-584
43+
44+%description 584
45+module to align text.
46+%endif
47+
48+%if %{build510}
49+%package 510
50+IPS_package_name: library/perl-5/%{ips_cpan_name}-510
51+Summary: module to align text.
52+BuildRequires: runtime/perl-510 = *
53+BuildRequires: library/perl-5/constant-510
54+BuildRequires: library/perl-5/extutils-makemaker-510
55+BuildRequires: library/perl-5/file-temp-510
56+BuildRequires: library/perl-5/io-510
57+BuildRequires: library/perl-5/module-build-510
58+BuildRequires: library/perl-5/pathtools-510
59+BuildRequires: library/perl-5/test-simple-510
60+Requires: runtime/perl-510 = *
61+Requires: library/perl-5/%{ips_cpan_name}
62+Requires: library/perl-5/exporter-510
63+Requires: library/perl-5/term-ansicolor-510
64+
65+%description 510
66+module to align text.
67+%endif
68+
69+%if %{build512}
70+%package 512
71+IPS_package_name: library/perl-5/%{ips_cpan_name}-512
72+Summary: module to align text.
73+BuildRequires: runtime/perl-512 = *
74+BuildRequires: library/perl-5/constant-512
75+BuildRequires: library/perl-5/extutils-makemaker-512
76+BuildRequires: library/perl-5/file-temp-512
77+BuildRequires: library/perl-5/io-512
78+BuildRequires: library/perl-5/module-build-512
79+BuildRequires: library/perl-5/pathtools-512
80+BuildRequires: library/perl-5/test-simple-512
81+Requires: runtime/perl-512 = *
82+Requires: library/perl-5/%{ips_cpan_name}
83+Requires: library/perl-5/exporter-512
84+Requires: library/perl-5/term-ansicolor-512
85+
86+%description 512
87+module to align text.
88+%endif
89+
90+%if %{build516}
91+%package 516
92+IPS_package_name: library/perl-5/%{ips_cpan_name}-516
93+Summary: module to align text.
94+BuildRequires: runtime/perl-516 = *
95+BuildRequires: library/perl-5/constant-516
96+BuildRequires: library/perl-5/extutils-makemaker-516
97+BuildRequires: library/perl-5/file-temp-516
98+BuildRequires: library/perl-5/io-516
99+BuildRequires: library/perl-5/module-build-516
100+BuildRequires: library/perl-5/pathtools-516
101+BuildRequires: library/perl-5/test-simple-516
102+Requires: runtime/perl-516 = *
103+Requires: library/perl-5/%{ips_cpan_name}
104+Requires: library/perl-5/exporter-516
105+Requires: library/perl-5/term-ansicolor-516
106+
107+%description 516
108+module to align text.
109+%endif
110+
111+%if %{build520}
112+%package 520
113+IPS_package_name: library/perl-5/%{ips_cpan_name}-520
114+Summary: module to align text.
115+BuildRequires: runtime/perl-520 = *
116+BuildRequires: library/perl-5/constant-520
117+BuildRequires: library/perl-5/extutils-makemaker-520
118+BuildRequires: library/perl-5/file-temp-520
119+BuildRequires: library/perl-5/io-520
120+BuildRequires: library/perl-5/module-build-520
121+BuildRequires: library/perl-5/pathtools-520
122+BuildRequires: library/perl-5/test-simple-520
123+Requires: runtime/perl-520 = *
124+Requires: library/perl-5/%{ips_cpan_name}
125+Requires: library/perl-5/exporter-520
126+Requires: library/perl-5/term-ansicolor-520
127+
128+%description 520
129+module to align text.
130+%endif
131+
132+
133+%prep
134+%setup -q -n %{cpan_name}-%{version}
135+rm -rf %{buildroot}
136+
137+%build
138+build_with_makefile.pl_for() {
139+ perl_ver=$1
140+ test=$2
141+ bindir="/usr/perl5/${perl_ver}/bin"
142+ vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
143+
144+ export PERL5LIB=${vendor_dir}
145+ ${bindir}/perl Makefile.PL PREFIX=%{_prefix} \
146+ DESTDIR=$RPM_BUILD_ROOT \
147+ LIB=${vendor_dir}
148+ make
149+ [ x${test} = 'xwithout_test' ] || make test
150+ make pure_install
151+}
152+
153+build_with_build.pl_for() {
154+ perl_ver=$1
155+ test=$2
156+ bindir="/usr/perl5/${perl_ver}/bin"
157+ vendor_dir="/usr/perl5/vendor_perl/${perl_ver}"
158+
159+ export PERL5LIB=${vendor_dir}
160+ ${bindir}/perl Build.PL \
161+ --installdirs vendor \
162+ --destdir $RPM_BUILD_ROOT
163+ ${bindir}/perl ./Build
164+ [ x${test} = 'xwithout_test' ] || ${bindir}/perl ./Build test
165+ ${bindir}/perl ./Build install --destdir $RPM_BUILD_ROOT
166+ ${bindir}/perl ./Build clean
167+}
168+
169+modify_bin_dir() {
170+ perl_ver=$1
171+ if [ -d $RPM_BUILD_ROOT/usr/bin ]
172+ then
173+ [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver} ] || mkdir -p $RPM_BUILD_ROOT/usr/perl5/${perl_ver}
174+ mv $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin
175+ fi
176+
177+ if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin ]
178+ then
179+ for i in $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/bin/*
180+ do
181+ sed -i.bak -e "s/\/usr\/bin\/env ruby/\/usr\/perl5\/${perl-ver}\/bin\/ruby/" ${i}
182+ [ -f ${i}.bak] || rm -f ${i}.bak
183+ done
184+ fi
185+}
186+
187+modify_man_dir() {
188+ perl_ver=$1
189+ if [ -d $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man ]
190+ then
191+ if [ -d $RPM_BUILD_ROOT%{_datadir}/man ]
192+ then
193+ rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man
194+ else
195+ mkdir -p $RPM_BUILD_ROOT%{_datadir}
196+ mv $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man $RPM_BUILD_ROOT%{_datadir}/
197+ rm -rf $RPM_BUILD_ROOT/usr/perl5/${perl_ver}/man
198+ fi
199+ if [ %{include_executable} -eq 0 ]
200+ then
201+ rmdir $RPM_BUILD_ROOT/usr/perl5/${perl_ver}
202+ fi
203+
204+ fi
205+}
206+
207+build_for() {
208+ if [ -f Build.PL ];
209+ then
210+ build_with_build.pl_for $*
211+ elif [ -f Makefile.PL ];
212+ then
213+ build_with_makefile.pl_for $*
214+ fi
215+
216+ modify_bin_dir $*
217+ modify_man_dir $*
218+}
219+
220+# To build without test, pass 'without_test' to build_for commaond.
221+# like 'build_for version without_test'
222+%if %{build584}
223+build_for 5.8.4
224+%endif
225+
226+%if %{build510}
227+build_for 5.10
228+%endif
229+
230+%if %{build512}
231+build_for 5.12
232+%endif
233+
234+%if %{build516}
235+build_for 5.16
236+%endif
237+
238+%if %{build520}
239+build_for 5.20
240+%endif
241+
242+%install
243+if [ -d $RPM_BUILD_ROOT%{_prefix}/man ]
244+then
245+ mkdir -p $RPM_BUILD_ROOT%{_datadir}
246+ mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}
247+fi
248+if [ -d $RPM_BUILD_ROOT%{_datadir}/man/man3 ]
249+then
250+ mv $RPM_BUILD_ROOT%{_datadir}/man/man3 $RPM_BUILD_ROOT%{_datadir}/man/man3perl
251+fi
252+
253+%clean
254+rm -rf %{buildroot}
255+
256+%files
257+%defattr(0755,root,bin,-)
258+%{_datadir}/man
259+
260+%if %{build584}
261+%files 584
262+%defattr(0755,root,bin,-)
263+%dir %attr (0755, root, sys) /usr
264+/usr/perl5/vendor_perl/5.8.4
265+%if %{include_executable}
266+/usr/perl5/5.8.4
267+%endif
268+%endif
269+
270+%if %{build510}
271+%files 510
272+%defattr(0755,root,bin,-)
273+%dir %attr (0755, root, sys) /usr
274+/usr/perl5/vendor_perl/5.10
275+%if %{include_executable}
276+/usr/perl5/5.1.0
277+%endif
278+%endif
279+
280+%if %{build512}
281+%files 512
282+%defattr(0755,root,bin,-)
283+%dir %attr (0755, root, sys) /usr
284+/usr/perl5/vendor_perl/5.12
285+%if %{include_executable}
286+/usr/perl5/5.12
287+%endif
288+%endif
289+
290+%if %{build516}
291+%files 516
292+%defattr(0755,root,bin,-)
293+%dir %attr (0755, root, sys) /usr
294+/usr/perl5/vendor_perl/5.16
295+%if %{include_executable}
296+/usr/perl5/5.16
297+%endif
298+%endif
299+
300+%if %{build520}
301+%files 520
302+%defattr(0755,root,bin,-)
303+%dir %attr (0755, root, sys) /usr
304+/usr/perl5/vendor_perl/5.20
305+%if %{include_executable}
306+/usr/perl5/5.20
307+%endif
308+%endif
309+
310+
311+%changelog
312+* Sat Dec 05 2015 - Fumihisa TONAKA <fumi.ftnk@gmail.com>
313+- initial commit
Show on old repository browser