• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revisiona115f09b045755a3e08824077a90a92340490ffc (tree)
Time2016-01-25 21:50:00
AuthorOsamu Tabata <cantimerny.g@gmai...>
CommiterOsamu Tabata

Log Message

spec_SFEghc-bytestring-builder: build only 7.10

Change Summary

Incremental Difference

diff -r 34ab93b51000 -r a115f09b0457 specs/SFEghc-bytestring-builder.spec
--- a/specs/SFEghc-bytestring-builder.spec Mon Jan 25 21:39:17 2016 +0900
+++ b/specs/SFEghc-bytestring-builder.spec Mon Jan 25 21:50:00 2016 +0900
@@ -9,11 +9,8 @@
99 %include base.inc
1010 %include usr-gnu.inc
1111
12-%define build78 1
13-%define build710 1
14-
15-%define ghc_ver_78 7.8.3
16-%define ghc_ver_710 7.10.3
12+%define ghc_ver 7.10.3
13+%include yesod-version-sets.inc
1714
1815 %define oracle_solaris_11_2 %(grep 'Oracle Solaris 11.2' /etc/release > /dev/null ; if [ $? -eq 0 ]; then echo '1'; else echo '0'; fi)
1916
@@ -32,10 +29,10 @@
3229 SUNW_BaseDir: %{_basedir}
3330 BuildRoot: %{_tmppath}/%{name}-%{version}-build
3431
35-BuildRequires: developer/ghc-78 = %{ghc_ver_78}
36-BuildRequires: developer/ghc-78/prof = %{ghc_ver_78}
37-BuildRequires: developer/ghc-710 = %{ghc_ver_710}
38-BuildRequires: developer/ghc-710/prof = %{ghc_ver_710}
32+BuildRequires: developer/ghc-710 = %{ghc_ver}
33+BuildRequires: developer/ghc-710/prof = %{ghc_ver}
34+BuildRequires: library/ghc/hscolour-710 = %{hscolour_ver}
35+BuildRequires: library/ghc/hscolour-710/prof = %{hscolour_ver}
3936
4037 %description
4138 This is the bytestring builder that is debuting in bytestring-0.10.4.0, which
@@ -63,72 +60,19 @@
6360 deprecated in 7.10.
6461
6562
66-%if %{build78}
67-%package 78
68-IPS_package_name: library/ghc/%{pname}-78
69-Summary: bytestring-builder system
70-SUNW_BaseDir: %{_basedir}
71-%include default-depend.inc
72-Requires: developer/ghc-78 = %{ghc_ver_78}
73-
74-%package prof-78
75-IPS_package_name: library/ghc/%{pname}-78/prof
76-Summary: %{summary} - profiling libraries
77-SUNW_BaseDir: %{_basedir}
78-%include default-depend.inc
79-Requires: developer/ghc-78/prof = %{ghc_ver_78}
80-Requires: library/ghc/%{pname}-78
81-
82-%package doc-78
83-IPS_package_name: library/ghc/%{pname}-78/doc
84-Summary: %{summary} - doc files
85-SUNW_BaseDir: %{_basedir}
86-%include default-depend.inc
87-Requires: library/ghc/%{pname}-78
88-
89-%description 78
90-This is the bytestring builder that is debuting in bytestring-0.10.4.0, which
91-should be shipping with GHC 7.8, probably late in 2013. This builder has
92-several nice simplifications and improvements, and more out-of-box
93-functionality than the older blaze-builder.
94-.
95-Note that this package detects which version of bytestring you are compiling
96-against, and if you are compiling against bytestring-0.10.4 or later, will
97-be an empty package.
98-.
99-This package lets the new interface and implementation be used with most
100-older compilers without upgrading bytestring, which can be rather
101-problematic. In conjunction with blaze-builder-0.4 or later, which
102-offers an implementation of blaze-builder in terms of bytestring-builder,
103-this should let most people try the new interface and implementation without
104-causing undue compatibility problems with packages that depend on
105-blaze-builder.
106-.
107-GHC 7.6 did debut an almost identical interface and implementation, but with
108-slightly different module names and organization. Trying to re-export/rename
109-the builder provided with 7.6 did not turn out to be very practical, because
110-this interface includes new functions that rely on Builder internals,
111-which are not exported in 7.6. Furthermore, these module names should be
112-deprecated in 7.10.
113-
114-
115-%endif
116-
117-
118-%if %{build710}
11963 %package 710
12064 IPS_package_name: library/ghc/%{pname}-710
12165 Summary: bytestring-builder system
12266 SUNW_BaseDir: %{_basedir}
12367 %include default-depend.inc
124-Requires: developer/ghc-710 = %{ghc_ver_710}
68+Requires: developer/ghc-710 = %{ghc_ver}
12569
12670 %package prof-710
12771 IPS_package_name: library/ghc/%{pname}-710/prof
12872 Summary: %{summary} - profiling libraries
12973 SUNW_BaseDir: %{_basedir}
13074 %include default-depend.inc
131-Requires: developer/ghc-710/prof = %{ghc_ver_710}
75+Requires: developer/ghc-710/prof = %{ghc_ver}
13276 Requires: library/ghc/%{pname}-710
13377
13478 %package doc-710
@@ -163,17 +107,12 @@
163107 which are not exported in 7.6. Furthermore, these module names should be
164108 deprecated in 7.10.
165109
166-
167-%endif
168-
169-
170110 %prep
171111 %setup -q -n %{pname}-%{version}
172112
173113 %build
174114
175115 build_for () {
176- ghc_version=$1
177116 CPUNUM=$(psrinfo | gawk '$2=="on-line"{cpus++}END{print (cpus==0)?1:cpus}')
178117 CPUS=$(test $CPUNUM -ge 4 && echo 4 || echo $CPUNUM)
179118 # Need to use same gcc as we used to build ghc (gcc 4.x)
@@ -192,58 +131,51 @@
192131 export LDFLAGS="-L%{_libdir} -R%{_libdir}"
193132 %endif
194133
195- GHC=/usr/gnu/bin/ghc-${ghc_version}
196- GHC_PKG=/usr/gnu/bin/ghc-pkg-${ghc_version}
197- HSC2HS=/usr/gnu/bin/hsc2hs-${ghc_version}
198- HADDOCK=/usr/gnu/bin/haddock-ghc-${ghc_version}
134+ GHC=/usr/gnu/bin/ghc-%{ghc_ver}
135+ GHC_PKG=/usr/gnu/bin/ghc-pkg-%{ghc_ver}
136+ HSC2HS=/usr/gnu/bin/hsc2hs-%{ghc_ver}
137+ HADDOCK=/usr/gnu/bin/haddock-ghc-%{ghc_ver}
199138 VERBOSE=--verbose=2
200139
201140 chmod a+x ./Setup.hs
202- /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs clean
203- /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs configure --prefix=%{_prefix} \
141+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs clean
142+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs configure --prefix=%{_prefix} \
204143 --libdir=%{_libdir} \
205- --docdir=%{_datadir}/doc/ghc-${ghc_version}/%{pname}-%{version} \
206- --htmldir=%{_datadir}/doc/ghc-${ghc_version}/html/libraries/%{pname}-%{version} \
144+ --docdir=%{_datadir}/doc/ghc-%{ghc_ver}/%{pname}-%{version} \
145+ --htmldir=%{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/%{pname}-%{version} \
207146 --libsubdir='$compiler/$pkgid' \
208147 --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} --with-haddock=${HADDOCK} \
209148 --haddock-option="--html" \
210149 --enable-library-profiling \
211150 ${VERBOSE}
212151
213- /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs build ${VERBOSE} -j$CPUS
214- # /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
152+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs build ${VERBOSE} -j$CPUS
153+ # /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
215154
216- install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}
217- /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf
218- /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
155+ install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}
156+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf
157+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
219158
220- install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/
221- install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/%{pname}-%{version}.conf
159+ install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/
160+ install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/%{pname}-%{version}.conf
222161
223162 # LICENCE FILE
224- # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-${ghc_version}
163+ # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-%{ghc_ver}
225164 # # Prepare lists of files for packaging
226165 # cd %{_builddir}/%{pname}-%{version}
227- # find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-${ghc_version}" > pkg-prof-${ghc_version}.files
228- # find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-${ghc_version}" >> pkg-prof-${ghc_version}.files
229- find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-all-${ghc_version}.files
230- sort pkg-all-${ghc_version}.files > pkg-all-sort-${ghc_version}.files
231- cp pkg-all-sort-${ghc_version}.files pkg-${ghc_version}.files
232- find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-doc-${ghc_version}.files
233- sort pkg-doc-${ghc_version}.files > pkg-doc-sort-${ghc_version}.files
166+ # find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-%{ghc_ver}" > pkg-prof-%{ghc_ver}.files
167+ # find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-%{ghc_ver}" >> pkg-prof-%{ghc_ver}.files
168+ find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-all-%{ghc_ver}.files
169+ sort pkg-all-%{ghc_ver}.files > pkg-all-sort-%{ghc_ver}.files
170+ cp pkg-all-sort-%{ghc_ver}.files pkg-%{ghc_ver}.files
171+ find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-doc-%{ghc_ver}.files
172+ sort pkg-doc-%{ghc_ver}.files > pkg-doc-sort-%{ghc_ver}.files
234173 # Clean up syntax for %files section
235- cat pkg-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-${ghc_version}.files
236- cat pkg-doc-sort-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-${ghc_version}.files
174+ cat pkg-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-%{ghc_ver}.files
175+ cat pkg-doc-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-%{ghc_ver}.files
237176 }
238-
177+build_for
239178
240-%if %{build78}
241-build_for 7.8.3
242-%endif
243-
244-%if %{build710}
245-build_for 7.10.3
246-%endif
247179
248180 %install
249181
@@ -259,50 +191,36 @@
259191 # %post
260192 # The %install section above will only install files
261193 # We need to register the package with ghc-pkg for ghc to find it
262-# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-${ghc_version}/%{cname}-%{version}/%{cname}-%{version}.conf
194+# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-%{ghc_ver}/%{cname}-%{version}/%{cname}-%{version}.conf
263195
264196 # %post -n SFEghc78-bytestring-builder-doc
265-# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
197+# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
266198
267199 # %preun
268200 # # Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
269201 # /usr/bin/ghc-pkg unregister --global --force %{pname}-%{version}
270202
271203 # %postun -n SFEghc78-bytestring-builder-doc
272-# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-${ghc_version}/html/libraries/gen_contents_index ] ; then
273-# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
204+# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/gen_contents_index ] ; then
205+# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
274206 # fi
275-
276207 %endif
277208
278-
279-%if %{build78}
280-%files 78 -f pkg-%{ghc_ver_78}.files
209+%files 710 -f pkg-%{ghc_ver}.files
281210 %defattr (-, root, bin)
282211
283-# %files prof-78 -f pkg-prof-%{ghc_ver_78}.files
212+# %files prof-710 -f pkg-prof-%{ghc_ver}.files
284213 # %defattr (-, root, bin)
285214
286-%files doc-78 -f pkg-doc-%{ghc_ver_78}.files
215+%files doc-710 -f pkg-doc-%{ghc_ver}.files
287216 %defattr(-,root,bin)
288217 %dir %attr (0755, root, sys) %{_datadir}
289218 %dir %attr (0755, root, other) %{_docdir}
290-%endif
291-
292-%if %{build710}
293-%files 710 -f pkg-%{ghc_ver_710}.files
294-%defattr (-, root, bin)
295219
296-# %files prof-710 -f pkg-prof-%{ghc_ver_710}.files
297-# %defattr (-, root, bin)
298-
299-%files doc-710 -f pkg-doc-%{ghc_ver_710}.files
300-%defattr(-,root,bin)
301-%dir %attr (0755, root, sys) %{_datadir}
302-%dir %attr (0755, root, other) %{_docdir}
303-%endif
304220
305221 %changelog
222+* Tue Jan 25 2016 - Osamu Tabata<cantimerny.g@gmail.com>
223+- build only 7.10
306224 * Tue Jan 20 2016 - Osamu Tabata<cantimerny.g@gmail.com>
307225 - modify Requires
308226 * Tue Jan 19 2016 - Osamu Tabata<cantimerny.g@gmail.com>
Show on old repository browser