123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- %define pkg_name aeson
- %define pkg_version 1.2.3.0
- %define pkg_release 1%{?_dist_release}
- %define ghc_version 8.2.2
- Summary: Haskell libraries: %{pkg_name} and dependent libraries
- Name: libghc-%{pkg_name}
- Version: %{pkg_version}
- Release: %{pkg_release}
- License: BSD3
- Group: Applications/Text
- URL: http://hackage.haskell.org
- Source0: %{pkg_name}-%{version}.tar.gz
- Source1: packages
- # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
- Source11: base-compat-0.9.3.tar.gz
- Source12: th-abstraction-0.2.6.0.tar.gz
- Source13: time-locale-compat-0.1.1.3.tar.gz
- Source14: transformers-compat-0.5.1.4.tar.gz
- Source15: uuid-types-1.0.3.tar.gz
- Source16: tagged-0.8.5.tar.gz
- # to fix wrong dependencies in cabal files
- # do not use '-'
- %define tagged_version 0.8.5
- Source51: tagged.cabal
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- BuildRequires: ghc haskell-platform
- BuildRequires: libffi-devel gmp-devel zlib-devel
- BuildRequires: libghc-dlist
- BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
- Requires: ghc haskell-platform
- Requires: libghc-dlist
- Vendor: Project Vine
- Distribution: Vine Linux
- Packager: ara_t
- %description
- Haskell libraries: %{pkg_name}
- %prep
- %{__rm} -rf ${RPM_BUILD_ROOT}
- %{__rm} -rf %{_builddir}/package.conf
- %{__rm} -rf ${HOME}/.ghc
- %setup -q -n %{pkg_name}-%{version}
- %build
- # Initialise the package db
- ghc-pkg init %{_builddir}/package.conf
- PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
- %{__mkdir_p} ${PKG_CONF_DIR}
- # install dependent packages
- cd %{_builddir}
- for pkg in `cat %{SOURCE1}`; do
- %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
- cd ${pkg}
- # fix wrong dependencies
- case ${pkg} in
- "tagged-%{tagged_version}") %{__cp} %{SOURCE51} . ;;
- *) ;;
- esac
- cabal configure \
- --prefix=%{_prefix} \
- --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
- --libsubdir= \
- --datadir=%{_datadir}/%{name}/${pkg} \
- --datasubdir= \
- --docdir=%{_docdir}/%{name}/${pkg}
- cabal build
- cabal haddock || : # avoid Error
- cabal copy --destdir=${RPM_BUILD_ROOT}
- cabal register --inplace
- cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
- cd ..
- done
- # build
- cd %{_builddir}/%{pkg_name}-%{version}
- cabal configure \
- --prefix=%{_prefix} \
- --libdir=%{_libdir}/ghc-lib/%{name}/%{pkg_name}-%{version} \
- --libsubdir= \
- --datadir=%{_datadir}/%{name}/%{pkg_name}-%{version} \
- --datasubdir= \
- --docdir=%{_docdir}/%{name}/%{pkg_name}-%{version}
- cabal build
- cabal haddock
- cabal copy --destdir=${RPM_BUILD_ROOT}
- cabal register --inplace
- cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_name}-%{version}.conf
- %install
- cabal copy --destdir=${RPM_BUILD_ROOT}
- %{__cp} changelog.md LICENSE README.markdown \
- ${RPM_BUILD_ROOT}%{_docdir}/%{name}/%{pkg_name}-%{version}
- %clean
- %{__rm} -rf ${RPM_BUILD_ROOT}
- %post
- ghc-pkg recache
- %postun
- ghc-pkg recache
- %files
- %defattr(-, root, root)
- %{_libdir}/ghc-%{ghc_version}/
- %{_libdir}/ghc-lib/
- %{_datadir}/
- %changelog
- * Tue Jan 09 2018 Toshiaki Ara <ara_t@384.jp> 1.2.3.0-1
- - update to 1.2.3.0
- - build using ghc-8.2.2
- * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.11.3.0-1
- - update to 0.11.3.0
- - build using ghc-8.0.1
- * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.9.0.1-3
- - rebuilt
- * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.9.0.1-2
- - correct SPEC file
- * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.9.0.1-1
- - new package
|