Hello community,

here is the log from the commit of package ghc-rpm-macros for openSUSE:Factory 
checked in at 2018-04-17 11:15:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-rpm-macros (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-rpm-macros.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-rpm-macros"

Tue Apr 17 11:15:52 2018 rev:34 rq:590693 version:1.7.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-rpm-macros/ghc-rpm-macros.changes    
2017-07-24 12:33:17.074217980 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-rpm-macros.new/ghc-rpm-macros.changes       
2018-04-17 11:15:52.979009358 +0200
@@ -1,0 +2,7 @@
+Tue Mar 20 14:03:36 UTC 2018 - [email protected]
+
+- update to 1.7.4
+- sync with ustream
+- support sublibraries
+
+-------------------------------------------------------------------

Old:
----
  ghc-rpm-macros-1.7.2.tar.xz

New:
----
  ghc-rpm-macros-1.7.4.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.u7tKiu/_old  2018-04-17 11:15:53.982962285 +0200
+++ /var/tmp/diff_new_pack.u7tKiu/_new  2018-04-17 11:15:53.986962097 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-rpm-macros
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,10 +19,10 @@
 %global macros_dir %{_sysconfdir}/rpm
 %global without_hscolour 1
 Name:           ghc-rpm-macros
-Version:        1.7.2
+Version:        1.7.4
 Release:        0
 Summary:        RPM Macros for building packages for GHC
-License:        GPL-3.0+
+License:        GPL-3.0-or-later
 Group:          Development/Libraries/Other
 Url:            https://fedoraproject.org/wiki/Haskell_SIG
 # source gets updated with osc service dr
@@ -76,8 +76,8 @@
 install -p -D -m 0755 ghc-dirs.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-dirs.sh
 
 %files
-%defattr(-,root,root,-)
-%doc COPYING AUTHORS
+%doc AUTHORS
+%license COPYING
 %config %{macros_dir}/macros.ghc
 %config %{macros_dir}/macros.ghc-suse
 %{_prefix}/lib/rpm/ghc-deps.sh
@@ -89,7 +89,6 @@
 %{_prefix}/lib/rpm/ghc-dirs.sh
 
 %files extra
-%defattr(-,root,root,-)
 %config %{macros_dir}/macros.ghc-extra
 
 %changelog

++++++ ghc-rpm-macros-1.7.2.tar.xz -> ghc-rpm-macros-1.7.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.7.2/ghc-deps.sh 
new/ghc-rpm-macros-1.7.4/ghc-deps.sh
--- old/ghc-rpm-macros-1.7.2/ghc-deps.sh        2017-07-07 14:16:59.596993740 
+0200
+++ new/ghc-rpm-macros-1.7.4/ghc-deps.sh        2018-03-19 20:56:05.000000000 
+0100
@@ -17,6 +17,8 @@
     *) echo "`basename $0`: Need --provides or --requires" ; exit 1
 esac
 
+ghc_ver=$(basename $pkgbasedir | sed -e s/ghc-//)
+
 files=$(cat)
 
 #cabal_ver=$(ghc-pkg --global --simple-output list Cabal | sed -e "s/Cabal-//")
@@ -25,8 +27,11 @@
     case $i in
         # exclude builtin_rts.conf
        $pkgconfdir/*-*.conf)
-           pkgver=$(echo $i | sed -e "s%$pkgconfdir/\(.\+\)-.\+.conf%\1%")
-           ids=$($ghc_pkg field $pkgver $field | sed -e "s/rts//" -e 
"s/bin-package-db-[^ ]\+//")
+            case $ghc_ver in
+                8.*) id=$(grep "id: " $i | sed -e "s/id: //") ;;
+                *) id=$(echo $i | sed -e "s%$pkgconfdir/%%" -e "s%.conf%%") ;;
+            esac
+           ids=$($ghc_pkg field $id $field | sed -e "s/rts//" -e 
"s/bin-package-db-[^ ]\+//")
 
            for d in $ids; do
                case $d in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.7.2/ghc-pkg-wrapper 
new/ghc-rpm-macros-1.7.4/ghc-pkg-wrapper
--- old/ghc-rpm-macros-1.7.2/ghc-pkg-wrapper    2017-07-07 14:16:59.576993852 
+0200
+++ new/ghc-rpm-macros-1.7.4/ghc-pkg-wrapper    2018-03-22 01:32:29.277955826 
+0100
@@ -29,4 +29,5 @@
     GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR"
 fi
 
+#todo
 $GHC_PKG -v0 --simple-output --global $* | uniq
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.7.2/macros.ghc 
new/ghc-rpm-macros-1.7.4/macros.ghc
--- old/ghc-rpm-macros-1.7.2/macros.ghc 2017-07-12 12:08:02.187853889 +0200
+++ new/ghc-rpm-macros-1.7.4/macros.ghc 2018-03-23 10:56:24.631707980 +0100
@@ -29,6 +29,7 @@
 %cabal_configure\
 %ghc_check_bootstrap\
 %global _hardened_ldflags %{nil}\
+%cabal --version\
 %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} 
--docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' 
--ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} 
%{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed 
-e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" 
%{?cabal_configure_options} $cabal_configure_extra_options
 
 # install
@@ -73,13 +74,14 @@
 %ghc_gen_filelists()\
 %define pkgname %{?1}%{!?1:%{pkg_name}}\
 %define pkgver %{?2}%{!?2:%{version}}\
-%define pkgnamever %{pkgname}-%{pkgver}\
 %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\
+%define pkgnamever %{pkgname}-%{pkgver}\
 %define docdir %{ghclibdocdir}/%{pkgnamever}\
-keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field 
%{pkgnamever} key)\
-pkgdir="%{ghclibdir}/${keyname}"\
 rm -f %{basepkg}.files %{basepkg}-devel.files\
 touch %{basepkg}.files %{basepkg}-devel.files\
+%if %{undefined has_internal_sub_libraries}\
+keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field 
%{pkgnamever} key)\
+pkgdir="%{ghclibdir}/${keyname}"\
 echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> 
%{basepkg}-devel.files\
 if [ -d "%{buildroot}${pkgdir}" ]; then\
 echo "%%dir ${pkgdir}" >> %{basepkg}.files\
@@ -89,6 +91,21 @@
 find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> 
%{basepkg}-devel.files\
 find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> 
%{basepkg}-devel.files\
 fi\
+%else\
+echo "%%dir %{ghclibdir}/package.conf.d/%{pkgnamever}.conf/" >> 
%{basepkg}-devel.files\
+echo "%{ghclibdir}/package.conf.d/%{pkgnamever}.conf/*" >> 
%{basepkg}-devel.files\
+for keyname in $(ls 
%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf/ | sed -r -e 
"s:^[0-9]+-::g"); do\
+pkgdir="%{ghclibdir}/${keyname}"\
+if [ -d "%{buildroot}${pkgdir}" ]; then\
+echo "%%dir ${pkgdir}" >> %{basepkg}.files\
+%if %{undefined ghc_without_shared}\
+echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> 
%{basepkg}.files\
+%endif\
+find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> 
%{basepkg}-devel.files\
+find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> 
%{basepkg}-devel.files\
+fi\
+done\
+%endif\
 if [ -d "%{buildroot}%{docdir}" ]; then\
 echo "%{docdir}" >> %{basepkg}-devel.files\
 fi\
@@ -111,7 +128,14 @@
 %define pkgver %{?2}%{!?2:%{version}}\
 %define pkgnamever %{pkgname}-%{pkgver}\
 %cabal register --gen-pkg-config\
+if [ -d %{pkgnamever}.conf ]; then\
+install -d --mode=0755 
%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\
+for i in $(ls %{pkgnamever}.conf/*); do\
+install -D --mode=0644 ${i} %{buildroot}%{ghclibdir}/package.conf.d/${i}\
+done\
+else\
 install -D --mode=0644 %{pkgnamever}.conf 
%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\
+fi\
 %{nil}
 
 # ghc_bin_build
@@ -132,7 +156,7 @@
 %if %{undefined without_haddock}\
 %define pkgname %{?1}%{!?1:%{pkg_name}}\
 %define pkgver %{?2}%{!?2:%{version}}\
-if [ -f dist/build/libHS%{pkgname}-%{pkgver}.a ]; then\
+if [ -n dist/build/libHS%{pkgname}-%{pkgver}*.so ]; then\
 %cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; 
then echo --hyperlink-source; fi)} --hoogle %{?cabal_haddock_options}\
 fi\
 %endif\
@@ -150,6 +174,7 @@
 %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh 
%{buildroot}%{ghclibdir}}\
 %cabal_install\
 %{!?1:%ghc_strip_dynlinked}\
+%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\
 %{nil}
 
 # ghc_lib_install [name] [version]
@@ -161,21 +186,28 @@
 %cabal_pkg_conf\
 %ghc_gen_filelists\
 %{!?1:%ghc_strip_dynlinked}\
+%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\
 %{nil}
 
 # ghc_fix_rpath lib-ver ...
 %ghc_fix_rpath()\
 %if %{undefined ghc_without_dynamic}\
 if ! type chrpath > /dev/null; then exit 1; fi\
-pdir=$(pwd)\
-for lib in %*; do\
 for i in $(find %{buildroot} -type f -exec sh -c "file {} | grep -q 
'dynamically linked'" \\; -print); do\
+for lib in %*; do\
   if [ -x "$i" ]; then\
     rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\
     case $rpath in\
-         *$pdir/$lib/*)\
-         syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} 
--package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs)\
-         NEWRPATH=$(echo $rpath | sed -e 
"s@$pdir/$lib/dist/build@${syspath}@g")\
+         *$PWD/$lib/dist/build*)\
+         case %{ghc_version} in\
+              7.10.*)\
+                pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* 
| sed -e "s/.conf$//")\
+                syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper 
%{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d 
field $pkgid library-dirs) ;;\
+              *)\
+                pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\
+                syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper 
%{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d 
field $lib library-dirs | grep $pkgid) ;;\
+         esac\
+         newrpath=$(echo $rpath | sed -e 
"s@$PWD/$lib/dist/build@${syspath}@g")\
          chrpath -r $newrpath $i\
          ;;\
     esac\
@@ -200,7 +232,7 @@
     *) prog=%{buildroot}%{_bindir}/$i ;;\
   esac\
   if [ -x "$prog" ]; then\
-    RPATH=$(chrpath $prog | sed -e "s@^$prog: R.*PATH=@@")\
+    rpath=$(chrpath $prog | sed -e "s@^$prog: R.*PATH=@@")\
     case $rpath in\
          *$pdir*)\
          newrpath=$(echo $rpath | sed -e 
"s@$pdir/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ghc-rpm-macros-1.7.2/macros.ghc-extra 
new/ghc-rpm-macros-1.7.4/macros.ghc-extra
--- old/ghc-rpm-macros-1.7.2/macros.ghc-extra   2017-07-07 14:16:59.604993694 
+0200
+++ new/ghc-rpm-macros-1.7.4/macros.ghc-extra   2018-03-19 21:10:08.000000000 
+0100
@@ -5,7 +5,7 @@
 %ghc_lib_subpackage(c:dl:x)\
 %define pkgname %{?2:%{1}}%{!?2:%{lua:\
 local pv = rpm.expand("%1")\
-local _, _, name = string.find(pv, "^([%a-]+)-")\
+local _, _, name = string.find(pv, "^([%a%d-]+)-")\
 print(name)\
 }}\
 %define pkgver %{?2}%{!?2:%{lua:\
@@ -17,9 +17,7 @@
 %define basepkg %{ghc_prefix}-%{pkgname}\
 %package -n %{basepkg}\
 Summary:        Haskell %{pkgname} library\
-%if 0%{?rhel} && 0%{?rhel} < 7\
 Group:          System/Libraries\
-%endif\
 %{?1:Version:        %{pkgver}}\
 %{-l:License:        %{-l*}}\
 Url:            http://hackage.haskell.org/package/%{pkgname}\
@@ -30,9 +28,7 @@
 \
 %package -n %{basepkg}-devel\
 Summary:        Haskell %{pkgname} library development files\
-%if 0%{?rhel} && 0%{?rhel} < 7\
 Group:          Development/Languages/Other\
-%endif\
 %{?1:Version:        %{pkgver}}\
 %{-l:License:        %{-l*}}\
 Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\
@@ -52,13 +48,13 @@
 %ghc_pkg_recache\
 \
 %files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\
-%if 0%{?rhel} && 0%{?rhel} < 7\
+%if 0%{?rhel} && 0%{?rhel} < 6\
 %defattr(-,root,root,-)\
 %endif\
 %{?base_doc_files:%doc %base_doc_files}\
 \
 %files -n %{basepkg}-devel -f 
%{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\
-%if 0%{?rhel} && 0%{?rhel} < 7\
+%if 0%{?rhel} && 0%{?rhel} < 6\
 %defattr(-,root,root,-)\
 %endif\
 %{?devel_doc_files:%doc %devel_doc_files}\


Reply via email to