]> git.pld-linux.org Git - packages/ghc-JuicyPixels.git/blob - ghc-JuicyPixels.spec
ad14fdc3d6c37ec9302e751ee95f45a1fd1e8c38
[packages/ghc-JuicyPixels.git] / ghc-JuicyPixels.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname JuicyPixels
6 Summary:        Picture loading/serialization (in png, jpeg, bitmap, gif, tga, tiff and radiance)
7 Name:           ghc-%{pkgname}
8 Version:        3.3.5
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/JuicyPixels
13 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5:  70474cc0f75c7541683a7bba14960ee0
15 URL:            http://hackage.haskell.org/package/JuicyPixels
16 BuildRequires:  ghc >= 6.12.3
17 %if %{with prof}
18 BuildRequires:  ghc-prof
19 %endif
20 BuildRequires:  rpmbuild(macros) >= 1.608
21 %requires_eq    ghc
22 Requires(post,postun):  /usr/bin/ghc-pkg
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 # debuginfo is not useful for ghc
26 %define         _enable_debug_packages  0
27
28 # don't compress haddock files
29 %define         _noautocompressdoc      *.haddock
30
31 %description
32 This library provides saving & loading of different picture formats
33 for the Haskell language. The aim of the library is to be as
34 lightweight as possible, you ask it to load an image, and it'll dump
35 you a big Vector full of juicy pixels. Or squared pixels, or whatever,
36 as long as they're unboxed.
37
38 %package prof
39 Summary:        Profiling %{pkgname} library for GHC
40 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
41 Group:          Development/Libraries
42 Requires:       %{name} = %{version}-%{release}
43
44 %description prof
45 Profiling %{pkgname} library for GHC.  Should be installed when
46 GHC's profiling subsystem is needed.
47
48 %description prof -l pl.UTF-8
49 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
50 kiedy potrzebujemy systemu profilującego z GHC.
51
52 %prep
53 %setup -q -n %{pkgname}-%{version}
54
55 %build
56 runhaskell Setup.hs configure -v2 \
57         %{?with_prof:--enable-library-profiling} \
58         --prefix=%{_prefix} \
59         --libdir=%{_libdir} \
60         --libexecdir=%{_libexecdir} \
61         --docdir=%{_docdir}/%{name}-%{version}
62
63 runhaskell Setup.hs build
64 runhaskell Setup.hs haddock --executables
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
69
70 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
71
72 # work around automatic haddock docs installation
73 %{__rm} -rf %{name}-%{version}-doc
74 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
75 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
76
77 runhaskell Setup.hs register \
78         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %post
84 %ghc_pkg_recache
85
86 %postun
87 %ghc_pkg_recache
88
89 %files
90 %defattr(644,root,root,755)
91 %doc README.md %{name}-%{version}-doc/*
92 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
93 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
94 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
95 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
96 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
97
98 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec
99 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.hi
100 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.dyn_hi
101 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/*.hi
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/*.dyn_hi
104 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Gif
105 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Gif/Internal
106 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Gif/Internal/*.hi
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Gif/Internal/*.dyn_hi
108 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Jpg
109 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Jpg/Internal
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Jpg/Internal/*.hi
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Jpg/Internal/*.dyn_hi
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Metadata
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Metadata/*.hi
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Metadata/*.dyn_hi
115 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Png
116 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Png/Internal
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Png/Internal/*.hi
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Png/Internal/*.dyn_hi
119 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Tiff
120 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Tiff/Internal
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Tiff/Internal/*.hi
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Tiff/Internal/*.dyn_hi
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/include
124
125 %if %{with prof}
126 %files prof
127 %defattr(644,root,root,755)
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.p_hi
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/*.p_hi
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Metadata/*.p_hi
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Gif/Internal/*.p_hi
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Jpg/Internal/*.p_hi
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Png/Internal/*.p_hi
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Picture/Tiff/Internal/*.p_hi
136 %endif
This page took 0.069766 seconds and 2 git commands to generate.