日本OpenSolaris Users Group有志による、レポジトリサーバ作成のためのspecファイル群です。
Revision | 8c68f2a04e5884b9f9e5b135a89df6fec4f8ee26 (tree) |
---|---|
Time | 2014-11-03 11:56:25 |
Author | Osamu Tabata <cantimerny.g@gmai...> |
Commiter | Osamu Tabata |
spec_SFEghc78-parallel: initial commit
@@ -0,0 +1,157 @@ | ||
1 | +# | |
2 | +# spec file for package SFEghc78-parallel | |
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: parallel | |
15 | +IPS_package_name: library/ghc78/parallel | |
16 | +Version: 3.2.0.4 | |
17 | +Release: 1 | |
18 | +License: BSD | |
19 | +Group: Development/Languages/Haskell | |
20 | +URL: http://hackage.haskell.org/package/parallel | |
21 | +Source: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz | |
22 | +Summary: This package provides a library for parallel programming. | |
23 | +SUNW_Pkg: SFEghc78-parallel | |
24 | +SUNW_Copyright: ghc78-parallel.copyright | |
25 | +SUNW_BaseDir: %{_basedir} | |
26 | +BuildRoot: %{_tmppath}/%{name}-%{version}-build | |
27 | + | |
28 | +Requires: SFEghc78 | |
29 | +BuildRequires: SFEghc78-hscolour | |
30 | +BuildRequires: SFEghc78-haddock | |
31 | + | |
32 | +%description | |
33 | +This package provides a library for parallel programming. | |
34 | + | |
35 | +%package -n SFEghc78-parallel-prof | |
36 | +IPS_package_name: library/ghc78/parallel-prof | |
37 | +Summary: %{summary} - profiling libraries | |
38 | +SUNW_BaseDir: %{_basedir} | |
39 | +%include default-depend.inc | |
40 | +Requires: SFEghc78-parallel | |
41 | + | |
42 | +%package -n SFEghc78-parallel-doc | |
43 | +IPS_package_name: library/ghc78/parallel-doc | |
44 | +Summary: %{summary} - doc files | |
45 | +SUNW_BaseDir: %{_basedir} | |
46 | +%include default-depend.inc | |
47 | +Requires: SFEghc78-parallel | |
48 | + | |
49 | +%prep | |
50 | +%setup -q -n %{name}-%{version} | |
51 | +export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH | |
52 | + | |
53 | +# Need to use same gcc as we used to build ghc (gcc 4.x) | |
54 | +export CC=/usr/gnu/bin/gcc | |
55 | +export CXX=/usr/gnu/bin/g++ | |
56 | +export CXXFLAGS="%{gcc_cxx_optflags}" | |
57 | +export CFLAGS="%optflags" | |
58 | +export PKG_CONFIG_PATH="%{_cxx_libdir}/pkgconfig" | |
59 | +%if %{is_s10} | |
60 | +export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib' | |
61 | +export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib' | |
62 | +%else | |
63 | +export LDFLAGS="-L%{_cxx_libdir} -R%{_cxx_libdir}" | |
64 | +%endif | |
65 | +export PERL="/usr/perl5/bin/perl" | |
66 | + | |
67 | +GHC=/usr/bin/ghc | |
68 | +GHC_PKG=/usr/bin/ghc-pkg | |
69 | +HSC2HS=/usr/bin/hsc2hs | |
70 | +VERBOSE=--verbose=3 | |
71 | + | |
72 | +chmod a+x ./Setup.hs | |
73 | +runghc ./Setup.hs configure --prefix=%{_prefix} \ | |
74 | + --libdir=%{_cxx_libdir} \ | |
75 | + --docdir=%{_docdir}/%{name}-%{version} \ | |
76 | + --htmldir=%{_docdir}/ghc/html/libraries/%{name}-%{version} \ | |
77 | + --libsubdir='$compiler/$pkgid' \ | |
78 | + --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \ | |
79 | + --haddock-option="--html" \ | |
80 | + --enable-library-profiling \ | |
81 | + ${VERBOSE} | |
82 | + | |
83 | +%build | |
84 | +export LD_LIBRARY_PATH='/usr/gnu/lib' | |
85 | +%if %{is_s10} | |
86 | +export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib' | |
87 | +%endif | |
88 | +runghc ./Setup.hs build ${VERBOSE} | |
89 | +runghc ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source | |
90 | + | |
91 | +%install | |
92 | +export LD_LIBRARY_PATH=/usr/gnu/lib:$LD_LIBRARY_PATH | |
93 | +%if %{is_s10} | |
94 | +export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib' | |
95 | +%endif | |
96 | +rm -rf $RPM_BUILD_ROOT | |
97 | + | |
98 | +install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version} | |
99 | +runghc ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{name}-%{version}.conf | |
100 | +runghc ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT} | |
101 | + | |
102 | +install -d ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/ | |
103 | +install -c -m 755 %{name}-%{version}.conf ${RPM_BUILD_ROOT}%{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf | |
104 | + | |
105 | +# Prepare lists of files for packaging | |
106 | +cd %{_builddir}/%{name}-%{version} | |
107 | +find $RPM_BUILD_ROOT -type f -name "*.p_hi" > pkg-prof.files | |
108 | +find $RPM_BUILD_ROOT -type f -name "*_p.a" >> pkg-prof.files | |
109 | +find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" > pkg-all.files | |
110 | +sort pkg-prof.files > pkg-prof-sort.files | |
111 | +sort pkg-all.files > pkg-all-sort.files | |
112 | +comm -23 pkg-all-sort.files pkg-prof-sort.files > pkg.files | |
113 | +find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" > pkg-doc.files | |
114 | +sort pkg-doc.files > pkg-doc-sort.files | |
115 | +# Clean up syntax for %files section | |
116 | +cat pkg.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg.files | |
117 | +cat pkg-prof-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof.files | |
118 | +cat pkg-doc-sort.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc.files | |
119 | + | |
120 | +%clean | |
121 | +rm -rf $RPM_BUILD_ROOT | |
122 | + | |
123 | +%post | |
124 | +# The %install section above will only install files | |
125 | +# We need to register the package with ghc-pkg for ghc to find it | |
126 | +/usr/bin/ghc-pkg register --global --force %{_cxx_libdir}/ghc-%{ghc_version}/%{name}-%{version}/%{name}-%{version}.conf | |
127 | + | |
128 | +%post -n SFEghc78-parallel-doc | |
129 | +cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
130 | + | |
131 | +%preun | |
132 | +# Need to unregister the package with ghc-pkg for the rebuild of the spec file to work | |
133 | +/usr/bin/ghc-pkg unregister --global --force %{name}-%{version} | |
134 | + | |
135 | +%postun -n SFEghc78-parallel-doc | |
136 | +if [ "$1" -eq 0 ] && [ -x %{_docdir}/ghc/html/libraries/gen_contents_index ] ; then | |
137 | + cd %{_docdir}/ghc/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index | |
138 | +fi | |
139 | + | |
140 | +%files -f pkg.files | |
141 | +%defattr (-, root, bin) | |
142 | + | |
143 | +%files -n SFEghc78-parallel-prof -f pkg-prof.files | |
144 | +%defattr (-, root, bin) | |
145 | + | |
146 | +%files -n SFEghc78-parallel-doc -f pkg-doc.files | |
147 | +%defattr(-,root,root,-) | |
148 | +%dir %attr (0755, root, sys) %{_datadir} | |
149 | +%dir %attr (0755, root, other) %{_docdir} | |
150 | +%dir %attr (0755, root, bin) %{_docdir}/ghc | |
151 | +%dir %attr (0755, root, bin) %{_docdir}/ghc/html | |
152 | +%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries | |
153 | +%dir %attr (0755, root, bin) %{_docdir}/ghc/html/libraries/%{name}-%{version} | |
154 | + | |
155 | +%changelog | |
156 | +* Mon Nov 3 2014 - Osamu Tabata<cantimerny.g@gmail.com> | |
157 | +- Support for Solaris11.2 |
@@ -0,0 +1,39 @@ | ||
1 | +This library (libraries/parallel) is derived from code from | |
2 | +the GHC project which is largely (c) The University of | |
3 | +Glasgow, and distributable under a BSD-style license (see below). | |
4 | + | |
5 | +----------------------------------------------------------------------------- | |
6 | + | |
7 | +The Glasgow Haskell Compiler License | |
8 | + | |
9 | +Copyright 2004, The University Court of the University of Glasgow. | |
10 | +All rights reserved. | |
11 | + | |
12 | +Redistribution and use in source and binary forms, with or without | |
13 | +modification, are permitted provided that the following conditions are met: | |
14 | + | |
15 | +- Redistributions of source code must retain the above copyright notice, | |
16 | +this list of conditions and the following disclaimer. | |
17 | + | |
18 | +- Redistributions in binary form must reproduce the above copyright notice, | |
19 | +this list of conditions and the following disclaimer in the documentation | |
20 | +and/or other materials provided with the distribution. | |
21 | + | |
22 | +- Neither name of the University nor the names of its contributors may be | |
23 | +used to endorse or promote products derived from this software without | |
24 | +specific prior written permission. | |
25 | + | |
26 | +THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF | |
27 | +GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
28 | +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
29 | +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | |
30 | +UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE | |
31 | +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
32 | +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
33 | +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
34 | +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
35 | +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
36 | +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | |
37 | +DAMAGE. | |
38 | + | |
39 | +----------------------------------------------------------------------------- |