]> git.pld-linux.org Git - packages/ghc-socks.git/blob - ghc-socks.spec
rebuild with ghc 8.10.7
[packages/ghc-socks.git] / ghc-socks.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname socks
6 Summary:        Socks proxy (ver 5)
7 Name:           ghc-%{pkgname}
8 Version:        0.6.1
9 Release:        2
10 License:        BSD
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
20 %if %{with prof}
21 BuildRequires:  ghc-prof
22 BuildRequires:  ghc-basement-prof
23 BuildRequires:  ghc-cereal-prof >= 0.3.1
24 BuildRequires:  ghc-network-prof >= 2.6
25 %endif
26 BuildRequires:  rpmbuild(macros) >= 1.608
27 %requires_eq    ghc
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)
33
34 # debuginfo is not useful for ghc
35 %define         _enable_debug_packages  0
36
37 # don't compress haddock files
38 %define         _noautocompressdoc      *.haddock
39
40 %description
41 Socks proxy (version 5) implementation.
42
43 %package prof
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
51
52 %description prof
53 Profiling %{pkgname} library for GHC.  Should be installed when
54 GHC's profiling subsystem is needed.
55
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.
59
60 %prep
61 %setup -q -n %{pkgname}-%{version}
62
63 %build
64 runhaskell Setup.hs configure -v2 \
65         %{?with_prof:--enable-library-profiling} \
66         --prefix=%{_prefix} \
67         --libdir=%{_libdir} \
68         --libexecdir=%{_libexecdir} \
69         --docdir=%{_docdir}/%{name}-%{version}
70
71 runhaskell Setup.hs build
72 runhaskell Setup.hs haddock --executables
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
77
78 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
79
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}
84
85 runhaskell Setup.hs register \
86         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %post
92 %ghc_pkg_recache
93
94 %postun
95 %ghc_pkg_recache
96
97 %files
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
105
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
112
113 %if %{with prof}
114 %files prof
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
119 %endif
This page took 0.064768 seconds and 3 git commands to generate.