2012-06-06 11:18:01 +02:00
|
|
|
#
|
|
|
|
# spec file for ghc-rpm-macros
|
|
|
|
#
|
|
|
|
|
2012-01-11 22:21:36 +01:00
|
|
|
# Copyright (c) 2012 Peter Trommler peter.trommler@ohm-hochschule.de
|
|
|
|
#
|
|
|
|
# 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 11:18:01 +02:00
|
|
|
|
2012-01-11 22:21:36 +01:00
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
%global macros_file %{_sysconfdir}/rpm/macros.ghc
|
|
|
|
|
|
|
|
Name: ghc-rpm-macros
|
2012-06-06 11:18:01 +02:00
|
|
|
Version: 0.90
|
2012-01-11 22:21:36 +01:00
|
|
|
Release: 1
|
|
|
|
Summary: Macros for building packages for GHC
|
|
|
|
|
|
|
|
Group: Development/Libraries/Other
|
2012-01-23 09:36:22 +01:00
|
|
|
License: GPL-3.0
|
2012-01-11 22:21:36 +01:00
|
|
|
URL: https://fedoraproject.org/wiki/Haskell_SIG
|
|
|
|
|
|
|
|
# This is a Fedora maintained package which is specific to
|
|
|
|
# our distribution. Thus the source is only available from
|
|
|
|
# within this srpm.
|
|
|
|
Source0: ghc-rpm-macros.ghc
|
|
|
|
Source1: COPYING
|
|
|
|
Source2: AUTHORS
|
|
|
|
Source3: ghc-deps.sh
|
|
|
|
Source4: macros.ghc-suse
|
|
|
|
Patch: buildService.patch
|
2012-02-19 20:34:18 +01:00
|
|
|
Patch1: sle-sp1-rpmdeps.patch
|
2012-01-11 22:21:36 +01:00
|
|
|
#Requires: redhat-rpm-config
|
|
|
|
Requires: rpm
|
|
|
|
|
2012-02-19 20:34:18 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
2012-01-11 22:21:36 +01:00
|
|
|
%description
|
|
|
|
A set of macros for building GHC packages following the Haskell Guidelines
|
|
|
|
of the Fedora Haskell SIG. ghc needs to be installed in order to make use of
|
|
|
|
these macros.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -c -T
|
|
|
|
cp %{SOURCE1} %{SOURCE2} .
|
|
|
|
cp %{SOURCE0} %{SOURCE3} .
|
|
|
|
%patch -p1
|
2012-02-27 14:11:20 +01:00
|
|
|
%if %{defined sles_version}
|
2012-02-19 20:34:18 +01:00
|
|
|
%patch1 -p1
|
2012-02-27 14:11:20 +01:00
|
|
|
%endif
|
2012-01-11 22:21:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
echo no build stage needed
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -p -D -m 0644 ./ghc-rpm-macros.ghc ${RPM_BUILD_ROOT}/%{macros_file}
|
|
|
|
install -p -D -m 0644 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc-suse
|
|
|
|
|
|
|
|
install -p -D -m 0755 ghc-deps.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh
|
|
|
|
|
|
|
|
# this is why this package is now arch-dependent:
|
|
|
|
# turn off shared libs and dynamic linking on secondary archs
|
|
|
|
%ifnarch %{ix86} x86_64
|
|
|
|
cat >> %{buildroot}/%{macros_file} <<EOF
|
|
|
|
|
|
|
|
# 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
|
|
|
|
%config(noreplace) %{macros_file}
|
|
|
|
%config(noreplace) %{_sysconfdir}/rpm/macros.ghc-suse
|
|
|
|
%{_prefix}/lib/rpm/ghc-deps.sh
|
2012-06-06 11:18:01 +02:00
|
|
|
#%{_prefix}/lib/rpm/magic
|
2012-01-11 22:21:36 +01:00
|
|
|
|
|
|
|
%changelog
|