summaryrefslogtreecommitdiff
path: root/ghc-rpm-macros.spec
blob: b78acf8dad4bfcc5c127a589bc7e434851bef4e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Name:           ghc-rpm-macros
Version:        2.5.2
Release:        1
Summary:        RPM Macros for building packages for GHC
License:        GPL-3.0-or-later
URL:            https://fedoraproject.org/wiki/Haskell_SIG
Source0:        %{name}-%{version}.tar.xz

Patch1:           using-help-as-doc-packages-suffix.patch
BuildRequires:  xz
Requires:       rpm
Requires:       chrpath
BuildArch:      noarch

%description
A set of macros for building GHC packages.  ghc needs to be installed 
in order to make use of these macros.

%package extra
Summary:        Extra RPM macros for building Haskell packages with several libs
Requires:       %{name} = %{version}-%{release}

%description extra
Extra macros used for subpackaging of Haskell libraries,
for example in ghc and haskell-platform.

%prep
%setup -q
%patch1 -p1

%build
echo no build stage needed

%install
install -p -D -m 0644 macros.ghc %{buildroot}%{_rpmmacrodir}/macros.ghc
install -p -D -m 0644 macros.ghc-extra %{buildroot}/%{_rpmmacrodir}/macros.ghc-extra
install -p -D -m 0644 macros.ghc-suse %{buildroot}/%{_rpmmacrodir}/macros.ghc-suse
install -p -D -m 0755 ghc-deps.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh
install -p -D -m 0755 cabal-tweak-dep-ver %{buildroot}/%{_bindir}/cabal-tweak-dep-ver
install -p -D -m 0755 cabal-tweak-drop-dep %{buildroot}/%{_bindir}/cabal-tweak-drop-dep
install -p -D -m 0755 cabal-tweak-flag %{buildroot}/%{_bindir}/cabal-tweak-flag
install -p -D -m 0755 cabal-tweak-remove-upperbound %{buildroot}/%{_bindir}/cabal-tweak-remove-upperbound
install -p -D -m 0755 ghc-pkg-wrapper %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper
install -p -D -m 0644 ghc.attr %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr
install -p -D -m 0644 Setup.hs %{buildroot}/%{_datadir}/%{name}/Setup.hs

%files
%doc AUTHORS
%license COPYING
%{_rpmmacrodir}/macros.ghc
%{_rpmmacrodir}/macros.ghc-suse
%{_prefix}/lib/rpm/ghc-deps.sh
%{_bindir}/cabal-tweak-dep-ver
%{_bindir}/cabal-tweak-flag
%{_bindir}/cabal-tweak-drop-dep
%{_bindir}/cabal-tweak-remove-upperbound
%{_prefix}/lib/rpm/ghc-pkg-wrapper
%{_prefix}/lib/rpm/fileattrs/ghc.attr
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/Setup.hs

%files extra
%{_rpmmacrodir}/macros.ghc-extra

%changelog
* Tue Jul 25 2023 Lin Runze <lrzlin@163.com> 2.5.2-1
- Initial packaging (Version 2.5.2)
- Using help suffix instead of doc