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
|
|
|
#
|
2013-07-31 15:36:43 +00:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products 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 git_hash 237337a6c6b3299bc6a437446c7f17136fc67ffa
|
|
|
|
|
|
|
|
%global macros_dir %{_sysconfdir}/rpm
|
|
|
|
|
2013-09-29 17:23:34 +00:00
|
|
|
#%%global without_hscolour 1
|
2012-01-11 21:21:36 +00:00
|
|
|
|
|
|
|
Name: ghc-rpm-macros
|
2013-07-31 15:36:43 +00:00
|
|
|
Version: 0.99
|
2012-11-21 16:46:08 +00:00
|
|
|
Release: 0
|
2013-07-31 15:36:43 +00:00
|
|
|
Summary: RPM Macros for building packages for GHC
|
2012-01-23 08:36:22 +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
|
|
|
|
2013-07-31 15:36:43 +00:00
|
|
|
Source0: http://pkgs.fedoraproject.org/cgit/%{name}.git/snapshot/%{name}-%{git_hash}.tar.bz2
|
2012-01-11 21:21:36 +00:00
|
|
|
Source4: macros.ghc-suse
|
2013-07-31 15:36:43 +00:00
|
|
|
# PATCH-FIX-OPENSUSE buildService .patch peter.trommler@ohm-hochschule.de -- openSUSE packaging Haskell guidelines
|
2012-01-11 21:21:36 +00:00
|
|
|
Patch: buildService.patch
|
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-07-31 15:36:43 +00:00
|
|
|
# PATCH-FIX-SLE sle-sp1-rpmdeps.patch peter.trommler@ohm-hochschule.de -- SLE's RPM is too old in 11 SP1 and SP2
|
2012-11-21 16:46:08 +00:00
|
|
|
Patch100: sle-sp1-rpmdeps.patch
|
2012-01-11 21:21:36 +00:00
|
|
|
#Requires: redhat-rpm-config
|
|
|
|
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
|
|
|
|
Set of macros to build ghc packages that contain multiple subpackages.
|
2012-01-11 21:21:36 +00:00
|
|
|
|
|
|
|
%prep
|
2013-07-31 15:36:43 +00:00
|
|
|
%setup -q -n %{name}-%{git_hash}
|
2012-11-21 16:46:08 +00:00
|
|
|
%patch -p1 -b .obs
|
|
|
|
%patch1 -p1 -b .debug
|
|
|
|
%if 0%{?sles_version}
|
|
|
|
%patch -P 100 -p1
|
2012-02-27 13:11:20 +00:00
|
|
|
%endif
|
2012-01-11 21:21:36 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
echo no build stage needed
|
|
|
|
|
|
|
|
%install
|
2013-07-31 15:36:43 +00:00
|
|
|
install -p -D -m 0644 ./ghc-rpm-macros.ghc %{buildroot}%{macros_dir}/macros.ghc
|
|
|
|
install -p -D -m 0644 ./ghc-rpm-macros.ghc-extra ${RPM_BUILD_ROOT}/%{macros_dir}/macros.ghc-extra
|
|
|
|
install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/rpm/macros.ghc-suse
|
2012-01-11 21:21:36 +00:00
|
|
|
|
|
|
|
install -p -D -m 0755 ghc-deps.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh
|
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
|
|
|
|
|
|
|
# this is why this package is now arch-dependent:
|
|
|
|
# turn off shared libs and dynamic linking on secondary archs
|
|
|
|
%ifnarch %{ix86} x86_64
|
2013-08-01 15:27:07 +00:00
|
|
|
cat >> %{buildroot}%{macros_dir}/macros.ghc <<EOF
|
2012-01-11 21:21:36 +00:00
|
|
|
|
|
|
|
# shared libraries are only supported on primary intel archs
|
|
|
|
%%ghc_without_dynamic 1
|
|
|
|
%%ghc_without_shared 1
|
|
|
|
EOF
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING AUTHORS
|
2013-07-31 15:36:43 +00:00
|
|
|
%config %{macros_dir}/macros.ghc
|
|
|
|
%config %{macros_dir}/macros.ghc-suse
|
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
|