source: projects/specs/trunk/lib/libg/libghc-aeson/libghc-aeson-vl.spec @ 10914

Revision 10914, 3.0 KB checked in by ara_t, 7 years ago (diff)

libghc-*: rebuild with ghc-8.0.1

Line 
1%define pkg_name    aeson
2%define pkg_version 0.11.3.0
3%define pkg_release 1%{?_dist_release}
4
5%define ghc_version 8.0.1
6
7Summary: Haskell libraries: %{pkg_name} and dependent libraries
8Name:    libghc-%{pkg_name}
9Version: %{pkg_version}
10Release: %{pkg_release}
11
12License: BSD3
13Group:   Applications/Text
14URL:     http://hackage.haskell.org
15
16Source0: %{pkg_name}-%{version}.tar.gz
17Source1: packages
18
19# num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
20Source11: transformers-compat-0.5.1.4.tar.gz
21Source12: tagged-0.8.5.tar.gz
22Source13: fail-4.9.0.0.tar.gz
23
24BuildRoot: %{_tmppath}/%{name}-%{version}-root
25
26BuildRequires: ghc haskell-platform
27BuildRequires: libffi-devel gmp-devel zlib-devel
28BuildRequires: libghc-dlist
29
30BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
31
32Requires: ghc haskell-platform
33Requires: libghc-dlist
34
35Vendor: Project Vine
36Distribution: Vine Linux
37Packager: ara_t
38
39
40%description
41Haskell libraries: %{pkg_name}
42
43
44%prep
45%{__rm} -rf ${RPM_BUILD_ROOT}
46%{__rm} -rf %{_builddir}/package.conf
47%{__rm} -rf ${HOME}/.ghc
48%setup -q -n %{pkg_name}-%{version}
49
50%build
51# Initialise the package db
52ghc-pkg init %{_builddir}/package.conf
53
54PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
55%{__mkdir_p} ${PKG_CONF_DIR}
56
57# install dependent packages
58cd %{_builddir}
59for pkg in `cat %{SOURCE1}`; do
60  %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
61  cd ${pkg}
62  cabal configure \
63    --prefix=%{_prefix} \
64    --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
65    --libsubdir= \
66    --datadir=%{_datadir}/%{name}/${pkg} \
67    --datasubdir= \
68    --docdir=%{_docdir}/%{name}/${pkg}
69
70  cabal build
71  cabal haddock || : # avoid Error
72  cabal copy --destdir=${RPM_BUILD_ROOT}
73  cabal register --inplace
74  cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
75  cd ..
76done
77
78# build
79cd %{_builddir}/%{pkg_name}-%{version}
80cabal configure \
81    --prefix=%{_prefix} \
82    --libdir=%{_libdir}/ghc-lib/%{pkg_name}/%{pkg_name}-%{version} \
83    --libsubdir= \
84    --datadir=%{_datadir}/%{pkg_name}/%{pkg_name}-%{version} \
85    --datasubdir= \
86    --docdir=%{_docdir}/%{pkg_name}/%{pkg_name}-%{version}
87
88cabal build
89cabal haddock
90cabal copy --destdir=${RPM_BUILD_ROOT}
91cabal register --inplace
92cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf
93
94%install
95cabal copy --destdir=${RPM_BUILD_ROOT}
96
97%{__cp} changelog.md LICENSE README.markdown \
98        ${RPM_BUILD_ROOT}%{_docdir}/%{pkg_name}/%{pkg_name}-%{version}
99
100%clean
101%{__rm} -rf ${RPM_BUILD_ROOT}
102
103%post
104ghc-pkg recache
105
106%postun
107ghc-pkg recache
108
109
110%files
111%defattr(-, root, root)
112%{_libdir}/ghc-%{ghc_version}/
113%{_libdir}/ghc-lib/
114%{_datadir}/
115
116
117%changelog
118* Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.11.3.0-1
119- update to 0.11.3.0
120- build using ghc-8.0.1
121
122* Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.9.0.1-3
123- rebuilt
124
125* Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.9.0.1-2
126- correct SPEC file
127
128* Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.9.0.1-1
129- new package
Note: See TracBrowser for help on using the repository browser.