• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revision153ccd5d3f41cec4382db4a10e584b5a64998a27 (tree)
Time2016-01-24 17:34:29
AuthorOsamu Tabata <cantimerny.g@gmai...>
CommiterOsamu Tabata

Log Message

spec_SFEghc-attoparsec: initial commit

Change Summary

Incremental Difference

diff -r 80d696603793 -r 153ccd5d3f41 specs/SFEghc-attoparsec.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/SFEghc-attoparsec.spec Sun Jan 24 17:34:29 2016 +0900
@@ -0,0 +1,281 @@
1+#
2+# spec file for package SFEghc-attoparsec
3+#
4+
5+%include Solaris.inc
6+%include default-depend.inc
7+%include packagenamemacros.inc
8+%define cc_is_gcc 1
9+%include base.inc
10+%include usr-gnu.inc
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
17+%include yesod-version-sets.inc
18+
19+%define oracle_solaris_11_2 %(grep 'Oracle Solaris 11.2' /etc/release > /dev/null ; if [ $? -eq 0 ]; then echo '1'; else echo '0'; fi)
20+
21+%define pname attoparsec
22+
23+Name: SFEghc-%{pname}
24+IPS_package_name: library/ghc/%{pname}
25+Group: Development/Languages/Haskell
26+Version: 0.12.1.6
27+License: BSD3
28+URL: https://github.com/bos/attoparsec
29+Summary: Fast combinator parsing for bytestrings and text
30+Source: http://hackage.haskell.org/packages/archive/%{pname}/%{version}/%{pname}-%{version}.tar.gz
31+SUNW_Copyright: ghc-%{pname}.copyright
32+SUNW_BaseDir: %{_basedir}
33+BuildRoot: %{_tmppath}/%{name}-%{version}-build
34+
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}
57+BuildRequires: library/ghc/hscolour-710 = %{hscolour_ver}
58+BuildRequires: library/ghc/hscolour-710/prof = %{hscolour_ver}
59+BuildRequires: library/ghc/text-710 = %{text_ver}
60+BuildRequires: library/ghc/text-710/prof = %{text_ver}
61+BuildRequires: library/ghc/hashable-710 = %{hashable_ver}
62+BuildRequires: library/ghc/hashable-710/prof = %{hashable_ver}
63+BuildRequires: library/ghc/scientific-710 = %{scientific_ver}
64+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+BuildRequires: library/ghc/primitive-710 = %{primitive_ver}
68+BuildRequires: library/ghc/primitive-710/prof = %{primitive_ver}
69+BuildRequires: library/ghc/vector-710 = %{vector_ver}
70+BuildRequires: library/ghc/vector-710/prof = %{vector_ver}
71+
72+%description
73+A fast parser combinator library, aimed particularly at dealing
74+efficiently with network protocols and complicated text/binary
75+file formats.
76+
77+
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+%package 710
112+IPS_package_name: library/ghc/%{pname}-710
113+Summary: attoparsec system
114+SUNW_BaseDir: %{_basedir}
115+%include default-depend.inc
116+Requires: developer/ghc-710 = %{ghc_ver_710}
117+
118+%package prof-710
119+IPS_package_name: library/ghc/%{pname}-710/prof
120+Summary: %{summary} - profiling libraries
121+SUNW_BaseDir: %{_basedir}
122+%include default-depend.inc
123+Requires: developer/ghc-710/prof = %{ghc_ver_710}
124+Requires: library/ghc/%{pname}-710
125+
126+%package doc-710
127+IPS_package_name: library/ghc/%{pname}-710/doc
128+Summary: %{summary} - doc files
129+SUNW_BaseDir: %{_basedir}
130+%include default-depend.inc
131+Requires: library/ghc/%{pname}-710
132+
133+%description 710
134+A fast parser combinator library, aimed particularly at dealing
135+efficiently with network protocols and complicated text/binary
136+file formats.
137+
138+
139+%endif
140+
141+
142+%prep
143+%setup -q -n %{pname}-%{version}
144+
145+%build
146+
147+build_for () {
148+ ghc_version=$1
149+ CPUNUM=$(psrinfo | gawk '$2=="on-line"{cpus++}END{print (cpus==0)?1:cpus}')
150+ CPUS=$(test $CPUNUM -ge 4 && echo 4 || echo $CPUNUM)
151+ # Need to use same gcc as we used to build ghc (gcc 4.x)
152+ export CC=/usr/bin/gcc
153+ export CXX=/usr/bin/g++
154+ export CXXFLAGS="%{gcc_cxx_optflags}"
155+ export CFLAGS="%optflags"
156+ export LD_LIBRARY_PATH=/usr/gnu/lib:/usr/lib:$LD_LIBRARY_PATH
157+ export PKG_CONFIG_PATH="%_pkg_config_path"
158+ export PERL="/usr/perl5/bin/perl"
159+
160+ %if %{oracle_solaris_11_2}
161+ export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
162+ export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
163+ %else
164+ export LDFLAGS="-L%{_libdir} -R%{_libdir}"
165+ %endif
166+
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}
171+ VERBOSE=--verbose=2
172+
173+ 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} \
176+ --libdir=%{_libdir} \
177+ --docdir=%{_datadir}/doc/ghc-${ghc_version}/%{pname}-%{version} \
178+ --htmldir=%{_datadir}/doc/ghc-${ghc_version}/html/libraries/%{pname}-%{version} \
179+ --libsubdir='$compiler/$pkgid' \
180+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} --with-haddock=${HADDOCK} \
181+ --haddock-option="--html" \
182+ --enable-library-profiling \
183+ ${VERBOSE}
184+
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
187+
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}
191+
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
194+
195+ # LICENCE FILE
196+ # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-${ghc_version}
197+ # # Prepare lists of files for packaging
198+ # 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
207+ # 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
211+}
212+
213+
214+%if %{build78}
215+build_for 7.8.3
216+%endif
217+
218+%if %{build710}
219+build_for 7.10.3
220+%endif
221+
222+%install
223+
224+
225+%clean
226+rm -rf $RPM_BUILD_ROOT
227+
228+
229+%if %{oracle_solaris_11_2}
230+ # pass
231+%else
232+ # not solaris11
233+# %post
234+# The %install section above will only install files
235+# 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
237+
238+# %post -n SFEghc78-attoparsec-doc
239+# cd %{_datadir}/doc/ghc-${ghc_version}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
240+
241+# %preun
242+# # Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
243+# /usr/bin/ghc-pkg unregister --global --force %{pname}-%{version}
244+
245+# %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
248+# fi
249+
250+%endif
251+
252+
253+%if %{build78}
254+%files 78 -f pkg-%{ghc_ver_78}.files
255+%defattr (-, root, bin)
256+
257+%files prof-78 -f pkg-prof-%{ghc_ver_78}.files
258+%defattr (-, root, bin)
259+
260+%files doc-78 -f pkg-doc-%{ghc_ver_78}.files
261+%defattr(-,root,bin)
262+%dir %attr (0755, root, sys) %{_datadir}
263+%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+
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+
279+%changelog
280+* Wed Jan 24 2016 - Osamu Tabata<cantimerny.g@gmail.com>
281+- initial commit
diff -r 80d696603793 -r 153ccd5d3f41 specs/copyright/ghc-attoparsec.copyright
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/copyright/ghc-attoparsec.copyright Sun Jan 24 17:34:29 2016 +0900
@@ -0,0 +1,30 @@
1+Copyright (c) Lennart Kolmodin
2+
3+All rights reserved.
4+
5+Redistribution and use in source and binary forms, with or without
6+modification, are permitted provided that the following conditions
7+are met:
8+
9+1. Redistributions of source code must retain the above copyright
10+ notice, this list of conditions and the following disclaimer.
11+
12+2. Redistributions in binary form must reproduce the above copyright
13+ notice, this list of conditions and the following disclaimer in the
14+ documentation and/or other materials provided with the distribution.
15+
16+3. Neither the name of the author nor the names of his contributors
17+ may be used to endorse or promote products derived from this software
18+ without specific prior written permission.
19+
20+THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
21+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
24+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30+POSSIBILITY OF SUCH DAMAGE.
Show on old repository browser