• R/O
  • SSH

contrib-spec-files: Commit

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


Commit MetaInfo

Revision38fdfcaa85222bb81286214261bf1a696f196a88 (tree)
Time2016-01-31 23:09:24
AuthorOsamu Tabata <cantimerny.g@gmai...>
CommiterOsamu Tabata

Log Message

spec_SFEghc-connection: initial commit

Change Summary

Incremental Difference

diff -r 4ac09f138e93 -r 38fdfcaa8522 specs/SFEghc-connection.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/SFEghc-connection.spec Sun Jan 31 23:09:24 2016 +0900
@@ -0,0 +1,227 @@
1+#
2+# spec file for package SFEghc-connection
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 connection
18+
19+Name: SFEghc-%{pname}
20+IPS_package_name: library/ghc/%{pname}
21+Group: Development/Languages/Haskell
22+Version: 0.2.5
23+License: BSD3
24+URL: http://github.com/vincenthz/hs-connection
25+Summary: Simple and easy network connections API
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/data-default-class-710 = %{data_default_class_ver}
36+BuildRequires: library/ghc/data-default-class-710/prof = %{data_default_class_ver}
37+BuildRequires: library/ghc/network-710 = %{network_ver}
38+BuildRequires: library/ghc/network-710/prof = %{network_ver}
39+BuildRequires: library/ghc/socks-710 = %{socks_ver}
40+BuildRequires: library/ghc/socks-710/prof = %{socks_ver}
41+BuildRequires: library/ghc/tls-710 = %{tls_ver}
42+BuildRequires: library/ghc/tls-710/prof = %{tls_ver}
43+BuildRequires: library/ghc/x509-710 = %{x509_ver}
44+BuildRequires: library/ghc/x509-710/prof = %{x509_ver}
45+BuildRequires: library/ghc/x509-store-710 = %{x509_store_ver}
46+BuildRequires: library/ghc/x509-store-710/prof = %{x509_store_ver}
47+BuildRequires: library/ghc/x509-system-710 = %{x509_system_ver}
48+BuildRequires: library/ghc/x509-system-710/prof = %{x509_system_ver}
49+BuildRequires: library/ghc/x509-validation-710 = %{x509_validation_ver}
50+BuildRequires: library/ghc/x509-validation-710/prof = %{x509_validation_ver}
51+
52+%description
53+Simple network library for all your connection need.
54+.
55+Features: Really simple to use, SSL/TLS, SOCKS.
56+.
57+This library provides a very simple api to create sockets
58+to a destination with the choice of SSL/TLS, and SOCKS.
59+
60+
61+
62+%package 710
63+IPS_package_name: library/ghc/%{pname}-710
64+Summary: connection system
65+SUNW_BaseDir: %{_basedir}
66+%include default-depend.inc
67+Requires: developer/ghc-710 = %{ghc_ver}
68+Requires: library/ghc/data-default-class-710 = %{data_default_class_ver}
69+Requires: library/ghc/network-710 = %{network_ver}
70+Requires: library/ghc/socks-710 = %{socks_ver}
71+Requires: library/ghc/tls-710 = %{tls_ver}
72+Requires: library/ghc/x509-710 = %{x509_ver}
73+Requires: library/ghc/x509-store-710 = %{x509_store_ver}
74+Requires: library/ghc/x509-system-710 = %{x509_system_ver}
75+Requires: library/ghc/x509-validation-710 = %{x509_validation_ver}
76+
77+%package prof-710
78+IPS_package_name: library/ghc/%{pname}-710/prof
79+Summary: %{summary} - profiling libraries
80+SUNW_BaseDir: %{_basedir}
81+%include default-depend.inc
82+Requires: developer/ghc-710/prof = %{ghc_ver}
83+Requires: library/ghc/%{pname}-710
84+Requires: library/ghc/data-default-class-710/prof = %{data_default_class_ver}
85+Requires: library/ghc/network-710/prof = %{network_ver}
86+Requires: library/ghc/socks-710/prof = %{socks_ver}
87+Requires: library/ghc/tls-710/prof = %{tls_ver}
88+Requires: library/ghc/x509-710/prof = %{x509_ver}
89+Requires: library/ghc/x509-store-710/prof = %{x509_store_ver}
90+Requires: library/ghc/x509-system-710/prof = %{x509_system_ver}
91+Requires: library/ghc/x509-validation-710/prof = %{x509_validation_ver}
92+
93+%package doc-710
94+IPS_package_name: library/ghc/%{pname}-710/doc
95+Summary: %{summary} - doc files
96+SUNW_BaseDir: %{_basedir}
97+%include default-depend.inc
98+Requires: library/ghc/%{pname}-710
99+
100+%description 710
101+Simple network library for all your connection need.
102+.
103+Features: Really simple to use, SSL/TLS, SOCKS.
104+.
105+This library provides a very simple api to create sockets
106+to a destination with the choice of SSL/TLS, and SOCKS.
107+
108+
109+
110+%prep
111+%setup -q -n %{pname}-%{version}
112+
113+%build
114+
115+build_for () {
116+ CPUNUM=$(psrinfo | gawk '$2=="on-line"{cpus++}END{print (cpus==0)?1:cpus}')
117+ CPUS=$(test $CPUNUM -ge 4 && echo 4 || echo $CPUNUM)
118+ # Need to use same gcc as we used to build ghc (gcc 4.x)
119+ export CC=/usr/bin/gcc
120+ export CXX=/usr/bin/g++
121+ export CXXFLAGS="%{gcc_cxx_optflags}"
122+ export CFLAGS="%optflags"
123+ export LD_LIBRARY_PATH=/usr/gnu/lib:/usr/lib:$LD_LIBRARY_PATH
124+ export PKG_CONFIG_PATH="%_pkg_config_path"
125+ export PERL="/usr/perl5/bin/perl"
126+
127+ %if %{oracle_solaris_11_2}
128+ export LD_OPTIONS='-L/usr/gnu/lib -R/usr/gnu/lib'
129+ export LDFLAGS='-L/usr/gnu/lib -R/usr/gnu/lib'
130+ %else
131+ export LDFLAGS="-L%{_libdir} -R%{_libdir}"
132+ %endif
133+
134+ GHC=/usr/gnu/bin/ghc-%{ghc_ver}
135+ GHC_PKG=/usr/gnu/bin/ghc-pkg-%{ghc_ver}
136+ HSC2HS=/usr/gnu/bin/hsc2hs-%{ghc_ver}
137+ HADDOCK=/usr/gnu/bin/haddock-ghc-%{ghc_ver}
138+ VERBOSE=--verbose=2
139+
140+ chmod a+x ./Setup.hs
141+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs clean
142+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs configure --prefix=%{_prefix} \
143+ --libdir=%{_libdir} \
144+ --docdir=%{_datadir}/doc/ghc-%{ghc_ver}/%{pname}-%{version} \
145+ --htmldir=%{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/%{pname}-%{version} \
146+ --libsubdir='$compiler/$pkgid' \
147+ --with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} --with-haddock=${HADDOCK} \
148+ --haddock-option="--html" \
149+ --enable-library-profiling \
150+ ${VERBOSE}
151+
152+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs build ${VERBOSE} -j$CPUS
153+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs haddock ${VERBOSE} --executables --hoogle --hyperlink-source
154+
155+ install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}
156+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs register ${VERBOSE} --gen-pkg-config=%{pname}-%{version}.conf
157+ /usr/gnu/bin/runghc-%{ghc_ver} ./Setup.hs copy ${VERBOSE} --destdir=${RPM_BUILD_ROOT}
158+
159+ install -d ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/
160+ install -c -m 755 %{pname}-%{version}.conf ${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_ver}/%{pname}-%{version}/%{pname}-%{version}.conf
161+
162+ # LICENCE FILE
163+ # mv $RPM_BUILD_ROOT%{_datadir}/doc/%{pname}-%{version} $RPM_BUILD_ROOT%/%{_datadir}/doc/ghc-%{ghc_ver}
164+ # # Prepare lists of files for packaging
165+ # cd %{_builddir}/%{pname}-%{version}
166+ find $RPM_BUILD_ROOT -type f -name "*.p_hi" | grep "ghc-%{ghc_ver}" > pkg-prof-%{ghc_ver}.files
167+ find $RPM_BUILD_ROOT -type f -name "*_p.a" | grep "ghc-%{ghc_ver}" >> pkg-prof-%{ghc_ver}.files
168+ find $RPM_BUILD_ROOT%{_libdir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-all-%{ghc_ver}.files
169+ sort pkg-prof-%{ghc_ver}.files > pkg-prof-sort-%{ghc_ver}.files
170+ sort pkg-all-%{ghc_ver}.files > pkg-all-sort-%{ghc_ver}.files
171+ comm -23 pkg-all-sort-%{ghc_ver}.files pkg-prof-sort-%{ghc_ver}.files > pkg-%{ghc_ver}.files
172+ find $RPM_BUILD_ROOT%{_datadir} -type f -name "*" | grep "ghc-%{ghc_ver}" > pkg-doc-%{ghc_ver}.files
173+ sort pkg-doc-%{ghc_ver}.files > pkg-doc-sort-%{ghc_ver}.files
174+ # Clean up syntax for %files section
175+ cat pkg-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-%{ghc_ver}.files
176+ cat pkg-prof-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-prof-%{ghc_ver}.files
177+ cat pkg-doc-sort-%{ghc_ver}.files | sed 's:'"$RPM_BUILD_ROOT"'::' > TEMP && mv TEMP pkg-doc-%{ghc_ver}.files
178+}
179+build_for
180+
181+
182+%install
183+
184+
185+%clean
186+rm -rf $RPM_BUILD_ROOT
187+
188+
189+%if %{oracle_solaris_11_2}
190+ # pass
191+%else
192+ # not solaris11
193+# %post
194+# The %install section above will only install files
195+# We need to register the package with ghc-pkg for ghc to find it
196+# /usr/bin/ghc-pkg register --global --force %{_libdir}/ghc-%{ghc_ver}/%{cname}-%{version}/%{cname}-%{version}.conf
197+
198+# %post -n SFEghc78-connection-doc
199+# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
200+
201+# %preun
202+# # Need to unregister the package with ghc-pkg for the rebuild of the spec file to work
203+# /usr/bin/ghc-pkg unregister --global --force %{pname}-%{version}
204+
205+# %postun -n SFEghc78-connection-doc
206+# if [ "$1" -eq 0 ] && [ -x %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries/gen_contents_index ] ; then
207+# cd %{_datadir}/doc/ghc-%{ghc_ver}/html/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index
208+# fi
209+
210+%endif
211+
212+
213+%files 710 -f pkg-%{ghc_ver}.files
214+%defattr (-, root, bin)
215+
216+%files prof-710 -f pkg-prof-%{ghc_ver}.files
217+%defattr (-, root, bin)
218+
219+%files doc-710 -f pkg-doc-%{ghc_ver}.files
220+%defattr(-,root,bin)
221+%dir %attr (0755, root, sys) %{_datadir}
222+%dir %attr (0755, root, other) %{_docdir}
223+
224+
225+%changelog
226+* San Jan 31 2016 - Osamu Tabata<cantimerny.g@gmail.com>
227+- initial commit
diff -r 4ac09f138e93 -r 38fdfcaa8522 specs/copyright/ghc-connection.copyright
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/specs/copyright/ghc-connection.copyright Sun Jan 31 23:09:24 2016 +0900
@@ -0,0 +1,27 @@
1+Copyright (c) 2012 Vincent Hanquez <vincent@snarc.org>
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+1. Redistributions of source code must retain the above copyright
9+ notice, this list of conditions and the following disclaimer.
10+2. Redistributions in binary form must reproduce the above copyright
11+ notice, this list of conditions and the following disclaimer in the
12+ documentation and/or other materials provided with the distribution.
13+3. Neither the name of the author nor the names of his contributors
14+ may be used to endorse or promote products derived from this software
15+ without specific prior written permission.
16+
17+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
21+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27+SUCH DAMAGE.
Show on old repository browser