1
0

Accepting request 203011 from home:ptrommler

Fix for bnc#845572.

OBS-URL: https://build.opensuse.org/request/show/203011
OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-rpm-macros?expand=0&rev=19
This commit is contained in:
Peter Trommler 2013-10-11 19:15:01 +00:00 committed by Git OBS Bridge
parent b2a6ea84a6
commit fec2d2214c
5 changed files with 60 additions and 4 deletions

19
add-group.patch Normal file
View File

@ -0,0 +1,19 @@
diff -Nrup a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra
--- a/ghc-rpm-macros.ghc-extra 2013-04-24 09:08:41.000000000 +0200
+++ b/ghc-rpm-macros.ghc-extra 2013-10-08 13:42:47.232096618 +0200
@@ -21,6 +21,7 @@
%define basepkg ghc-%{pkgname}\
%package -n %{basepkg}\
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\
+Group: System/Libraries\
%{?1:Version: %{pkgver}}\
%{-l:License: %{-l*}}\
%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}
@@ -72,6 +73,7 @@ Summary: %{?common_summary}%{!?co
%define basepkg ghc-%{pkgname}\
%package -n %{basepkg}-devel\
Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\
+Group: Development/Languages/Other\
%{?1:Version: %{pkgver}}\
%{-l:License: %{-l*}}\
%{?ghc_devel_requires}\

19
files-defattr.patch Normal file
View File

@ -0,0 +1,19 @@
diff -Nrup a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra
--- a/ghc-rpm-macros.ghc-extra 2013-10-08 15:35:46.955154547 +0200
+++ b/ghc-rpm-macros.ghc-extra 2013-10-08 15:33:12.000000000 +0200
@@ -2,6 +2,7 @@
%ghc_shared_files\
%files -n %{basepkg} -f %{basepkg}.files\
+%defattr(-,root,root,-)\
%{?base_doc_files:%doc %base_doc_files}\
%{nil}
@@ -54,6 +55,7 @@ Group: System/Libraries\
%ghc_devel_files\
%files -n %{basepkg}-devel -f %{basepkg}-devel.files\
+%defattr(-,root,root,-)\
%{?devel_doc_files:%doc %devel_doc_files}\
%{nil}

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Oct 11 19:00:13 UTC 2013 - peter.trommler@ohm-hochschule.de
- add add-group.patch as patch 2
* add Group tag to subpackages (required for SLE)
* put libraries into System/Libraries (packaged guidelines)
* fix bnc#845572
- add files-defattr.patch as patch 3
* set file permissions according to specfile guidelines
- thanks to Scott Bahling for preparing those patches
- enable colorized documentation
-------------------------------------------------------------------
Thu Sep 26 06:59:33 UTC 2013 - peter.trommler@ohm-hochschule.de

View File

@ -20,7 +20,7 @@
%global macros_dir %{_sysconfdir}/rpm
%global without_hscolour 1
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 0.99
@ -37,9 +37,13 @@ Source4: macros.ghc-suse
Patch: buildService.patch
# 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 add-group.patch sbahling@suse.com -- Make sure a Group: tag is generated in subpackages; peter.trommler@ohm-hocschule.de: also puts libraries in System/Libraries, see package group guidelines
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
# PATCH-FIX-SLE sle-sp1-rpmdeps.patch peter.trommler@ohm-hochschule.de -- SLE's RPM is too old in 11 SP1 and SP2
Patch100: sle-sp1-rpmdeps.patch
#Requires: redhat-rpm-config
Requires: rpm
%if %{undefined without_hscolour}
Requires: hscolour
@ -64,6 +68,8 @@ Set of macros to build ghc packages that contain multiple subpackages.
%setup -q -n %{name}-%{git_hash}
%patch -p1 -b .obs
%patch1 -p1 -b .debug
%patch2 -p1
%patch3 -p1
%if 0%{?sles_version}
%patch -P 100 -p1
%endif

View File

@ -12,9 +12,9 @@ Index: ghc-rpm-macros-237337a6c6b3299bc6a437446c7f17136fc67ffa/ghc-rpm-macros.gh
+%global __debug_install_post %{nil}\
+%global suse_insert_debug_package %{nil}\
+echo "/usr/lib/debug" > debugfiles.list\
+mkdir -p $RPM_BUILD_ROOT/usr/lib/debug\
+mkdir -p %{buildroot}/usr/lib/debug\
+echo "/usr/src/debug" > debugsources.list\
+mkdir -p $RPM_BUILD_ROOT/usr/src/debug
+mkdir -p %{buildroot}/usr/src/debug
+
# ghc_bin_build
%ghc_bin_build\