]> git.pld-linux.org Git - SPECS.git/blob - ghc-ipynb.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ghc-ipynb.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname ipynb
6 Summary:        Data structure for working with Jupyter notebooks
7 Name:           ghc-%{pkgname}
8 Version:        0.1.0.1
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/ipynb
13 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5:  919889511c354b69351f13689f1ef193
15 URL:            http://hackage.haskell.org/package/ipynb
16 BuildRequires:  ghc >= 6.12.3
17 BuildRequires:  ghc-aeson
18 BuildRequires:  ghc-base64-bytestring
19 BuildRequires:  ghc-semigroups
20 BuildRequires:  ghc-unordered-containers
21 %if %{with prof}
22 BuildRequires:  ghc-prof
23 BuildRequires:  ghc-aeson-prof
24 BuildRequires:  ghc-base64-bytestring-prof
25 BuildRequires:  ghc-semigroups-prof
26 BuildRequires:  ghc-unordered-containers-prof
27 %endif
28 BuildRequires:  rpmbuild(macros) >= 1.608
29 %requires_eq    ghc
30 Requires(post,postun):  /usr/bin/ghc-pkg
31 Requires:       ghc-aeson
32 Requires:       ghc-base64-bytestring
33 Requires:       ghc-semigroups
34 Requires:       ghc-unordered-containers
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 # debuginfo is not useful for ghc
38 %define         _enable_debug_packages  0
39
40 # don't compress haddock files
41 %define         _noautocompressdoc      *.haddock
42
43 %description
44 ipynb defines a data structure for representing Jupyter notebooks,
45 along with ToJSON and FromJSON instances for conversion to and from
46 JSON .ipynb files.
47
48 %package prof
49 Summary:        Profiling %{pkgname} library for GHC
50 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53 Requires:       ghc-aeson-prof
54 Requires:       ghc-base64-bytestring-prof
55 Requires:       ghc-semigroups-prof
56 Requires:       ghc-unordered-containers-prof
57
58 %description prof
59 Profiling %{pkgname} library for GHC.  Should be installed when
60 GHC's profiling subsystem is needed.
61
62 %description prof -l pl.UTF-8
63 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
64 kiedy potrzebujemy systemu profilującego z GHC.
65
66 %prep
67 %setup -q -n %{pkgname}-%{version}
68
69 %build
70 runhaskell Setup.hs configure -v2 \
71         %{?with_prof:--enable-library-profiling} \
72         --prefix=%{_prefix} \
73         --libdir=%{_libdir} \
74         --libexecdir=%{_libexecdir} \
75         --docdir=%{_docdir}/%{name}-%{version}
76
77 runhaskell Setup.hs build
78 runhaskell Setup.hs haddock --executables
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
83
84 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
85
86 # work around automatic haddock docs installation
87 %{__rm} -rf %{name}-%{version}-doc
88 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
89 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
90
91 runhaskell Setup.hs register \
92         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %post
98 %ghc_pkg_recache
99
100 %postun
101 %ghc_pkg_recache
102
103 %files
104 %defattr(644,root,root,755)
105 %doc Changelog.md %{name}-%{version}-doc/*
106 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
107 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
110 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
111
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
115
116 %if %{with prof}
117 %files prof
118 %defattr(644,root,root,755)
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
121 %endif
This page took 0.73698 seconds and 3 git commands to generate.