• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revision673f01727bd447c70aa1f0061955dd538d9e59a6 (tree)
Time2016-01-26 05:38:50
AuthorOsamu Tabata <cantimerny.g@gmai...>
CommiterOsamu Tabata

Log Message

spec_SFEghc-data-default-class: build only 7.10

Change Summary

Incremental Difference

diff -r bd26643535d2 -r 673f01727bd4 specs/SFEghc-data-default-class.spec
--- a/specs/SFEghc-data-default-class.spec Tue Jan 26 05:31:24 2016 +0900
+++ b/specs/SFEghc-data-default-class.spec Tue Jan 26 05:38:50 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,57 +29,27 @@
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 A class for types with a default value
4239
43-%if %{build78}
44-%package 78
45-IPS_package_name: library/ghc/%{pname}-78
46-Summary: data-default-class system
47-SUNW_BaseDir: %{_basedir}
48-%include default-depend.inc
49-Requires: library/ghc/ghc-78 = %{ghc_ver_78}
50-
51-%package prof-78
52-IPS_package_name: library/ghc/%{pname}-78/prof
53-Summary: %{summary} - profiling libraries
54-SUNW_BaseDir: %{_basedir}
55-%include default-depend.inc
56-Requires: developer/ghc-78/prof = %{ghc_ver_78}
57-Requires: library/ghc/%{pname}-78
58-
59-%package doc-78
60-IPS_package_name: library/ghc/%{pname}-78/doc
61-Summary: %{summary} - doc files
62-SUNW_BaseDir: %{_basedir}
63-%include default-depend.inc
64-Requires: library/ghc/%{pname}-78
65-
66-%description 78
67-A class for types with a default value
68-
69-%endif
70-
71-
72-%if %{build710}
7340 %package 710
7441 IPS_package_name: library/ghc/%{pname}-710
7542 Summary: data-default-class system
7643 SUNW_BaseDir: %{_basedir}
7744 %include default-depend.inc
78-Requires: library/ghc/ghc-710 = %{ghc_ver_710}
45+Requires: library/ghc/ghc-710 = %{ghc_ver}
7946
8047 %package prof-710
8148 IPS_package_name: library/ghc/%{pname}-710/prof
8249 Summary: %{summary} - profiling libraries
8350 SUNW_BaseDir: %{_basedir}
8451 %include default-depend.inc
85-Requires: developer/ghc-710/prof = %{ghc_ver_710}
52+Requires: developer/ghc-710/prof = %{ghc_ver}
8653 Requires: library/ghc/%{pname}-710
8754
8855 %package doc-710
@@ -95,14 +62,11 @@
9562 %description 710
9663 A class for types with a default value
9764
98-%endif
99-
10065
10166 %prep
10267 %setup -q -n %{pname}-%{version}
10368
10469 %build
105-
10670 build_for () {
10771 ghc_version=$1
10872 CPUNUM=$(psrinfo | gawk '$2=="on-line"{cpus++}END{print (cpus==0)?1:cpus}')
@@ -123,60 +87,53 @@
12387 export LDFLAGS="-L%{_libdir} -R%{_libdir}"
12488 %endif
12589
126- GHC=/usr/gnu/bin/ghc-${ghc_version}
127- GHC_PKG=/usr/gnu/bin/ghc-pkg-${ghc_version}
128- HSC2HS=/usr/gnu/bin/hsc2hs-${ghc_version}
129- HADDOCK=/usr/gnu/bin/haddock-ghc-${ghc_version}
90+ GHC=/usr/gnu/bin/ghc-%{ghc_ver}
91+ GHC_PKG=/usr/gnu/bin/ghc-pkg-%{ghc_ver}
92+ HSC2HS=/usr/gnu/bin/hsc2hs-%{ghc_ver}
93+ HADDOCK=/usr/gnu/bin/haddock-ghc-%{ghc_ver}
13094 VERBOSE=--verbose=2
13195
13296 chmod a+x ./Setup.lhs
133- /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs clean
134- /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs configure --prefix=%{_prefix} \
97+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs clean
98+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs configure --prefix=%{_prefix} \
13599 --libdir=%{_libdir} \
136- --docdir=%{_datadir}/doc/ghc-${ghc_version}/%{pname}-%{version} \
137- --htmldir=%{_datadir}/doc/ghc-${ghc_version}/html/libraries/%{pname}-%{version} \
100+ --docdir=%{_datadir}/doc/ghc-%{ghc_ver}/%{pname}-%{version} \
101+ --htmldir=%{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/%{pname}-%{version} \
138102 --libsubdir='$compiler/$pkgid' \
139103 --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} --with-haddock=${HADDOCK} \
140104 --haddock-option="--html" \
141105 --enable-library-profiling \
142106 ${VERBOSE}
143107
144- /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs build ${VERBOSE} -j$CPUS
145- /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
108+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs build ${VERBOSE} -j$CPUS
109+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
146110
147- install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}
148- /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf
149- /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
111+ install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}
112+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf
113+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
150114
151- install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/
152- install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/%{pname}-%{version}.conf
115+ install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/
116+ install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/%{pname}-%{version}.conf
153117
154118 # LICENCE FILE
155- # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-${ghc_version}
119+ # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-%{ghc_ver}
156120 # # Prepare lists of files for packaging
157121 # cd %{_builddir}/%{pname}-%{version}
158- find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-${ghc_version}" > pkg-prof-${ghc_version}.files
159- find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-${ghc_version}" >> pkg-prof-${ghc_version}.files
160- find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-all-${ghc_version}.files
161- sort pkg-prof-${ghc_version}.files > pkg-prof-sort-${ghc_version}.files
162- sort pkg-all-${ghc_version}.files > pkg-all-sort-${ghc_version}.files
163- comm -23 pkg-all-sort-${ghc_version}.files pkg-prof-sort-${ghc_version}.files > pkg-${ghc_version}.files
164- find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-doc-${ghc_version}.files
165- sort pkg-doc-${ghc_version}.files > pkg-doc-sort-${ghc_version}.files
122+ find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-%{ghc_ver}" > pkg-prof-%{ghc_ver}.files
123+ find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-%{ghc_ver}" >> pkg-prof-%{ghc_ver}.files
124+ find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-all-%{ghc_ver}.files
125+ sort pkg-prof-%{ghc_ver}.files > pkg-prof-sort-%{ghc_ver}.files
126+ sort pkg-all-%{ghc_ver}.files > pkg-all-sort-%{ghc_ver}.files
127+ comm -23 pkg-all-sort-%{ghc_ver}.files pkg-prof-sort-%{ghc_ver}.files > pkg-%{ghc_ver}.files
128+ find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-doc-%{ghc_ver}.files
129+ sort pkg-doc-%{ghc_ver}.files > pkg-doc-sort-%{ghc_ver}.files
166130 # Clean up syntax for %files section
167- cat pkg-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-${ghc_version}.files
168- cat pkg-prof-sort-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-${ghc_version}.files
169- cat pkg-doc-sort-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-${ghc_version}.files
131+ cat pkg-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-%{ghc_ver}.files
132+ cat pkg-prof-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-%{ghc_ver}.files
133+ cat pkg-doc-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-%{ghc_ver}.files
170134 }
171-
135+build_for
172136
173-%if %{build78}
174-build_for 7.8.3
175-%endif
176-
177-%if %{build710}
178-build_for 7.10.3
179-%endif
180137
181138 %install
182139
@@ -192,49 +149,36 @@
192149 # %post
193150 # The %install section above will only install files
194151 # We need to register the package with ghc-pkg for ghc to find it
195-# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-${ghc_version}/%{cname}-%{version}/%{cname}-%{version}.conf
152+# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-%{ghc_ver}/%{cname}-%{version}/%{cname}-%{version}.conf
196153
197154 # %post -n SFEghc78-data-default-class-doc
198-# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
155+# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
199156
200157 # %preun
201158 # # Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
202159 # /usr/bin/ghc-pkg unregister --global --force %{pname}-%{version}
203160
204161 # %postun -n SFEghc78-data-default-class-doc
205-# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-${ghc_version}/html/libraries/gen_contents_index ] ; then
206-# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
162+# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/gen_contents_index ] ; then
163+# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
207164 # fi
208165
209166 %endif
210167
211168
212-%if %{build78}
213-%files 78 -f pkg-%{ghc_ver_78}.files
169+%files 710 -f pkg-%{ghc_ver}.files
214170 %defattr (-, root, bin)
215171
216-%files prof-78 -f pkg-prof-%{ghc_ver_78}.files
172+%files prof-710 -f pkg-prof-%{ghc_ver}.files
217173 %defattr (-, root, bin)
218174
219-%files doc-78 -f pkg-doc-%{ghc_ver_78}.files
175+%files doc-710 -f pkg-doc-%{ghc_ver}.files
220176 %defattr(-,root,bin)
221177 %dir %attr (0755, root, sys) %{_datadir}
222178 %dir %attr (0755, root, other) %{_docdir}
223-%endif
224-
225-%if %{build710}
226-%files 710 -f pkg-%{ghc_ver_710}.files
227-%defattr (-, root, bin)
228-
229-%files prof-710 -f pkg-prof-%{ghc_ver_710}.files
230-%defattr (-, root, bin)
231-
232-%files doc-710 -f pkg-doc-%{ghc_ver_710}.files
233-%defattr(-,root,bin)
234-%dir %attr (0755, root, sys) %{_datadir}
235-%dir %attr (0755, root, other) %{_docdir}
236-%endif
237179
238180 %changelog
181+* Tue Jan 16 2016 - Osamu Tabata<cantimerny.g@gmail.com>
182+- build only 7.10
239183 * Tue Jan 19 2016 - Osamu Tabata<cantimerny.g@gmail.com>
240184 - initial commit
Show on old repository browser