123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- %define pkg_name data-default
- %define pkg_version 0.5.3
- %define pkg_release 3%{?_dist_release}
- %define ghc_version 7.10.3
- 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: data-default-instances-base-0.0.1.tar.gz
- Source2: data-default-instances-containers-0.0.1.tar.gz
- Source3: data-default-instances-old-locale-0.0.1.tar.gz
- Source4: data-default-instances-dlist-0.0.1.tar.gz
- Source100: packages
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- BuildRequires: ghc haskell-platform-base cabal-install
- BuildRequires: libffi-devel gmp-devel zlib-devel
- BuildRequires: libghc-data-default-class
- BuildRequires: libghc-dlist
- BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
- BuildRequires: hscolour
- Requires: ghc haskell-platform-base cabal-install
- Requires: libghc-data-default-class
- Requires: libghc-dlist
- Vendor: Project Vine
- Distribution: Vine Linux
- Packager: ara_t
- %description
- Haskell libraries: %{pkg_name} and dependent libraries
- %prep
- %{__rm} -rf ${RPM_BUILD_ROOT}
- %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 %{SOURCE100}`; do
- %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
- cd ${pkg}
- cabal configure \
- --prefix=%{_prefix} \
- --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
- --libsubdir= \
- --datadir=%{_datadir}/%{name}/${pkg} \
- --datasubdir= \
- --docdir=%{_docdir}/%{name}/${pkg}
- cabal build
- cabal haddock || : # aviod Error
- cabal copy --destdir=${RPM_BUILD_ROOT}
- cabal register --inplace
- cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{pkg_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}/%{pkg_name}/%{pkg_name}-%{version} \
- --datasubdir= \
- --docdir=%{_docdir}/%{pkg_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} LICENSE \
- ${RPM_BUILD_ROOT}%{_docdir}/%{pkg_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
- * Wed May 04 2016 Toshiaki Ara <ara_t@384.jp> 0.5.3-3
- - rebuilt
- * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 0.5.3-2
- - correct SPEC file
- * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 0.5.3-1
- - new package
|