• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revision6677dd134957eadb64b4247796a4c0d9e76dfcfd (tree)
Time2013-12-22 13:34:03
AuthorOsamu Tabata <cantimerny.g@gmai...>
CommiterOsamu Tabata

Log Message

spec_SFEghc76-async: initial commit

Change Summary

Incremental Difference

diff -r 395f4ef4ee62 -r 6677dd134957 specs/SFEghc76-async.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/SFEghc76-async.spec Sun Dec 22 13:34:03 2013 +0900
@@ -0,0 +1,159 @@
1+#
2+# spec file for package SFEghc76-async
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.6.3
13+
14+Name: async
15+IPS_package_name: library/ghc76/async
16+Version: 2.0.1.5
17+Release: 1
18+License: BSD
19+Group: Development/Languages/Haskell
20+URL: https://github.com/simonmar/async
21+Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
22+Summary: This package provides a higher-level interface over threads, in which an Async
23+SUNW_Pkg: SFEghc76-async
24+SUNW_Copyright: ghc76-async.copyright
25+SUNW_BaseDir: %{_basedir}
26+BuildRoot: %{_tmppath}/%{name}-%{version}-build
27+
28+Requires: SFEgcc
29+Requires: SFEghc76
30+Requires: SFEghc76-stm
31+BuildRequires: SFEghc76-hscolour
32+BuildRequires: SFEghc76-stm-prof
33+
34+%description
35+This package provides a higher-level interface over threads, in which an Async a is a concurrent thread that will eventually deliver a value of type a. The package provides ways to create Async computations, wait for their results, and cancel them.
36+
37+%package -n SFEghc76-async-prof
38+IPS_package_name: library/ghc76/async-prof
39+Summary: %{summary} - profiling libraries
40+SUNW_BaseDir: %{_basedir}
41+%include default-depend.inc
42+Requires: SFEghc76-async
43+
44+%package -n SFEghc76-async-doc
45+IPS_package_name: library/ghc76/async-doc
46+Summary: %{summary} - doc files
47+SUNW_BaseDir: %{_basedir}
48+%include default-depend.inc
49+Requires: SFEghc76-async
50+
51+%prep
52+%setup -q -n %{name}-%{version}
53+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
54+
55+# Need to use same gcc as we used to build ghc (gcc 4.x)
56+export CC=/usr/gnu/bin/gcc
57+export CXX=/usr/gnu/bin/g++
58+export CXXFLAGS="%{gcc_cxx_optflags}"
59+export CFLAGS="%optflags"
60+export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig"
61+%if %{is_s10}
62+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
63+export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
64+%else
65+export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}"
66+%endif
67+export PERL="/usr/perl5/bin/perl"
68+
69+GHC=/usr/bin/ghc
70+GHC_PKG=/usr/bin/ghc-pkg
71+HSC2HS=/usr/bin/hsc2hs
72+VERBOSE=--verbose=3
73+
74+chmod a+x ./Setup.hs
75+runghc ./Setup.hs configure --prefix=%{_prefix} \
76+ --libdir=%{_cxx_libdir} \
77+ --docdir=%{_docdir}/%{name}-%{version} \
78+ --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \
79+ --libsubdir='$compiler/$pkgid' \
80+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
81+ --haddock-option="--html" \
82+ --enable-library-profiling \
83+ ${VERBOSE}
84+
85+%build
86+export LD_LIBRARY_PATH='/usr/gnu/lib'
87+%if %{is_s10}
88+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
89+%endif
90+runghc ./Setup.hs build ${VERBOSE}
91+runghc ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
92+
93+%install
94+export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH
95+%if %{is_s10}
96+export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
97+%endif
98+rm -rf $RPM_BUILD_ROOT
99+
100+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}
101+runghc ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{name}-%{version}.conf
102+runghc ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
103+
104+install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/
105+install -c -m 755 %{name}-%{version}.conf ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
106+
107+# Prepare lists of files for packaging
108+cd %{_builddir}/%{name}-%{version}
109+find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files
110+find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files
111+find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > pkg-all.files
112+sort pkg-prof.files > pkg-prof-sort.files
113+sort pkg-all.files > pkg-all-sort.files
114+comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files
115+find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files
116+sort pkg-doc.files > pkg-doc-sort.files
117+# Clean up syntax for %files section
118+cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.files
119+cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files
120+cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files
121+
122+%clean
123+rm -rf $RPM_BUILD_ROOT
124+
125+%post
126+# The %install section above will only install files
127+# We need to register the package with ghc-pkg for ghc to find it
128+/usr/bin/ghc-pkg register --global --force %{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf
129+
130+%post -n SFEghc76-async-doc
131+cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
132+
133+%preun
134+# Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
135+/usr/bin/ghc-pkg unregister --global --force %{name}-%{version}
136+
137+%postun -n SFEghc76-async-doc
138+if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then
139+ cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
140+fi
141+
142+%files -f pkg.files
143+%defattr (-, root, bin)
144+
145+%files -n SFEghc76-async-prof -f pkg-prof.files
146+%defattr (-, root, bin)
147+
148+%files -n SFEghc76-async-doc -f pkg-doc.files
149+%defattr(-,root,root,-)
150+%dir %attr (0755, root, sys) %{_datadir}
151+%dir %attr (0755, root, other) %{_docdir}
152+%dir %attr (0755, root, bin) %{_docdir}/ghc
153+%dir %attr (0755, root, bin) %{_docdir}/ghc/html
154+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries
155+%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries/%{name}-%{version}
156+
157+%changelog
158+* Sun Dec 22 2013 - Osamu Tabata<cantimerny.g@gmail.com>
159+- Support for Solaris11
diff -r 395f4ef4ee62 -r 6677dd134957 specs/copyright/ghc76-async.copyright
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/copyright/ghc76-async.copyright Sun Dec 22 13:34:03 2013 +0900
@@ -0,0 +1,30 @@
1+Copyright (c) 2012, Simon Marlow
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 are met:
7+
8+ * Redistributions of source code must retain the above copyright
9+ notice, this list of conditions and the following disclaimer.
10+
11+ * Redistributions in binary form must reproduce the above
12+ copyright notice, this list of conditions and the following
13+ disclaimer in the documentation and/or other materials provided
14+ with the distribution.
15+
16+ * Neither the name of Simon Marlow nor the names of other
17+ contributors may be used to endorse or promote products derived
18+ from this software without specific prior written permission.
19+
20+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Show on old repository browser