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
7c5e4d74e1
commit
d739830613
@ -42,29 +42,12 @@ fi
|
|||||||
%define pkgdir %{ghclibdir}/%{pkgnamever}\
|
%define pkgdir %{ghclibdir}/%{pkgnamever}\
|
||||||
%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
%define docdir %{ghclibdocdir}/%{pkgnamever}\
|
||||||
rm -f %{basepkg}.files %{basepkg}-devel.files\
|
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\
|
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\
|
echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\
|
||||||
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\
|
%endif\
|
||||||
fi\
|
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\
|
echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\
|
||||||
if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
if [ -d "%{buildroot}%{pkgdir}" ]; then\
|
||||||
find %{buildroot}%{pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
|
find %{buildroot}%{pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\
|
||||||
@ -73,7 +56,7 @@ fi\
|
|||||||
if [ -d "%{buildroot}%{docdir}" ]; then\
|
if [ -d "%{buildroot}%{docdir}" ]; then\
|
||||||
echo "%{docdir}" >> %{basepkg}-devel.files\
|
echo "%{docdir}" >> %{basepkg}-devel.files\
|
||||||
fi\
|
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\
|
if [ -f "$i" ]; then\
|
||||||
sed -i -e "s!%{buildroot}!!g" $i\
|
sed -i -e "s!%{buildroot}!!g" $i\
|
||||||
fi\
|
fi\
|
||||||
@ -289,7 +272,7 @@ for i in %*; do\
|
|||||||
PROG=%{buildroot}%{_bindir}/$i\
|
PROG=%{buildroot}%{_bindir}/$i\
|
||||||
RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\
|
RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\
|
||||||
case $RPATH in\
|
case $RPATH in\
|
||||||
$PDIR*)\
|
*$PDIR*)\
|
||||||
NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\
|
NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\
|
||||||
chrpath -r $NEWRPATH $PROG\
|
chrpath -r $NEWRPATH $PROG\
|
||||||
;;\
|
;;\
|
||||||
@ -312,5 +295,3 @@ done\
|
|||||||
%global ghc_without_shared 1\
|
%global ghc_without_shared 1\
|
||||||
%global ghc_without_dynamic 1\
|
%global ghc_without_dynamic 1\
|
||||||
%ghc_test
|
%ghc_test
|
||||||
|
|
||||||
%ghc_exclude_docdir 1
|
|
||||||
|
@ -6,13 +6,12 @@
|
|||||||
#%%global without_hscolour 1
|
#%%global without_hscolour 1
|
||||||
|
|
||||||
Name: ghc-rpm-macros
|
Name: ghc-rpm-macros
|
||||||
Version: 0.95.10
|
Version: 0.95.11
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Macros for building packages for GHC
|
Summary: Macros for building packages for GHC
|
||||||
|
|
||||||
Group: Development/Libraries
|
|
||||||
License: GPLv3
|
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
|
# This is a Fedora maintained package, originally made for
|
||||||
# the distribution. Hence the source is currently only available
|
# the distribution. Hence the source is currently only available
|
||||||
@ -68,13 +67,24 @@ EOF
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%doc COPYING AUTHORS
|
%doc COPYING AUTHORS
|
||||||
%config(noreplace) %{macros_file}
|
%{macros_file}
|
||||||
%{_prefix}/lib/rpm/ghc-deps.sh
|
%{_prefix}/lib/rpm/ghc-deps.sh
|
||||||
%{_bindir}/cabal-tweak-dep-ver
|
%{_bindir}/cabal-tweak-dep-ver
|
||||||
%{_bindir}/cabal-tweak-flag
|
%{_bindir}/cabal-tweak-flag
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 21 2013 Jens Petersen <petersen@redhat.com> - 0.95.11-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.95.10-1
|
* Tue Jan 22 2013 Jens Petersen <petersen@redhat.com> - 0.95.10-1
|
||||||
- simplify cabal-tweak-flag script to take one flag value
|
- simplify cabal-tweak-flag script to take one flag value
|
||||||
- new ghc_fix_dynamic_rpath macro for cleaning up package executables
|
- new ghc_fix_dynamic_rpath macro for cleaning up package executables
|
||||||
|
Loading…
Reference in New Issue
Block a user