Fix the rpath removal

As noted in commit a90bc2e7, editing libtool to prevent rpaths breaks
the introspection compiler as it needs the rpaths during build to find
libs that are in build directories. Normally libtool relinks the libs
during 'make install', but this doesn't work for Fedora's lib64.

As a fix, kill the unwanted rpaths in %install with chrpath -- this will
run after the build has finished, and won't interfere with the
introspection compiler.
This commit is contained in:
Kalev Lember 2012-05-03 09:45:40 +03:00
parent 0d2ab34aed
commit 224fa5ea47

View File

@ -16,6 +16,7 @@ License: LGPLv2+
URL: http://ftp.acc.umu.se/pub/GNOME/sources/libpeas/
Source0: http://ftp.acc.umu.se/pub/GNOME/sources/%{name}/1.4/%{name}-%{version}.tar.xz
BuildRequires: chrpath
BuildRequires: gtk3-devel >= 2.99.3
BuildRequires: pygobject3-devel
BuildRequires: python-devel
@ -55,11 +56,6 @@ that are needed to write applications that use libpeas.
%build
%configure --enable-vala %{seed_option}
# FIXME rpath disabling is disabled because it breaks the creation of the GIR files
# Remove rpath as per https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%install
@ -68,6 +64,10 @@ make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT/%{_libdir}/lib*.la \
$RPM_BUILD_ROOT/%{_libdir}/libpeas-1.0/loaders/lib*.la
# Remove rpath as per https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/peas-demo
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libpeas-gtk-1.0.so
%find_lang libpeas
%post
@ -110,6 +110,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%changelog
* Thu May 03 2012 Kalev Lember <kalevlember@gmail.com> - 1.4.0-2
- Re-enable the GJS loader
- Remove unwanted lib64 rpaths
* Wed Mar 28 2012 Ignacio Casal Quinteiro <icq@gnome.org> - 1.4.0-1
- Update to 1.4.0