2012-06-06 09:18:01 +00:00
#
2012-11-21 16:46:08 +00:00
# spec file for package ghc-rpm-macros
2012-06-06 09:18:01 +00:00
#
2015-03-27 08:25:23 +00:00
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
2012-01-11 21:21:36 +00:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2012-06-06 09:18:01 +00:00
2012-01-11 21:21:36 +00:00
2013-07-31 15:36:43 +00:00
%global macros_dir %{_sysconfdir} /rpm
2015-11-15 21:29:44 +00:00
2013-10-29 21:02:49 +00:00
%global without_hscolour 1
2012-01-11 21:21:36 +00:00
Name : ghc-rpm-macros
2015-11-15 21:29:44 +00:00
Version : 1.4.94
2012-11-21 16:46:08 +00:00
Release : 0
2014-12-14 09:35:34 +00:00
BuildArch : noarch
2013-07-31 15:36:43 +00:00
Summary : RPM Macros for building packages for GHC
2014-05-11 10:35:48 +00:00
License : GPL-3.0+
2012-11-21 16:46:08 +00:00
Group : Development/Libraries/Other
Url : https://fedoraproject.org/wiki/Haskell_SIG
2012-01-11 21:21:36 +00:00
2015-11-15 21:29:44 +00:00
# source prepared manually from github.com/fedora-haskell/ghc-rpm-macros
Source0 : %{name} -%{version} .tar.xz
# PATCH-FIX-OPENSUSE suse-disable-debug-packages.patch peter.trommler@ohm-hochschule.de -- openSUSE way to disable debug packages
Patch1 : suse-disable-debug-packages.patch
# PATCH-FIX-OPENSUSE suse-docdir.patch peter.trommler@ohm-hochschule.de -- fix location of docdir
Patch4 : suse-docdir.patch
# PATCH-FIX_UPSTREAM fix-gen-filelists.patch
Patch5 : fix-gen-filelists.patch
# PATCH-FIX-OPENSUSE remove-flags.patch peter.trommler@ohm-hochschule.de -- Do not pass CFLAGS and LDFLAGS to ghc. openSUSE is missing a RPM macro %%__global_ldflags.
Patch8 : remove-flags.patch
# PATCH-FIX-UPSTREAM fix-library-dir.patch peter.trommler@ohm-hochschule.de -- Fix ghc-rpm-macros and ghc build system installing into different library directories (package version vs package key).
Patch9 : fix-library-dir.patch
BuildRequires : xz
2015-08-27 16:00:57 +00:00
Requires : rpm
2013-07-31 15:36:43 +00:00
%if %{undefined without_hscolour}
Requires : hscolour
%endif
2012-01-11 21:21:36 +00:00
2012-02-19 19:34:18 +00:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2012-01-11 21:21:36 +00:00
%description
2013-07-31 15:36:43 +00:00
A set of macros for building GHC packages following the openSUSE
Haskell Guidelines. ghc needs to be installed in
order to make use of these macros.
2012-01-11 21:21:36 +00:00
2013-07-31 15:36:43 +00:00
%package extra
Summary : Extra RPM macros for building Haskell packages with several libs
Group : Development/Libraries/Other
Requires : %{name} = %{version} -%{release}
%description extra
2014-05-11 10:35:48 +00:00
Extra macros used for subpackaging of Haskell libraries,
for example in ghc and haskell-platform.
%package -n ghc-srpm-macros
Summary : RPM macros for building Haskell source packages
Group : Development/Libraries/Other
2015-11-15 21:29:44 +00:00
%if 0%{?suse_version} > 1110
2014-05-11 10:35:48 +00:00
BuildArch : noarch
2015-11-15 21:29:44 +00:00
%endif
2014-05-11 10:35:48 +00:00
%description -n ghc-srpm-macros
Macros used when generating source Haskell rpm packages.
2012-01-11 21:21:36 +00:00
%prep
2015-08-27 16:00:57 +00:00
%setup -q -n %{name} -%{version}
2015-11-15 21:29:44 +00:00
%patch1 -p1 -b .debug
%patch4 -p1
%patch5 -p1
%patch8 -p1
%patch9 -p1
2012-01-11 21:21:36 +00:00
%build
echo no build stage needed
%install
2014-11-05 16:08:07 +00:00
install -p -D -m 0644 macros.ghc %{buildroot} %{macros_dir} /macros.ghc
install -p -D -m 0644 macros.ghc-extra %{buildroot} /%{macros_dir} /macros.ghc-extra
2012-01-11 21:21:36 +00:00
install -p -D -m 0755 ghc-deps.sh %{buildroot} /%{_prefix} /lib/rpm/ghc-deps.sh
2015-11-15 21:29:44 +00:00
install -p -D -m 0644 ghc.attr %{buildroot} /%{_prefix} /lib/rpm/fileattrs/ghc.attr
2013-07-31 15:36:43 +00:00
install -p -D -m 0755 cabal-tweak-dep-ver %{buildroot} /%{_bindir} /cabal-tweak-dep-ver
install -p -D -m 0755 cabal-tweak-flag %{buildroot} /%{_bindir} /cabal-tweak-flag
2012-01-11 21:21:36 +00:00
%files
%defattr (-,root,root,-)
%doc COPYING AUTHORS
2013-07-31 15:36:43 +00:00
%config %{macros_dir} /macros.ghc
2015-11-15 21:29:44 +00:00
%if 0%{suse_version} < 1200
%dir %{_prefix} /lib/rpm
%dir %{_prefix} /lib/rpm/fileattrs
%endif
2012-01-11 21:21:36 +00:00
%{_prefix} /lib/rpm/ghc-deps.sh
2015-11-15 21:29:44 +00:00
%{_prefix} /lib/rpm/fileattrs/ghc.attr
2012-06-26 16:05:51 +00:00
%{_bindir} /cabal-tweak-dep-ver
2013-07-31 15:36:43 +00:00
%{_bindir} /cabal-tweak-flag
%files extra
%defattr (-,root,root,-)
%config %{macros_dir} /macros.ghc-extra
2012-01-11 21:21:36 +00:00
%changelog