日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。
Revision | c61586af57496c980362dcf92b980e3c84cf03a7 (tree) |
---|---|
Time | 2016-01-30 08:25:48 |
Author | Osamu Tabata <cantimerny.g@gmai...> |
Commiter | Osamu Tabata |
spec_SFEghc-unordered-containers: 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) |
@@ -33,14 +29,10 @@ | ||
33 | 29 | SUNW_BaseDir: %{_basedir} |
34 | 30 | BuildRoot: %{_tmppath}/%{name}-%{version}-build |
35 | 31 | |
36 | -BuildRequires: developer/ghc-78 = %{ghc_ver_78} | |
37 | -BuildRequires: developer/ghc-78/prof = %{ghc_ver_78} | |
38 | -BuildRequires: library/ghc/text-78 = %{text_ver} | |
39 | -BuildRequires: library/ghc/text-78/prof = %{text_ver} | |
40 | -BuildRequires: library/ghc/hashable-78 = %{hashable_ver} | |
41 | -BuildRequires: library/ghc/hashable-78/prof = %{hashable_ver} | |
42 | -BuildRequires: developer/ghc-710 = %{ghc_ver_710} | |
43 | -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} | |
44 | 36 | BuildRequires: library/ghc/text-710 = %{text_ver} |
45 | 37 | BuildRequires: library/ghc/text-710/prof = %{text_ver} |
46 | 38 | BuildRequires: library/ghc/hashable-710 = %{hashable_ver} |
@@ -55,56 +47,24 @@ | ||
55 | 47 | amortized, but remains valid even if structures are shared. |
56 | 48 | |
57 | 49 | |
58 | -%if %{build78} | |
59 | -%package 78 | |
60 | -IPS_package_name: library/ghc/%{pname}-78 | |
61 | -Summary: unordered-containers system | |
62 | -SUNW_BaseDir: %{_basedir} | |
63 | -%include default-depend.inc | |
64 | -Requires: developer/ghc-78 = %{ghc_ver_78} | |
65 | - | |
66 | -%package prof-78 | |
67 | -IPS_package_name: library/ghc/%{pname}-78/prof | |
68 | -Summary: %{summary} - profiling libraries | |
69 | -SUNW_BaseDir: %{_basedir} | |
70 | -%include default-depend.inc | |
71 | -Requires: developer/ghc-78/prof = %{ghc_ver_78} | |
72 | -Requires: library/ghc/%{pname}-78 | |
73 | - | |
74 | -%package doc-78 | |
75 | -IPS_package_name: library/ghc/%{pname}-78/doc | |
76 | -Summary: %{summary} - doc files | |
77 | -SUNW_BaseDir: %{_basedir} | |
78 | -%include default-depend.inc | |
79 | -Requires: library/ghc/%{pname}-78 | |
80 | - | |
81 | -%description 78 | |
82 | -Efficient hashing-based container types. The containers have been | |
83 | -optimized for performance critical use, both in terms of large data | |
84 | -quantities and high speed. | |
85 | -. | |
86 | -The declared cost of each operation is either worst-case or | |
87 | -amortized, but remains valid even if structures are shared. | |
88 | - | |
89 | - | |
90 | -%endif | |
91 | - | |
92 | - | |
93 | -%if %{build710} | |
94 | 50 | %package 710 |
95 | 51 | IPS_package_name: library/ghc/%{pname}-710 |
96 | 52 | Summary: unordered-containers system |
97 | 53 | SUNW_BaseDir: %{_basedir} |
98 | 54 | %include default-depend.inc |
99 | -Requires: developer/ghc-710 = %{ghc_ver_710} | |
55 | +Requires: developer/ghc-710 = %{ghc_ver} | |
56 | +BuildRequires: library/ghc/text-710 = %{text_ver} | |
57 | +BuildRequires: library/ghc/hashable-710 = %{hashable_ver} | |
100 | 58 | |
101 | 59 | %package prof-710 |
102 | 60 | IPS_package_name: library/ghc/%{pname}-710/prof |
103 | 61 | Summary: %{summary} - profiling libraries |
104 | 62 | SUNW_BaseDir: %{_basedir} |
105 | 63 | %include default-depend.inc |
106 | -Requires: developer/ghc-710/prof = %{ghc_ver_710} | |
64 | +Requires: developer/ghc-710/prof = %{ghc_ver} | |
107 | 65 | Requires: library/ghc/%{pname}-710 |
66 | +BuildRequires: library/ghc/text-710/prof = %{text_ver} | |
67 | +BuildRequires: library/ghc/hashable-710/prof = %{hashable_ver} | |
108 | 68 | |
109 | 69 | %package doc-710 |
110 | 70 | IPS_package_name: library/ghc/%{pname}-710/doc |
@@ -122,9 +82,6 @@ | ||
122 | 82 | amortized, but remains valid even if structures are shared. |
123 | 83 | |
124 | 84 | |
125 | -%endif | |
126 | - | |
127 | - | |
128 | 85 | %prep |
129 | 86 | %setup -q -n %{pname}-%{version} |
130 | 87 |
@@ -151,60 +108,53 @@ | ||
151 | 108 | export LDFLAGS="-L%{_libdir} -R%{_libdir}" |
152 | 109 | %endif |
153 | 110 | |
154 | - GHC=/usr/gnu/bin/ghc-${ghc_version} | |
155 | - GHC_PKG=/usr/gnu/bin/ghc-pkg-${ghc_version} | |
156 | - HSC2HS=/usr/gnu/bin/hsc2hs-${ghc_version} | |
157 | - HADDOCK=/usr/gnu/bin/haddock-ghc-${ghc_version} | |
111 | + GHC=/usr/gnu/bin/ghc-%{ghc_ver} | |
112 | + GHC_PKG=/usr/gnu/bin/ghc-pkg-%{ghc_ver} | |
113 | + HSC2HS=/usr/gnu/bin/hsc2hs-%{ghc_ver} | |
114 | + HADDOCK=/usr/gnu/bin/haddock-ghc-%{ghc_ver} | |
158 | 115 | VERBOSE=--verbose=2 |
159 | 116 | |
160 | 117 | chmod a+x ./Setup.hs |
161 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs clean | |
162 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs configure --prefix=%{_prefix} \ | |
118 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs clean | |
119 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs configure --prefix=%{_prefix} \ | |
163 | 120 | --libdir=%{_libdir} \ |
164 | - --docdir=%{_datadir}/doc/ghc-${ghc_version}/%{pname}-%{version} \ | |
165 | - --htmldir=%{_datadir}/doc/ghc-${ghc_version}/html/libraries/%{pname}-%{version} \ | |
121 | + --docdir=%{_datadir}/doc/ghc-%{ghc_ver}/%{pname}-%{version} \ | |
122 | + --htmldir=%{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/%{pname}-%{version} \ | |
166 | 123 | --libsubdir='$compiler/$pkgid' \ |
167 | 124 | --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} --with-haddock=${HADDOCK} \ |
168 | 125 | --haddock-option="--html" \ |
169 | 126 | --enable-library-profiling \ |
170 | 127 | ${VERBOSE} |
171 | 128 | |
172 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs build ${VERBOSE} -j$CPUS | |
173 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source | |
129 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs build ${VERBOSE} -j$CPUS | |
130 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source | |
174 | 131 | |
175 | - install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version} | |
176 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf | |
177 | - /usr/gnu/bin/runghc-${ghc_version} ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT} | |
132 | + install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver} | |
133 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf | |
134 | + /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT} | |
178 | 135 | |
179 | - install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/ | |
180 | - install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-${ghc_version}/%{pname}-%{version}/%{pname}-%{version}.conf | |
136 | + install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/ | |
137 | + install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/%{pname}-%{version}.conf | |
181 | 138 | |
182 | 139 | # LICENCE FILE |
183 | - # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-${ghc_version} | |
140 | + # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-%{ghc_ver} | |
184 | 141 | # # Prepare lists of files for packaging |
185 | 142 | # cd %{_builddir}/%{pname}-%{version} |
186 | - find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-${ghc_version}" > pkg-prof-${ghc_version}.files | |
187 | - find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-${ghc_version}" >> pkg-prof-${ghc_version}.files | |
188 | - find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-all-${ghc_version}.files | |
189 | - sort pkg-prof-${ghc_version}.files > pkg-prof-sort-${ghc_version}.files | |
190 | - sort pkg-all-${ghc_version}.files > pkg-all-sort-${ghc_version}.files | |
191 | - comm -23 pkg-all-sort-${ghc_version}.files pkg-prof-sort-${ghc_version}.files > pkg-${ghc_version}.files | |
192 | - find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-${ghc_version}" > pkg-doc-${ghc_version}.files | |
193 | - sort pkg-doc-${ghc_version}.files > pkg-doc-sort-${ghc_version}.files | |
143 | + find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-%{ghc_ver}" > pkg-prof-%{ghc_ver}.files | |
144 | + find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-%{ghc_ver}" >> pkg-prof-%{ghc_ver}.files | |
145 | + find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-all-%{ghc_ver}.files | |
146 | + sort pkg-prof-%{ghc_ver}.files > pkg-prof-sort-%{ghc_ver}.files | |
147 | + sort pkg-all-%{ghc_ver}.files > pkg-all-sort-%{ghc_ver}.files | |
148 | + comm -23 pkg-all-sort-%{ghc_ver}.files pkg-prof-sort-%{ghc_ver}.files > pkg-%{ghc_ver}.files | |
149 | + find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-doc-%{ghc_ver}.files | |
150 | + sort pkg-doc-%{ghc_ver}.files > pkg-doc-sort-%{ghc_ver}.files | |
194 | 151 | # Clean up syntax for %files section |
195 | - cat pkg-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-${ghc_version}.files | |
196 | - cat pkg-prof-sort-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-${ghc_version}.files | |
197 | - cat pkg-doc-sort-${ghc_version}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-${ghc_version}.files | |
152 | + cat pkg-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-%{ghc_ver}.files | |
153 | + cat pkg-prof-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-%{ghc_ver}.files | |
154 | + cat pkg-doc-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-%{ghc_ver}.files | |
198 | 155 | } |
199 | - | |
156 | +build_for | |
200 | 157 | |
201 | -%if %{build78} | |
202 | -build_for 7.8.3 | |
203 | -%endif | |
204 | - | |
205 | -%if %{build710} | |
206 | -build_for 7.10.3 | |
207 | -%endif | |
208 | 158 | |
209 | 159 | %install |
210 | 160 |
@@ -220,49 +170,37 @@ | ||
220 | 170 | # %post |
221 | 171 | # The %install section above will only install files |
222 | 172 | # We need to register the package with ghc-pkg for ghc to find it |
223 | -# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-${ghc_version}/%{cname}-%{version}/%{cname}-%{version}.conf | |
173 | +# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-%{ghc_ver}/%{cname}-%{version}/%{cname}-%{version}.conf | |
224 | 174 | |
225 | 175 | # %post -n SFEghc78-unordered-containers-doc |
226 | -# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
176 | +# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
227 | 177 | |
228 | 178 | # %preun |
229 | 179 | # # Need to unregister the package with ghc-pkg for the rebuild of the spec file to work |
230 | 180 | # /usr/bin/ghc-pkg unregister --global --force %{pname}-%{version} |
231 | 181 | |
232 | 182 | # %postun -n SFEghc78-unordered-containers-doc |
233 | -# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-${ghc_version}/html/libraries/gen_contents_index ] ; then | |
234 | -# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
183 | +# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/gen_contents_index ] ; then | |
184 | +# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
235 | 185 | # fi |
236 | 186 | |
237 | 187 | %endif |
238 | 188 | |
239 | 189 | |
240 | -%if %{build78} | |
241 | -%files 78 -f pkg-%{ghc_ver_78}.files | |
190 | +%files 710 -f pkg-%{ghc_ver}.files | |
242 | 191 | %defattr (-, root, bin) |
243 | 192 | |
244 | -%files prof-78 -f pkg-prof-%{ghc_ver_78}.files | |
193 | +%files prof-710 -f pkg-prof-%{ghc_ver}.files | |
245 | 194 | %defattr (-, root, bin) |
246 | 195 | |
247 | -%files doc-78 -f pkg-doc-%{ghc_ver_78}.files | |
196 | +%files doc-710 -f pkg-doc-%{ghc_ver}.files | |
248 | 197 | %defattr(-,root,bin) |
249 | 198 | %dir %attr (0755, root, sys) %{_datadir} |
250 | 199 | %dir %attr (0755, root, other) %{_docdir} |
251 | -%endif | |
252 | - | |
253 | -%if %{build710} | |
254 | -%files 710 -f pkg-%{ghc_ver_710}.files | |
255 | -%defattr (-, root, bin) | |
256 | 200 | |
257 | -%files prof-710 -f pkg-prof-%{ghc_ver_710}.files | |
258 | -%defattr (-, root, bin) | |
259 | - | |
260 | -%files doc-710 -f pkg-doc-%{ghc_ver_710}.files | |
261 | -%defattr(-,root,bin) | |
262 | -%dir %attr (0755, root, sys) %{_datadir} | |
263 | -%dir %attr (0755, root, other) %{_docdir} | |
264 | -%endif | |
265 | 201 | |
266 | 202 | %changelog |
203 | +* Sat Jan 30 2016 - Osamu Tabata<cantimerny.g@gmail.com> | |
204 | +- build only 7.10 | |
267 | 205 | * Wed Jan 20 2016 - Osamu Tabata<cantimerny.g@gmail.com> |
268 | 206 | - initial commit |