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
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-08-20 05:52:45 +00:00
Version : 1.4.8
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-08-20 05:52:45 +00:00
Source0 : %{name} -%{version} .tar.xz
2013-09-26 07:01:11 +00:00
# PATCH-FIX-OPENSUSE suse-disable-debug-packages.patch peter.trommler@ohm-hochschule.de -- openSUSE way to disable debug packages
2012-11-21 16:46:08 +00:00
Patch1 : suse-disable-debug-packages.patch
2013-12-15 07:33:47 +00:00
# PATCH-FIX-OPENSUSE add-group.patch sbahling@suse.com -- Make sure a Group: tag is generated in subpackages; peter.trommler@ohm-hochschule.de: also puts libraries in System/Libraries, see package group guidelines
2013-10-11 19:15:01 +00:00
Patch2 : add-group.patch
# PATCH-FIX-OPENSUSE files-defattr.patch sbahling@suse.com -- Make sure defattr macro used in files sections; peter.trommler@ohm-hochschule.de: see also specfile guidelines, files section, permissions
Patch3 : files-defattr.patch
2013-12-15 07:33:47 +00:00
# PATCH-FIX-OPENSUSE suse-docdir.patch peter.trommler@ohm-hochschule.de -- fix location of docdir
Patch4 : suse-docdir.patch
2015-08-20 05:52:45 +00:00
# PATCH-FIX-UPSTREAM fix-runpath.patch peter.trommler@ohm-hochschule.de -- In openSUSE we patch binutils to default to the "new" RUNPATH dynamic tag and not the obsolete RPATH. This patch adds support for the former and still works for the latter.
Patch7 : fix-runpath.patch
# PATCH-FIX-OPENSUSE ldflags.patch peter.trommler@ohm-hochschule.de -- Remove LDFLAGS. TODO: Find the right openSUSE way to do this.
Patch8 : ldflags.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
# PATCH-FIX-UPSTREAM version-docdir.patch peter.trommler@ohm-hochschule.de -- Include version number in package documentation dir.
Patch10 : version-docdirs.patch
2013-10-11 19:15:01 +00:00
2012-01-11 21:21:36 +00:00
Requires : rpm
2015-08-20 05:52:45 +00:00
BuildRequires : xz
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
2014-06-26 07:34:27 +00:00
%if 0%{?suse_version} > 1110
2014-05-11 10:35:48 +00:00
BuildArch : noarch
2014-06-26 07:34:27 +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-20 05:52:45 +00:00
%setup -q
2012-11-21 16:46:08 +00:00
%patch1 -p1 -b .debug
2013-10-11 19:15:01 +00:00
%patch2 -p1
%patch3 -p1
2013-12-15 07:33:47 +00:00
%patch4 -p1
2015-08-20 05:52:45 +00:00
%patch7 -p1
2015-02-24 07:57:44 +00:00
%patch8 -p1
2015-08-20 05:52:45 +00:00
%patch9 -p1
%patch10 -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-08-20 05:52:45 +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-03-27 08:25:23 +00:00
%if 0%{suse_version} < 1200
%dir %{_prefix} /lib/rpm
%dir %{_prefix} /lib/rpm/fileattrs
%endif
2015-08-20 05:52:45 +00:00
%{_prefix} /lib/rpm/fileattrs/ghc.attr
2012-01-11 21:21:36 +00:00
%{_prefix} /lib/rpm/ghc-deps.sh
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