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