• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revision9f761293d4ee7ef996727a711f100a396b9ecde8 (tree)
Time2014-11-03 09:24:59
AuthorOsamu Tabata <cantimerny.g@gmai...>
CommiterOsamu Tabata

Log Message

spec_SFEghc78-attoparsec: initial commit

Change Summary

Incremental Difference

diff -r 84e5d94b9bdd -r 9f761293d4ee specs/SFEghc78-attoparsec.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/SFEghc78-attoparsec.spec Mon Nov 03 09:24:59 2014 +0900
@@ -0,0 +1,161 @@
1+#
2+# spec file for package SFEghc78-attoparsec
3+#
4+
5+%include Solaris.inc
6+%include packagenamemacros.inc
7+%include default-depend.inc
8+
9+%define cc_is_gcc 1
10+%include base.inc
11+
12+%define ghc_version 7.8.3
13+
14+Name: attoparsec
15+IPS_package_name: library/ghc78/attoparsec
16+Version: 0.10.4.0
17+Release: 1
18+License: BSD
19+Group: Development/Languages/Haskell
20+URL: https://github.com/bos/attoparsec
21+Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
22+Summary: attoparsec is a fast Haskell parser combinator library
23+SUNW_Pkg: SFEghc78-attoparsec
24+SUNW_Copyright: ghc78-attoparsec.copyright
25+SUNW_BaseDir: %{_basedir}
26+BuildRoot: %{_tmppath}/%{name}-%{version}-build
27+
28+Requires: SFEghc78
29+Requires: SFEgh78-text
30+BuildRequires: SFEghc78-text-prof
31+BuildRequires: SFEghc78-hscolour
32+BuildRequires: SFEghc78-haddock
33+
34+%description
35+attoparsec is a fast Haskell parser combinator library, aimed
36+particularly at dealing efficiently with network protocols and
37+complicated text/binary file formats.
38+
39+%package -n SFEghc78-attoparsec-prof
40+IPS_package_name: library/ghc78/attoparsec-prof
41+Summary: %{summary} - profiling libraries
42+SUNW_BaseDir: %{_basedir}
43+%include default-depend.inc
44+Requires: SFEghc78-attoparsec
45+
46+%package -n SFEghc78-attoparsec-doc
47+IPS_package_name: library/ghc78/attoparsec-doc
48+Summary: %{summary} - doc files
49+SUNW_BaseDir: %{_basedir}
50+%include default-depend.inc
51+Requires: SFEghc78-attoparsec
52+
53+%prep
54+%setup -q -n %{name}-%{version}
55+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
56+
57+# Need to use same gcc as we used to build ghc (gcc 4.x)
58+export CC=/usr/gnu/bin/gcc
59+export CXX=/usr/gnu/bin/g++
60+export CXXFLAGS="%{gcc_cxx_optflags}"
61+export CFLAGS="%optflags"
62+export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
63+%if %{is_s10}
64+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
65+export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
66+%else
67+export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
68+%endif
69+export PERL="/usr/perl5/bin/perl"
70+
71+GHC=/usr/bin/ghc
72+GHC_PKG=/usr/bin/ghc-pkg
73+HSC2HS=/usr/bin/hsc2hs
74+VERBOSE=--verbose=3
75+
76+chmod a+x ./Setup.lhs
77+runghc ./Setup.lhs configure --prefix=%{_prefix} \
78+ --libdir=%{_cxx_libdir} \
79+ --docdir=%{_docdir}/%{name}-%{version} \
80+ --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \
81+ --libsubdir='$compiler/$pkgid' \
82+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
83+ --haddock-option="--html" \
84+ --enable-library-profiling \
85+ ${VERBOSE}
86+
87+%build
88+export LD_LIBRARY_PATH='/usr/gnu/lib'
89+%if %{is_s10}
90+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
91+%endif
92+runghc ./Setup.lhs build ${VERBOSE}
93+runghc ./Setup.lhs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
94+
95+%install
96+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
97+%if %{is_s10}
98+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
99+%endif
100+rm -rf $RPM_BUILD_ROOT
101+
102+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}
103+runghc ./Setup.lhs register ${VERBOSE} --gen-pkg-config=%{name}-%{version}.conf
104+runghc ./Setup.lhs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
105+
106+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/
107+install -c -m 755 %{name}-%{version}.conf ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
108+
109+# Prepare lists of files for packaging
110+cd %{_builddir}/%{name}-%{version}
111+find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files
112+find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files
113+find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > pkg-all.files
114+sort pkg-prof.files > pkg-prof-sort.files
115+sort pkg-all.files > pkg-all-sort.files
116+comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files
117+find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files
118+sort pkg-doc.files > pkg-doc-sort.files
119+# Clean up syntax for %files section
120+cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.files
121+cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files
122+cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files
123+
124+%clean
125+rm -rf $RPM_BUILD_ROOT
126+
127+%post
128+# The %install section above will only install files
129+# We need to register the package with ghc-pkg for ghc to find it
130+/usr/bin/ghc-pkg register --global --force %{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
131+
132+%post -n SFEghc78-attoparsec-doc
133+cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
134+
135+%preun
136+# Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
137+/usr/bin/ghc-pkg unregister --global --force %{name}-%{version}
138+
139+%postun -n SFEghc78-attoparsec-doc
140+if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then
141+ cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
142+fi
143+
144+%files -f pkg.files
145+%defattr (-, root, bin)
146+
147+%files -n SFEghc78-attoparsec-prof -f pkg-prof.files
148+%defattr (-, root, bin)
149+
150+%files -n SFEghc78-attoparsec-doc -f pkg-doc.files
151+%defattr(-,root,root,-)
152+%dir %attr (0755, root, sys) %{_datadir}
153+%dir %attr (0755, root, other) %{_docdir}
154+%dir %attr (0755, root, bin) %{_docdir}/ghc
155+%dir %attr (0755, root, bin) %{_docdir}/ghc/html
156+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries
157+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries/%{name}-%{version}
158+
159+%changelog
160+* Mon Nov 3 2014 - Osamu Tabata<cantimerny.g@gmail.com>
161+- Support for Solaris11.2
diff -r 84e5d94b9bdd -r 9f761293d4ee specs/copyright/ghc78-attoparsec.copyright
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/copyright/ghc78-attoparsec.copyright Mon Nov 03 09:24:59 2014 +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