• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revisioneb87cc9ae48924c8550cec7e2307758cdc75896f (tree)
Time2016-02-06 17:08:28
AuthorOsamu Tabata <cantimerny.g@gmai...>
CommiterOsamu Tabata

Log Message

spec_SFEghc-basic-prelude: initial commit

Change Summary

Incremental Difference

diff -r ccb35b9a7d35 -r eb87cc9ae489 specs/SFEghc-basic-prelude.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/SFEghc-basic-prelude.spec Sat Feb 06 17:08:28 2016 +0900
@@ -0,0 +1,223 @@
1+#
2+# spec file for package SFEghc-basic-prelude
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 ghc_ver 7.10.3
13+%include yesod-version-sets.inc
14+
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)
16+
17+%define pname basic-prelude
18+
19+Name: SFEghc-%{pname}
20+IPS_package_name: library/ghc/%{pname}
21+Group: Development/Languages/Haskell
22+Version: 0.5.0
23+License: MIT
24+URL: https://github.com/snoyberg/basic-prelude
25+Summary: An enhanced core prelude; a common foundation for alternate preludes.
26+Source: http://hackage.haskell.org/packages/archive/%{pname}/%{version}/%{pname}-%{version}.tar.gz
27+SUNW_Copyright: ghc-%{pname}.copyright
28+SUNW_BaseDir: %{_basedir}
29+BuildRoot: %{_tmppath}/%{name}-%{version}-build
30+
31+BuildRequires: developer/ghc-710 = %{ghc_ver}
32+BuildRequires: developer/ghc-710/prof = %{ghc_ver}
33+BuildRequires: library/ghc/hscolour-710 = %{hscolour_ver}
34+BuildRequires: library/ghc/hscolour-710/prof = %{hscolour_ver}
35+BuildRequires: library/ghc/ReadArgs-710 = %{ReadArgs_ver}
36+BuildRequires: library/ghc/ReadArgs-710/prof = %{ReadArgs_ver}
37+BuildRequires: library/ghc/hashable-710 = %{hashable_ver}
38+BuildRequires: library/ghc/hashable-710/prof = %{hashable_ver}
39+BuildRequires: library/ghc/lifted-base-710 = %{lifted_base_ver}
40+BuildRequires: library/ghc/lifted-base-710/prof = %{lifted_base_ver}
41+BuildRequires: library/ghc/safe-710 = %{safe_ver}
42+BuildRequires: library/ghc/safe-710/prof = %{safe_ver}
43+BuildRequires: library/ghc/text-710 = %{text_ver}
44+BuildRequires: library/ghc/text-710/prof = %{text_ver}
45+BuildRequires: library/ghc/unordered-containers-710 = %{unordered_containers_ver}
46+BuildRequires: library/ghc/unordered-containers-710/prof = %{unordered_containers_ver}
47+BuildRequires: library/ghc/vector-710 = %{vector_ver}
48+BuildRequires: library/ghc/vector-710/prof = %{vector_ver}
49+
50+%description
51+The premise of @basic-prelude@ is that there are a lot of very commonly desired features missing from the standard @Prelude@, such as commonly used operators (@\<$\>@ and @>=>@, for instance) and imports for common datatypes (e.g., @ByteString@ and @Vector@). At the same time, there are lots of other components which are more debatable, such as providing polymorphic versions of common functions.
52+.
53+So @basic-prelude@ is intended to give a common foundation for a number of alternate preludes. The package provides two modules: @CorePrelude@ provides the common ground for other preludes to build on top of, while @BasicPrelude@ exports @CorePrelude@ together with commonly used list functions to provide a drop-in replacement for the standard @Prelude@.
54+.
55+Users wishing to have an improved @Prelude@ can use @BasicPrelude@. Developers wishing to create a new prelude should use @CorePrelude@.
56+
57+
58+
59+
60+%package 710
61+IPS_package_name: library/ghc/%{pname}-710
62+Summary: basic-prelude system
63+SUNW_BaseDir: %{_basedir}
64+%include default-depend.inc
65+Requires: developer/ghc-710 = %{ghc_ver}
66+Requires: library/ghc/ReadArgs-710 = %{ReadArgs_ver}
67+Requires: library/ghc/hashable-710 = %{hashable_ver}
68+Requires: library/ghc/lifted-base-710 = %{lifted_base_ver}
69+Requires: library/ghc/safe-710 = %{safe_ver}
70+Requires: library/ghc/text-710 = %{text_ver}
71+Requires: library/ghc/unordered-containers-710 = %{unordered_containers_ver}
72+Requires: library/ghc/vector-710 = %{vector_ver}
73+
74+%package prof-710
75+IPS_package_name: library/ghc/%{pname}-710/prof
76+Summary: %{summary} - profiling libraries
77+SUNW_BaseDir: %{_basedir}
78+%include default-depend.inc
79+Requires: developer/ghc-710/prof = %{ghc_ver}
80+Requires: library/ghc/%{pname}-710
81+Requires: library/ghc/ReadArgs-710/prof = %{ReadArgs_ver}
82+Requires: library/ghc/hashable-710/prof = %{hashable_ver}
83+Requires: library/ghc/lifted-base-710/prof = %{lifted_base_ver}
84+Requires: library/ghc/safe-710/prof = %{safe_ver}
85+Requires: library/ghc/text-710/prof = %{text_ver}
86+Requires: library/ghc/unordered-containers-710/prof = %{unordered_containers_ver}
87+Requires: library/ghc/vector-710/prof = %{vector_ver}
88+
89+%package doc-710
90+IPS_package_name: library/ghc/%{pname}-710/doc
91+Summary: %{summary} - doc files
92+SUNW_BaseDir: %{_basedir}
93+%include default-depend.inc
94+Requires: library/ghc/%{pname}-710
95+
96+%description 710
97+The premise of @basic-prelude@ is that there are a lot of very commonly desired features missing from the standard @Prelude@, such as commonly used operators (@\<$\>@ and @>=>@, for instance) and imports for common datatypes (e.g., @ByteString@ and @Vector@). At the same time, there are lots of other components which are more debatable, such as providing polymorphic versions of common functions.
98+.
99+So @basic-prelude@ is intended to give a common foundation for a number of alternate preludes. The package provides two modules: @CorePrelude@ provides the common ground for other preludes to build on top of, while @BasicPrelude@ exports @CorePrelude@ together with commonly used list functions to provide a drop-in replacement for the standard @Prelude@.
100+.
101+Users wishing to have an improved @Prelude@ can use @BasicPrelude@. Developers wishing to create a new prelude should use @CorePrelude@.
102+
103+
104+
105+
106+%prep
107+%setup -q -n %{pname}-%{version}
108+
109+%build
110+
111+build_for () {
112+ CPUNUM=$(psrinfo | gawk '$2=="on-line"{cpus++}END{print (cpus==0)?1:cpus}')
113+ CPUS=$(test $CPUNUM -ge 4 && echo 4 || echo $CPUNUM)
114+ # Need to use same gcc as we used to build ghc (gcc 4.x)
115+ export CC=/usr/bin/gcc
116+ export CXX=/usr/bin/g++
117+ export CXXFLAGS="%{gcc_cxx_optflags}"
118+ export CFLAGS="%optflags"
119+ export LD_LIBRARY_PATH=/usr/gnu/lib:/usr/lib:$LD_LIBRARY_PATH
120+ export PKG_CONFIG_PATH="%_pkg_config_path"
121+ export PERL="/usr/perl5/bin/perl"
122+
123+ %if %{oracle_solaris_11_2}
124+ export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
125+ export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
126+ %else
127+ export LDFLAGS="-L%{_libdir} -R%{_libdir}"
128+ %endif
129+
130+ GHC=/usr/gnu/bin/ghc-%{ghc_ver}
131+ GHC_PKG=/usr/gnu/bin/ghc-pkg-%{ghc_ver}
132+ HSC2HS=/usr/gnu/bin/hsc2hs-%{ghc_ver}
133+ HADDOCK=/usr/gnu/bin/haddock-ghc-%{ghc_ver}
134+ VERBOSE=--verbose=2
135+
136+ chmod a+x ./Setup.hs
137+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs clean
138+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs configure --prefix=%{_prefix} \
139+ --libdir=%{_libdir} \
140+ --docdir=%{_datadir}/doc/ghc-%{ghc_ver}/%{pname}-%{version} \
141+ --htmldir=%{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/%{pname}-%{version} \
142+ --libsubdir='$compiler/$pkgid' \
143+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} --with-haddock=${HADDOCK} \
144+ --haddock-option="--html" \
145+ --enable-library-profiling \
146+ ${VERBOSE}
147+
148+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs build ${VERBOSE} -j$CPUS
149+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
150+
151+ install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}
152+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf
153+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
154+
155+ install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/
156+ install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/%{pname}-%{version}.conf
157+
158+ # LICENCE FILE
159+ # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-%{ghc_ver}
160+ # # Prepare lists of files for packaging
161+ # cd %{_builddir}/%{pname}-%{version}
162+ find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-%{ghc_ver}" > pkg-prof-%{ghc_ver}.files
163+ find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-%{ghc_ver}" >> pkg-prof-%{ghc_ver}.files
164+ find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-all-%{ghc_ver}.files
165+ sort pkg-prof-%{ghc_ver}.files > pkg-prof-sort-%{ghc_ver}.files
166+ sort pkg-all-%{ghc_ver}.files > pkg-all-sort-%{ghc_ver}.files
167+ comm -23 pkg-all-sort-%{ghc_ver}.files pkg-prof-sort-%{ghc_ver}.files > pkg-%{ghc_ver}.files
168+ find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-doc-%{ghc_ver}.files
169+ sort pkg-doc-%{ghc_ver}.files > pkg-doc-sort-%{ghc_ver}.files
170+ # Clean up syntax for %files section
171+ cat pkg-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-%{ghc_ver}.files
172+ cat pkg-prof-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-%{ghc_ver}.files
173+ cat pkg-doc-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-%{ghc_ver}.files
174+}
175+build_for
176+
177+
178+%install
179+
180+
181+%clean
182+rm -rf $RPM_BUILD_ROOT
183+
184+
185+%if %{oracle_solaris_11_2}
186+ # pass
187+%else
188+ # not solaris11
189+# %post
190+# The %install section above will only install files
191+# We need to register the package with ghc-pkg for ghc to find it
192+# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-%{ghc_ver}/%{cname}-%{version}/%{cname}-%{version}.conf
193+
194+# %post -n SFEghc78-basic-prelude-doc
195+# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
196+
197+# %preun
198+# # Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
199+# /usr/bin/ghc-pkg unregister --global --force %{pname}-%{version}
200+
201+# %postun -n SFEghc78-basic-prelude-doc
202+# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/gen_contents_index ] ; then
203+# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
204+# fi
205+
206+%endif
207+
208+
209+%files 710 -f pkg-%{ghc_ver}.files
210+%defattr (-, root, bin)
211+
212+%files prof-710 -f pkg-prof-%{ghc_ver}.files
213+%defattr (-, root, bin)
214+
215+%files doc-710 -f pkg-doc-%{ghc_ver}.files
216+%defattr(-,root,bin)
217+%dir %attr (0755, root, sys) %{_datadir}
218+%dir %attr (0755, root, other) %{_docdir}
219+
220+
221+%changelog
222+* Sat Feb 06 2016 - Osamu Tabata<cantimerny.g@gmail.com>
223+- initial commit
diff -r ccb35b9a7d35 -r eb87cc9ae489 specs/copyright/ghc-basic-prelude.copyright
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/copyright/ghc-basic-prelude.copyright Sat Feb 06 17:08:28 2016 +0900
@@ -0,0 +1,20 @@
1+Copyright (c) 2012 Michael Snoyman, http://www.yesodweb.com/
2+
3+Permission is hereby granted, free of charge, to any person obtaining
4+a copy of this software and associated documentation files (the
5+"Software"), to deal in the Software without restriction, including
6+without limitation the rights to use, copy, modify, merge, publish,
7+distribute, sublicense, and/or sell copies of the Software, and to
8+permit persons to whom the Software is furnished to do so, subject to
9+the following conditions:
10+
11+The above copyright notice and this permission notice shall be
12+included in all copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Show on old repository browser