source: projects/specs/trunk/lib/libg/libghc-build-pandoc/libghc-build-pandoc-vl.spec @ 11386

Revision 11386, 4.0 KB checked in by ara_t, 6 years ago (diff)

new upstream release

Line 
1%define pkg_name    build-pandoc
2%define pkg_version 2.0.6
3%define pkg_release 1%{?_dist_release}
4
5%define ghc_version 8.2.2
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: packages
17
18# num=1; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
19Source11: Glob-0.9.1.tar.gz
20Source12: JuicyPixels-3.2.9.3.tar.gz
21Source13: SHA-1.6.4.2.tar.gz
22Source14: blaze-markup-0.8.0.0.tar.gz
23Source15: cmark-gfm-0.1.3.tar.gz
24Source16: cmdargs-0.10.19.tar.gz
25Source17: digest-0.0.1.2.tar.gz
26Source18: fail-4.9.0.0.tar.gz
27Source19: haddock-library-1.4.3.tar.gz
28Source20: hxt-charproperties-9.2.0.1.tar.gz
29Source21: old-time-1.1.0.3.tar.gz
30Source22: pandoc-types-1.17.3.tar.gz
31Source23: regex-pcre-builtin-0.94.4.8.8.35.tar.gz
32Source24: safe-0.3.15.tar.gz
33Source25: tagsoup-0.14.2.tar.gz
34Source26: temporary-1.2.1.1.tar.gz
35Source27: utf8-string-1.0.1.1.tar.gz
36Source28: xml-1.3.14.tar.gz
37Source29: blaze-html-0.9.0.1.tar.gz
38Source30: aeson-pretty-0.8.5.tar.gz
39Source31: hslua-0.9.5.tar.gz
40Source32: hxt-unicode-9.0.2.4.tar.gz
41Source33: hxt-regex-xmlschema-9.2.0.3.tar.gz
42Source34: zip-archive-0.3.1.1.tar.gz
43Source35: texmath-0.10.1.tar.gz
44Source36: doctemplates-0.2.1.tar.gz
45Source37: hslua-module-text-0.1.2.1.tar.gz
46Source38: hxt-9.3.1.16.tar.gz
47Source39: skylighting-0.5.0.1.tar.gz
48
49# to fix wrong dependencies in cabal files
50# do not use '-'
51%define oldtime_version 1.1.0.3
52%define utf8string_version 1.0.1.1
53Source101: old-time.cabal
54Source102: utf8-string.cabal
55
56BuildRoot: %{_tmppath}/%{name}-%{version}-root
57
58BuildRequires: ghc haskell-platform
59BuildRequires: libffi-devel gmp-devel zlib-devel
60BuildRequires: libghc-data-default-class
61BuildRequires: libghc-dlist
62BuildRequires: libghc-data-default
63BuildRequires: libghc-aeson
64BuildRequires: libghc-http-client-tls
65BuildRequires: yaml
66
67BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
68
69Requires: ghc haskell-platform
70Requires: libghc-data-default-class
71Requires: libghc-dlist
72Requires: libghc-data-default
73Requires: libghc-aeson
74Requires: libghc-http-client-tls
75Requires: yaml
76
77Vendor: Project Vine
78Distribution: Vine Linux
79Packager: ara_t
80
81
82%description
83Haskell libraries: %{pkg_name}
84
85
86%prep
87%{__rm} -rf ${RPM_BUILD_ROOT}
88%{__rm} -rf %{_builddir}/package.conf
89%{__rm} -rf ${HOME}/.ghc
90%setup -q -T -c %{name}-%{version}
91
92%build
93# Initialise the package db
94ghc-pkg init %{_builddir}/package.conf
95
96PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
97%{__rm} -rf ${PKG_CONF_DIR}
98%{__mkdir_p} ${PKG_CONF_DIR}
99
100cd %{_builddir}
101for pkg in `cat %{SOURCE0}`; do
102  %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
103  cd ${pkg}
104    # fix wrong dependencies
105    case ${pkg} in
106        "old-time-%{oldtime_version}")       %{__cp} %{SOURCE101} . ;;
107        "utf8-string-%{utf8string_version}") %{__cp} %{SOURCE102} . ;;
108        *) ;;
109    esac
110
111  cabal configure \
112    --prefix=%{_prefix} \
113    --libdir=%{_libdir}/ghc-lib/%{name}/${pkg} \
114    --libsubdir= \
115    --datadir=%{_datadir}/%{name}/${pkg} \
116    --datasubdir= \
117    --docdir=%{_docdir}/%{name}/${pkg}
118
119  cabal build
120  cabal haddock || : # aviod Error
121  cabal copy --destdir=${RPM_BUILD_ROOT}
122  cabal register --inplace
123  cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}_${pkg}.conf
124  cd ..
125done
126
127%clean
128%{__rm} -rf ${RPM_BUILD_ROOT}
129
130%post
131ghc-pkg recache
132
133%postun
134ghc-pkg recache
135
136
137%files
138%defattr(-, root, root)
139%{_bindir}/
140%{_libdir}/ghc-%{ghc_version}/
141%{_libdir}/ghc-lib/
142%{_datadir}/%{name}/
143%{_docdir}/%{name}/
144
145
146%changelog
147* Tue Jan 09 2018 Toshiaki Ara <ara_t@384.jp> 2.0.6-1
148- update to 2.0.6
149- build using ghc-8.2.2
150
151* Tue Feb 21 2017 Toshiaki Ara <ara_t@384.jp> 1.19.2.1-1
152- update to 1.19.2.1
153- build using ghc-8.0.2
154
155* Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 1.17.1-1
156- update to 1.17.1
157- build using ghc-8.0.1
158
159* Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 1.17.0.3-1
160- new package
Note: See TracBrowser for help on using the repository browser.