日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。
リビジョン | 91623929d3f49dd5b1e819c0065bd26c165d7f8d (tree) |
---|---|
日時 | 2016-01-30 09:22:44 |
作者 | Osamu Tabata <cantimerny.g@gmai...> |
コミッター | Osamu Tabata |
spec_SFEghc-attoparsec: build only 7.10
@@ -9,11 +9,7 @@ | ||
9 | 9 | %include base.inc |
10 | 10 | %include usr-gnu.inc |
11 | 11 | |
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 | |
17 | 13 | %include yesod-version-sets.inc |
18 | 14 | |
19 | 15 | %define oracle_solaris_11_2 %(grep 'Oracle Solaris 11.2' /etc/release > /dev/null ; if [ $? -eq 0 ]; then echo '1'; else echo '0'; fi) |
@@ -32,28 +28,8 @@ | ||
32 | 28 | SUNW_BaseDir: %{_basedir} |
33 | 29 | BuildRoot: %{_tmppath}/%{name}-%{version}-build |
34 | 30 | |
35 | -BuildRequires: developer/ghc-78 = %{ghc_ver_78} | |
36 | -BuildRequires: developer/ghc-78/prof = %{ghc_ver_78} | |
37 | -BuildRequires: library/ghc/Cabal-78 = %{cabal_ver} | |
38 | -BuildRequires: library/ghc/Cabal-78/prof = %{cabal_ver} | |
39 | -BuildRequires: library/ghc/hscolour-78 = %{hscolour_ver} | |
40 | -BuildRequires: library/ghc/hscolour-78/prof = %{hscolour_ver} | |
41 | -BuildRequires: library/ghc/text-78 = %{text_ver} | |
42 | -BuildRequires: library/ghc/text-78/prof = %{text_ver} | |
43 | -BuildRequires: library/ghc/hashable-78 = %{hashable_ver} | |
44 | -BuildRequires: library/ghc/hashable-78/prof = %{hashable_ver} | |
45 | -BuildRequires: library/ghc/scientific-78 = %{scientific_ver} | |
46 | -BuildRequires: library/ghc/scientific-78/prof = %{scientific_ver} | |
47 | -BuildRequires: library/ghc/transformers-78 = %{transformers_ver} | |
48 | -BuildRequires: library/ghc/transformers-78/prof = %{transformers_ver} | |
49 | -BuildRequires: library/ghc/primitive-78 = %{primitive_ver} | |
50 | -BuildRequires: library/ghc/primitive-78/prof = %{primitive_ver} | |
51 | -BuildRequires: library/ghc/vector-78 = %{vector_ver} | |
52 | -BuildRequires: library/ghc/vector-78/prof = %{vector_ver} | |
53 | -BuildRequires: developer/ghc-710 = %{ghc_ver_710} | |
54 | -BuildRequires: developer/ghc-710/prof = %{ghc_ver_710} | |
55 | -BuildRequires: library/ghc/Cabal-710 = %{cabal_ver} | |
56 | -BuildRequires: library/ghc/Cabal-710/prof = %{cabal_ver} | |
31 | +BuildRequires: developer/ghc-710 = %{ghc_ver} | |
32 | +BuildRequires: developer/ghc-710/prof = %{ghc_ver} | |
57 | 33 | BuildRequires: library/ghc/hscolour-710 = %{hscolour_ver} |
58 | 34 | BuildRequires: library/ghc/hscolour-710/prof = %{hscolour_ver} |
59 | 35 | BuildRequires: library/ghc/text-710 = %{text_ver} |
@@ -62,8 +38,6 @@ | ||
62 | 38 | BuildRequires: library/ghc/hashable-710/prof = %{hashable_ver} |
63 | 39 | BuildRequires: library/ghc/scientific-710 = %{scientific_ver} |
64 | 40 | BuildRequires: library/ghc/scientific-710/prof = %{scientific_ver} |
65 | -BuildRequires: library/ghc/transformers-710 = %{transformers_ver} | |
66 | -BuildRequires: library/ghc/transformers-710/prof = %{transformers_ver} | |
67 | 41 | BuildRequires: library/ghc/primitive-710 = %{primitive_ver} |
68 | 42 | BuildRequires: library/ghc/primitive-710/prof = %{primitive_ver} |
69 | 43 | BuildRequires: library/ghc/vector-710 = %{vector_ver} |
@@ -75,53 +49,30 @@ | ||
75 | 49 | file formats. |
76 | 50 | |
77 | 51 | |
78 | -%if %{build78} | |
79 | -%package 78 | |
80 | -IPS_package_name: library/ghc/%{pname}-78 | |
81 | -Summary: attoparsec system | |
82 | -SUNW_BaseDir: %{_basedir} | |
83 | -%include default-depend.inc | |
84 | -Requires: developer/ghc-78 = %{ghc_ver_78} | |
85 | - | |
86 | -%package prof-78 | |
87 | -IPS_package_name: library/ghc/%{pname}-78/prof | |
88 | -Summary: %{summary} - profiling libraries | |
89 | -SUNW_BaseDir: %{_basedir} | |
90 | -%include default-depend.inc | |
91 | -Requires: developer/ghc-78/prof = %{ghc_ver_78} | |
92 | -Requires: library/ghc/%{pname}-78 | |
93 | - | |
94 | -%package doc-78 | |
95 | -IPS_package_name: library/ghc/%{pname}-78/doc | |
96 | -Summary: %{summary} - doc files | |
97 | -SUNW_BaseDir: %{_basedir} | |
98 | -%include default-depend.inc | |
99 | -Requires: library/ghc/%{pname}-78 | |
100 | - | |
101 | -%description 78 | |
102 | -A fast parser combinator library, aimed particularly at dealing | |
103 | -efficiently with network protocols and complicated text/binary | |
104 | -file formats. | |
105 | - | |
106 | - | |
107 | -%endif | |
108 | - | |
109 | - | |
110 | -%if %{build710} | |
111 | 52 | %package 710 |
112 | 53 | IPS_package_name: library/ghc/%{pname}-710 |
113 | 54 | Summary: attoparsec system |
114 | 55 | SUNW_BaseDir: %{_basedir} |
115 | 56 | %include default-depend.inc |
116 | -Requires: developer/ghc-710 = %{ghc_ver_710} | |
57 | +Requires: developer/ghc-710 = %{ghc_ver} | |
58 | +Requires: library/ghc/text-710 = %{text_ver} | |
59 | +Requires: library/ghc/hashable-710 = %{hashable_ver} | |
60 | +Requires: library/ghc/scientific-710 = %{scientific_ver} | |
61 | +Requires: library/ghc/primitive-710 = %{primitive_ver} | |
62 | +Requires: library/ghc/vector-710 = %{vector_ver} | |
117 | 63 | |
118 | 64 | %package prof-710 |
119 | 65 | IPS_package_name: library/ghc/%{pname}-710/prof |
120 | 66 | Summary: %{summary} - profiling libraries |
121 | 67 | SUNW_BaseDir: %{_basedir} |
122 | 68 | %include default-depend.inc |
123 | -Requires: developer/ghc-710/prof = %{ghc_ver_710} | |
69 | +Requires: developer/ghc-710/prof = %{ghc_ver} | |
124 | 70 | Requires: library/ghc/%{pname}-710 |
71 | +Requires: library/ghc/text-710/prof = %{text_ver} | |
72 | +Requires: library/ghc/hashable-710/prof = %{hashable_ver} | |
73 | +Requires: library/ghc/scientific-710/prof = %{scientific_ver} | |
74 | +Requires: library/ghc/primitive-710/prof = %{primitive_ver} | |
75 | +Requires: library/ghc/vector-710/prof = %{vector_ver} | |
125 | 76 | |
126 | 77 | %package doc-710 |
127 | 78 | IPS_package_name: library/ghc/%{pname}-710/doc |
@@ -136,9 +87,6 @@ | ||
136 | 87 | file formats. |
137 | 88 | |
138 | 89 | |
139 | -%endif | |
140 | - | |
141 | - | |
142 | 90 | %prep |
143 | 91 | %setup -q -n %{pname}-%{version} |
144 | 92 |
@@ -164,60 +112,53 @@ | ||
164 | 112 | export LDFLAGS="-L%{_libdir} -R%{_libdir}" |
165 | 113 | %endif |
166 | 114 | |
167 | - GHC=/usr/gnu/bin/ghc-${ghc_version} | |
168 | - GHC_PKG=/usr/gnu/bin/ghc-pkg-${ghc_version} | |
169 | - HSC2HS=/usr/gnu/bin/hsc2hs-${ghc_version} | |
170 | - HADDOCK=/usr/gnu/bin/haddock-ghc-${ghc_version} | |
115 | + GHC=/usr/gnu/bin/ghc-%{ghc_ver} | |
116 | + GHC_PKG=/usr/gnu/bin/ghc-pkg-%{ghc_ver} | |
117 | + HSC2HS=/usr/gnu/bin/hsc2hs-%{ghc_ver} | |
118 | + HADDOCK=/usr/gnu/bin/haddock-ghc-%{ghc_ver} | |
171 | 119 | VERBOSE=--verbose=2 |
172 | 120 | |
173 | 121 | chmod a+x ./Setup.lhs |
174 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs clean | |
175 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs configure --prefix=%{_prefix} \ | |
122 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs clean | |
123 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs configure --prefix=%{_prefix} \ | |
176 | 124 | --libdir=%{_libdir} \ |
177 | - --docdir=%{_datadir}/doc/ghc-${ghc_version}/%{pname}-%{version} \ | |
178 | - --htmldir=%{_datadir}/doc/ghc-${ghc_version}/html/libraries/%{pname}-%{version} \ | |
125 | + --docdir=%{_datadir}/doc/ghc-%{ghc_ver}/%{pname}-%{version} \ | |
126 | + --htmldir=%{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/%{pname}-%{version} \ | |
179 | 127 | --libsubdir='$compiler/$pkgid' \ |
180 | 128 | --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} --with-haddock=${HADDOCK} \ |
181 | 129 | --haddock-option="--html" \ |
182 | 130 | --enable-library-profiling \ |
183 | 131 | ${VERBOSE} |
184 | 132 | |
185 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs build ${VERBOSE} -j$CPUS | |
186 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs haddock ${VERBOSE} --executables --hoogle --hyperlink-source | |
133 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs build ${VERBOSE} -j$CPUS | |
134 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs haddock ${VERBOSE} --executables --hoogle --hyperlink-source | |
187 | 135 | |
188 | - install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version} | |
189 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf | |
190 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT} | |
136 | + install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver} | |
137 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf | |
138 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT} | |
191 | 139 | |
192 | - install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/ | |
193 | - install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/%{pname}-%{version}.conf | |
140 | + install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/ | |
141 | + install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/%{pname}-%{version}.conf | |
194 | 142 | |
195 | 143 | # LICENCE FILE |
196 | - # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-${ghc_version} | |
144 | + # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-%{ghc_ver} | |
197 | 145 | # # Prepare lists of files for packaging |
198 | 146 | # cd %{_builddir}/%{pname}-%{version} |
199 | - find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-${ghc_version}" > pkg-prof-${ghc_version}.files | |
200 | - find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-${ghc_version}" >> pkg-prof-${ghc_version}.files | |
201 | - find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-all-${ghc_version}.files | |
202 | - sort pkg-prof-${ghc_version}.files > pkg-prof-sort-${ghc_version}.files | |
203 | - sort pkg-all-${ghc_version}.files > pkg-all-sort-${ghc_version}.files | |
204 | - comm -23 pkg-all-sort-${ghc_version}.files pkg-prof-sort-${ghc_version}.files > pkg-${ghc_version}.files | |
205 | - find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-doc-${ghc_version}.files | |
206 | - sort pkg-doc-${ghc_version}.files > pkg-doc-sort-${ghc_version}.files | |
147 | + find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-%{ghc_ver}" > pkg-prof-%{ghc_ver}.files | |
148 | + find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-%{ghc_ver}" >> pkg-prof-%{ghc_ver}.files | |
149 | + find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-all-%{ghc_ver}.files | |
150 | + sort pkg-prof-%{ghc_ver}.files > pkg-prof-sort-%{ghc_ver}.files | |
151 | + sort pkg-all-%{ghc_ver}.files > pkg-all-sort-%{ghc_ver}.files | |
152 | + comm -23 pkg-all-sort-%{ghc_ver}.files pkg-prof-sort-%{ghc_ver}.files > pkg-%{ghc_ver}.files | |
153 | + find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-doc-%{ghc_ver}.files | |
154 | + sort pkg-doc-%{ghc_ver}.files > pkg-doc-sort-%{ghc_ver}.files | |
207 | 155 | # Clean up syntax for %files section |
208 | - cat pkg-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-${ghc_version}.files | |
209 | - cat pkg-prof-sort-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-${ghc_version}.files | |
210 | - cat pkg-doc-sort-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-${ghc_version}.files | |
156 | + cat pkg-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-%{ghc_ver}.files | |
157 | + cat pkg-prof-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-%{ghc_ver}.files | |
158 | + cat pkg-doc-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-%{ghc_ver}.files | |
211 | 159 | } |
212 | - | |
160 | +build_for | |
213 | 161 | |
214 | -%if %{build78} | |
215 | -build_for 7.8.3 | |
216 | -%endif | |
217 | - | |
218 | -%if %{build710} | |
219 | -build_for 7.10.3 | |
220 | -%endif | |
221 | 162 | |
222 | 163 | %install |
223 | 164 |
@@ -233,49 +174,37 @@ | ||
233 | 174 | # %post |
234 | 175 | # The %install section above will only install files |
235 | 176 | # We need to register the package with ghc-pkg for ghc to find it |
236 | -# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-${ghc_version}/%{cname}-%{version}/%{cname}-%{version}.conf | |
177 | +# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-%{ghc_ver}/%{cname}-%{version}/%{cname}-%{version}.conf | |
237 | 178 | |
238 | 179 | # %post -n SFEghc78-attoparsec-doc |
239 | -# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
180 | +# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
240 | 181 | |
241 | 182 | # %preun |
242 | 183 | # # Need to unregister the package with ghc-pkg for the rebuild of the spec file to work |
243 | 184 | # /usr/bin/ghc-pkg unregister --global --force %{pname}-%{version} |
244 | 185 | |
245 | 186 | # %postun -n SFEghc78-attoparsec-doc |
246 | -# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-${ghc_version}/html/libraries/gen_contents_index ] ; then | |
247 | -# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
187 | +# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/gen_contents_index ] ; then | |
188 | +# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
248 | 189 | # fi |
249 | 190 | |
250 | 191 | %endif |
251 | 192 | |
252 | 193 | |
253 | -%if %{build78} | |
254 | -%files 78 -f pkg-%{ghc_ver_78}.files | |
194 | +%files 710 -f pkg-%{ghc_ver}.files | |
255 | 195 | %defattr (-, root, bin) |
256 | 196 | |
257 | -%files prof-78 -f pkg-prof-%{ghc_ver_78}.files | |
197 | +%files prof-710 -f pkg-prof-%{ghc_ver}.files | |
258 | 198 | %defattr (-, root, bin) |
259 | 199 | |
260 | -%files doc-78 -f pkg-doc-%{ghc_ver_78}.files | |
200 | +%files doc-710 -f pkg-doc-%{ghc_ver}.files | |
261 | 201 | %defattr(-,root,bin) |
262 | 202 | %dir %attr (0755, root, sys) %{_datadir} |
263 | 203 | %dir %attr (0755, root, other) %{_docdir} |
264 | -%endif | |
265 | - | |
266 | -%if %{build710} | |
267 | -%files 710 -f pkg-%{ghc_ver_710}.files | |
268 | -%defattr (-, root, bin) | |
269 | 204 | |
270 | -%files prof-710 -f pkg-prof-%{ghc_ver_710}.files | |
271 | -%defattr (-, root, bin) | |
272 | - | |
273 | -%files doc-710 -f pkg-doc-%{ghc_ver_710}.files | |
274 | -%defattr(-,root,bin) | |
275 | -%dir %attr (0755, root, sys) %{_datadir} | |
276 | -%dir %attr (0755, root, other) %{_docdir} | |
277 | -%endif | |
278 | 205 | |
279 | 206 | %changelog |
207 | +* Sat Jan 30 2016 - Osamu Tabata<cantimerny.g@gmail.com> | |
208 | +- build only 7.10 | |
280 | 209 | * Wed Jan 24 2016 - Osamu Tabata<cantimerny.g@gmail.com> |
281 | 210 | - initial commit |