日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。
Revision | 1ae98ac3a491046ccfe96a4d401900925e0562a8 (tree) |
---|---|
Time | 2016-01-28 06:41:16 |
Author | Osamu Tabata <cantimerny.g@gmai...> |
Commiter | Osamu Tabata |
spec_SFEghc-entropy: build only 7.10
@@ -9,11 +9,9 @@ | ||
9 | 9 | %include base.inc |
10 | 10 | %include usr-gnu.inc |
11 | 11 | |
12 | -%define build78 1 | |
13 | -%define build710 1 | |
12 | +%define ghc_ver 7.10.3 | |
13 | +%include yesod-version-sets.inc | |
14 | 14 | |
15 | -%define ghc_ver_78 7.8.3 | |
16 | -%define ghc_ver_710 7.10.3 | |
17 | 15 | |
18 | 16 | %define oracle_solaris_11_2 %(grep 'Oracle Solaris 11.2' /etc/release > /dev/null ; if [ $? -eq 0 ]; then echo '1'; else echo '0'; fi) |
19 | 17 |
@@ -31,10 +29,10 @@ | ||
31 | 29 | SUNW_BaseDir: %{_basedir} |
32 | 30 | BuildRoot: %{_tmppath}/%{name}-%{version}-build |
33 | 31 | |
34 | -BuildRequires: developer/ghc-78 = %{ghc_ver_78} | |
35 | -BuildRequires: developer/ghc-78/prof = %{ghc_ver_78} | |
36 | -BuildRequires: developer/ghc-710 = %{ghc_ver_710} | |
37 | -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} | |
38 | 36 | |
39 | 37 | %description |
40 | 38 | (RDRAND when available anywhere, urandom on nix, CryptAPI on Windows, patches welcome) |
@@ -42,52 +40,19 @@ | ||
42 | 40 | sound) PRNGs should see the 'DRBG' package too. |
43 | 41 | |
44 | 42 | |
45 | -%if %{build78} | |
46 | -%package 78 | |
47 | -IPS_package_name: library/ghc/%{pname}-78 | |
48 | -Summary: entropy system | |
49 | -SUNW_BaseDir: %{_basedir} | |
50 | -%include default-depend.inc | |
51 | -Requires: developer/ghc-78 = %{ghc_ver_78} | |
52 | - | |
53 | -%package prof-78 | |
54 | -IPS_package_name: library/ghc/%{pname}-78/prof | |
55 | -Summary: %{summary} - profiling libraries | |
56 | -SUNW_BaseDir: %{_basedir} | |
57 | -%include default-depend.inc | |
58 | -Requires: developer/ghc-78/prof = %{ghc_ver_78} | |
59 | -Requires: library/ghc/%{pname}-78 | |
60 | - | |
61 | -%package doc-78 | |
62 | -IPS_package_name: library/ghc/%{pname}-78/doc | |
63 | -Summary: %{summary} - doc files | |
64 | -SUNW_BaseDir: %{_basedir} | |
65 | -%include default-depend.inc | |
66 | -Requires: library/ghc/%{pname}-78 | |
67 | - | |
68 | -%description 78 | |
69 | -(RDRAND when available anywhere, urandom on nix, CryptAPI on Windows, patches welcome) | |
70 | -Users looking for cryptographically strong (number-theoretically | |
71 | -sound) PRNGs should see the 'DRBG' package too. | |
72 | - | |
73 | - | |
74 | -%endif | |
75 | - | |
76 | - | |
77 | -%if %{build710} | |
78 | 43 | %package 710 |
79 | 44 | IPS_package_name: library/ghc/%{pname}-710 |
80 | 45 | Summary: entropy system |
81 | 46 | SUNW_BaseDir: %{_basedir} |
82 | 47 | %include default-depend.inc |
83 | -Requires: developer/ghc-710 = %{ghc_ver_710} | |
48 | +Requires: developer/ghc-710 = %{ghc_ver} | |
84 | 49 | |
85 | 50 | %package prof-710 |
86 | 51 | IPS_package_name: library/ghc/%{pname}-710/prof |
87 | 52 | Summary: %{summary} - profiling libraries |
88 | 53 | SUNW_BaseDir: %{_basedir} |
89 | 54 | %include default-depend.inc |
90 | -Requires: developer/ghc-710/prof = %{ghc_ver_710} | |
55 | +Requires: developer/ghc-710/prof = %{ghc_ver} | |
91 | 56 | Requires: library/ghc/%{pname}-710 |
92 | 57 | |
93 | 58 | %package doc-710 |
@@ -103,16 +68,12 @@ | ||
103 | 68 | sound) PRNGs should see the 'DRBG' package too. |
104 | 69 | |
105 | 70 | |
106 | -%endif | |
107 | - | |
108 | - | |
109 | 71 | %prep |
110 | 72 | %setup -q -n %{pname}-%{version} |
111 | 73 | |
112 | 74 | %build |
113 | 75 | |
114 | 76 | build_for () { |
115 | - ghc_version=$1 | |
116 | 77 | CPUNUM=$(psrinfo | gawk '$2=="on-line"{cpus++}END{print (cpus==0)?1:cpus}') |
117 | 78 | CPUS=$(test $CPUNUM -ge 4 && echo 4 || echo $CPUNUM) |
118 | 79 | # Need to use same gcc as we used to build ghc (gcc 4.x) |
@@ -131,60 +92,53 @@ | ||
131 | 92 | export LDFLAGS="-L%{_libdir} -R%{_libdir}" |
132 | 93 | %endif |
133 | 94 | |
134 | - GHC=/usr/gnu/bin/ghc-${ghc_version} | |
135 | - GHC_PKG=/usr/gnu/bin/ghc-pkg-${ghc_version} | |
136 | - HSC2HS=/usr/gnu/bin/hsc2hs-${ghc_version} | |
137 | - HADDOCK=/usr/gnu/bin/haddock-ghc-${ghc_version} | |
95 | + GHC=/usr/gnu/bin/ghc-%{ghc_ver} | |
96 | + GHC_PKG=/usr/gnu/bin/ghc-pkg-%{ghc_ver} | |
97 | + HSC2HS=/usr/gnu/bin/hsc2hs-%{ghc_ver} | |
98 | + HADDOCK=/usr/gnu/bin/haddock-ghc-%{ghc_ver} | |
138 | 99 | VERBOSE=--verbose=2 |
139 | 100 | |
140 | 101 | chmod a+x ./Setup.hs |
141 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs clean | |
142 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs configure --prefix=%{_prefix} \ | |
102 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs clean | |
103 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs configure --prefix=%{_prefix} \ | |
143 | 104 | --libdir=%{_libdir} \ |
144 | - --docdir=%{_datadir}/doc/ghc-${ghc_version}/%{pname}-%{version} \ | |
145 | - --htmldir=%{_datadir}/doc/ghc-${ghc_version}/html/libraries/%{pname}-%{version} \ | |
105 | + --docdir=%{_datadir}/doc/ghc-%{ghc_ver}/%{pname}-%{version} \ | |
106 | + --htmldir=%{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/%{pname}-%{version} \ | |
146 | 107 | --libsubdir='$compiler/$pkgid' \ |
147 | 108 | --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} --with-haddock=${HADDOCK} \ |
148 | 109 | --haddock-option="--html" \ |
149 | 110 | --enable-library-profiling \ |
150 | 111 | ${VERBOSE} |
151 | 112 | |
152 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs build ${VERBOSE} -j$CPUS | |
153 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source | |
113 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs build ${VERBOSE} -j$CPUS | |
114 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source | |
154 | 115 | |
155 | - install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version} | |
156 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf | |
157 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT} | |
116 | + install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver} | |
117 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf | |
118 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT} | |
158 | 119 | |
159 | - install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/ | |
160 | - install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/%{pname}-%{version}.conf | |
120 | + install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/ | |
121 | + install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/%{pname}-%{version}.conf | |
161 | 122 | |
162 | 123 | # LICENCE FILE |
163 | - # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-${ghc_version} | |
124 | + # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-%{ghc_ver} | |
164 | 125 | # # Prepare lists of files for packaging |
165 | 126 | # cd %{_builddir}/%{pname}-%{version} |
166 | - find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-${ghc_version}" > pkg-prof-${ghc_version}.files | |
167 | - find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-${ghc_version}" >> pkg-prof-${ghc_version}.files | |
168 | - find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-all-${ghc_version}.files | |
169 | - sort pkg-prof-${ghc_version}.files > pkg-prof-sort-${ghc_version}.files | |
170 | - sort pkg-all-${ghc_version}.files > pkg-all-sort-${ghc_version}.files | |
171 | - comm -23 pkg-all-sort-${ghc_version}.files pkg-prof-sort-${ghc_version}.files > pkg-${ghc_version}.files | |
172 | - find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-doc-${ghc_version}.files | |
173 | - sort pkg-doc-${ghc_version}.files > pkg-doc-sort-${ghc_version}.files | |
127 | + find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-%{ghc_ver}" > pkg-prof-%{ghc_ver}.files | |
128 | + find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-%{ghc_ver}" >> pkg-prof-%{ghc_ver}.files | |
129 | + find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-all-%{ghc_ver}.files | |
130 | + sort pkg-prof-%{ghc_ver}.files > pkg-prof-sort-%{ghc_ver}.files | |
131 | + sort pkg-all-%{ghc_ver}.files > pkg-all-sort-%{ghc_ver}.files | |
132 | + comm -23 pkg-all-sort-%{ghc_ver}.files pkg-prof-sort-%{ghc_ver}.files > pkg-%{ghc_ver}.files | |
133 | + find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-doc-%{ghc_ver}.files | |
134 | + sort pkg-doc-%{ghc_ver}.files > pkg-doc-sort-%{ghc_ver}.files | |
174 | 135 | # Clean up syntax for %files section |
175 | - cat pkg-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-${ghc_version}.files | |
176 | - cat pkg-prof-sort-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-${ghc_version}.files | |
177 | - cat pkg-doc-sort-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-${ghc_version}.files | |
136 | + cat pkg-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-%{ghc_ver}.files | |
137 | + cat pkg-prof-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-%{ghc_ver}.files | |
138 | + cat pkg-doc-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-%{ghc_ver}.files | |
178 | 139 | } |
179 | - | |
140 | +build_for | |
180 | 141 | |
181 | -%if %{build78} | |
182 | -build_for 7.8.3 | |
183 | -%endif | |
184 | - | |
185 | -%if %{build710} | |
186 | -build_for 7.10.3 | |
187 | -%endif | |
188 | 142 | |
189 | 143 | %install |
190 | 144 |
@@ -200,49 +154,37 @@ | ||
200 | 154 | # %post |
201 | 155 | # The %install section above will only install files |
202 | 156 | # We need to register the package with ghc-pkg for ghc to find it |
203 | -# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-${ghc_version}/%{cname}-%{version}/%{cname}-%{version}.conf | |
157 | +# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-%{ghc_ver}/%{cname}-%{version}/%{cname}-%{version}.conf | |
204 | 158 | |
205 | 159 | # %post -n SFEghc78-entropy-doc |
206 | -# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
160 | +# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
207 | 161 | |
208 | 162 | # %preun |
209 | 163 | # # Need to unregister the package with ghc-pkg for the rebuild of the spec file to work |
210 | 164 | # /usr/bin/ghc-pkg unregister --global --force %{pname}-%{version} |
211 | 165 | |
212 | 166 | # %postun -n SFEghc78-entropy-doc |
213 | -# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-${ghc_version}/html/libraries/gen_contents_index ] ; then | |
214 | -# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
167 | +# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/gen_contents_index ] ; then | |
168 | +# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
215 | 169 | # fi |
216 | 170 | |
217 | 171 | %endif |
218 | 172 | |
219 | 173 | |
220 | -%if %{build78} | |
221 | -%files 78 -f pkg-%{ghc_ver_78}.files | |
174 | +%files 710 -f pkg-%{ghc_ver}.files | |
222 | 175 | %defattr (-, root, bin) |
223 | 176 | |
224 | -%files prof-78 -f pkg-prof-%{ghc_ver_78}.files | |
177 | +%files prof-710 -f pkg-prof-%{ghc_ver}.files | |
225 | 178 | %defattr (-, root, bin) |
226 | 179 | |
227 | -%files doc-78 -f pkg-doc-%{ghc_ver_78}.files | |
180 | +%files doc-710 -f pkg-doc-%{ghc_ver}.files | |
228 | 181 | %defattr(-,root,bin) |
229 | 182 | %dir %attr (0755, root, sys) %{_datadir} |
230 | 183 | %dir %attr (0755, root, other) %{_docdir} |
231 | -%endif | |
232 | - | |
233 | -%if %{build710} | |
234 | -%files 710 -f pkg-%{ghc_ver_710}.files | |
235 | -%defattr (-, root, bin) | |
236 | 184 | |
237 | -%files prof-710 -f pkg-prof-%{ghc_ver_710}.files | |
238 | -%defattr (-, root, bin) | |
239 | - | |
240 | -%files doc-710 -f pkg-doc-%{ghc_ver_710}.files | |
241 | -%defattr(-,root,bin) | |
242 | -%dir %attr (0755, root, sys) %{_datadir} | |
243 | -%dir %attr (0755, root, other) %{_docdir} | |
244 | -%endif | |
245 | 185 | |
246 | 186 | %changelog |
187 | +* Thu Jan 28 2016 - Osamu Tabata<cantimerny.g@gmail.com> | |
188 | +- build only 7.10 | |
247 | 189 | * Wed Jan 22 2016 - Osamu Tabata<cantimerny.g@gmail.com> |
248 | 190 | - initial commit |