backport fixes including new Packaging Guidelines changes
- ghc_fix_dynamic_rpath fix - packaging for without_shared is now done the same way as shared - remove deprecated ghc_exclude_docdir - remove %config(noreplace) - only add lib pkgdir to filelist if it exists
This commit is contained in:
parent
91ca3e6288
commit
965f64a0bd
@ -42,29 +42,12 @@ fi
|
||||
%define pkgdir %{ghclibdir}/%{pkgnamever}\
|
||||
%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
||||
rm -f %{basepkg}.files %{basepkg}-devel.files\
|
||||
echo "%dir %{pkgdir}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||
echo "%dir %{pkgdir}" >> %{basepkg}.files\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||
%endif\
|
||||
fi\
|
||||
%endif\
|
||||
%if %{defined ghc_without_shared}\
|
||||
if [ "%{name}" = "%{basepkg}" -o -n "%{?1}" ]; then\
|
||||
if [ -d "%{buildroot}%{_docdir}/%{basepkg}-%{pkgver}" ]; then\
|
||||
mv %{buildroot}%{_docdir}/%{basepkg}-%{pkgver} %{buildroot}%{_docdir}/%{basepkg}-devel-%{pkgver}\
|
||||
%if %{undefined ghc_exclude_docdir}\
|
||||
echo "%{_docdir}/%{basepkg}-devel-%{version}" >> %{basepkg}-devel.files\
|
||||
%endif\
|
||||
fi\
|
||||
fi\
|
||||
%endif\
|
||||
%if %{undefined ghc_exclude_docdir}\
|
||||
if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\
|
||||
echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
|
||||
elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\
|
||||
echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\
|
||||
fi\
|
||||
%endif\
|
||||
echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
|
||||
if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||
find %{buildroot}%{pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
|
||||
@ -73,7 +56,7 @@ fi\
|
||||
if [ -d "%{buildroot}%{docdir}" ]; then\
|
||||
echo "%{docdir}" >> %{basepkg}-devel.files\
|
||||
fi\
|
||||
for i in %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files; do\
|
||||
for i in %{basepkg}.files %{basepkg}-devel.files; do\
|
||||
if [ -f "$i" ]; then\
|
||||
sed -i -e "s!%{buildroot}!!g" $i\
|
||||
fi\
|
||||
@ -289,7 +272,7 @@ for i in %*; do\
|
||||
PROG=%{buildroot}%{_bindir}/$i\
|
||||
RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\
|
||||
case $RPATH in\
|
||||
$PDIR*)\
|
||||
*$PDIR*)\
|
||||
NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\
|
||||
chrpath -r $NEWRPATH $PROG\
|
||||
;;\
|
||||
|
@ -6,13 +6,12 @@
|
||||
#%%global without_hscolour 1
|
||||
|
||||
Name: ghc-rpm-macros
|
||||
Version: 0.15.11
|
||||
Version: 0.15.12
|
||||
Release: 1%{?dist}
|
||||
Summary: Macros for building packages for GHC
|
||||
|
||||
Group: Development/Libraries
|
||||
License: GPLv3
|
||||
URL: https://fedoraproject.org/wiki/Haskell_SIG
|
||||
URL: https://fedoraproject.org/wiki/Packaging:Haskell
|
||||
|
||||
# This is a Fedora maintained package, originally made for
|
||||
# the distribution. Hence the source is currently only available
|
||||
@ -68,13 +67,24 @@ EOF
|
||||
|
||||
%files
|
||||
%doc COPYING AUTHORS
|
||||
%config(noreplace) %{macros_file}
|
||||
%{macros_file}
|
||||
%{_prefix}/lib/rpm/ghc-deps.sh
|
||||
%{_bindir}/cabal-tweak-dep-ver
|
||||
%{_bindir}/cabal-tweak-flag
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jun 21 2013 Jens Petersen <petersen@redhat.com> - 0.15.12-1
|
||||
- ghc_fix_dynamic_rpath: do not assume first RPATH
|
||||
- packaging for without_shared is now done the same way as shared
|
||||
to make non-shared arch packages same as shared ones:
|
||||
so all archs will now have base library binary packages
|
||||
- remove deprecated ghc_exclude_docdir
|
||||
- Remove %%config from %%{_sysconfdir}/rpm/macros.*
|
||||
(https://fedorahosted.org/fpc/ticket/259).
|
||||
- only add lib pkgdir to filelist if it exists
|
||||
to fix haskell-platform build on secondary archs (no shared libs)
|
||||
|
||||
* Tue Jan 22 2013 Jens Petersen <petersen@redhat.com> - 0.15.11-1
|
||||
- simplify cabal-tweak-flag script to take one flag value
|
||||
- new ghc_fix_dynamic_rpath macro for cleaning up package executables
|
||||
|
Loading…
Reference in New Issue
Block a user