3 %bcond_without prof # profiling library
6 Summary: Socks proxy (ver 5)
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/socks
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: e85be2113ecf285060ce2c3678bcd9dc
15 URL: http://hackage.haskell.org/package/socks
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-basement
18 BuildRequires: ghc-cereal >= 0.3.1
19 BuildRequires: ghc-network >= 2.6
21 BuildRequires: ghc-prof
22 BuildRequires: ghc-basement-prof
23 BuildRequires: ghc-cereal-prof >= 0.3.1
24 BuildRequires: ghc-network-prof >= 2.6
26 BuildRequires: rpmbuild(macros) >= 1.608
28 Requires(post,postun): /usr/bin/ghc-pkg
29 Requires: ghc-basement
30 Requires: ghc-cereal >= 0.3.1
31 Requires: ghc-network >= 2.6
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 # debuginfo is not useful for ghc
35 %define _enable_debug_packages 0
37 # don't compress haddock files
38 %define _noautocompressdoc *.haddock
41 Socks proxy (version 5) implementation.
44 Summary: Profiling %{pkgname} library for GHC
45 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
46 Group: Development/Libraries
47 Requires: %{name} = %{version}-%{release}
48 Requires: ghc-basement-prof
49 Requires: ghc-cereal-prof >= 0.3.1
50 Requires: ghc-network-prof >= 2.6
53 Profiling %{pkgname} library for GHC. Should be installed when
54 GHC's profiling subsystem is needed.
56 %description prof -l pl.UTF-8
57 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
58 kiedy potrzebujemy systemu profilującego z GHC.
61 %setup -q -n %{pkgname}-%{version}
64 runhaskell Setup.hs configure -v2 \
65 %{?with_prof:--enable-library-profiling} \
68 --libexecdir=%{_libexecdir} \
69 --docdir=%{_docdir}/%{name}-%{version}
71 runhaskell Setup.hs build
72 runhaskell Setup.hs haddock --executables
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
78 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
80 # work around automatic haddock docs installation
81 %{__rm} -rf %{name}-%{version}-doc
82 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
83 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
85 runhaskell Setup.hs register \
86 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
89 rm -rf $RPM_BUILD_ROOT
98 %defattr(644,root,root,755)
99 %doc README.md %{name}-%{version}-doc/*
100 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
101 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
104 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
106 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.hi
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.dyn_hi
109 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/Socks5
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/Socks5/*.hi
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/Socks5/*.dyn_hi
115 %defattr(644,root,root,755)
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.p_hi
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/Socks5/*.p_hi