update RPATH fix

This commit is contained in:
Miroslav Lichvar 2014-02-20 15:01:45 +01:00
parent 47e208384c
commit f9a13d93a9

View File

@ -17,7 +17,6 @@ Source12: gpsdctl.service
BuildRequires: dbus-devel dbus-glib-devel ncurses-devel xmlto python-devel BuildRequires: dbus-devel dbus-glib-devel ncurses-devel xmlto python-devel
BuildRequires: scons desktop-file-utils bluez-libs-devel pps-tools-devel BuildRequires: scons desktop-file-utils bluez-libs-devel pps-tools-devel
BuildRequires: chrpath
%ifnarch s390 s390x %ifnarch s390 s390x
BuildRequires: libusb1-devel BuildRequires: libusb1-devel
%endif %endif
@ -77,6 +76,9 @@ can run on a serial terminal or terminal emulator.
%prep %prep
%setup -q -n %{name} %setup -q -n %{name}
# fix RPATH
sed -i 's|sysrpath =.*|sysrpath = ["%{_libdir}"]|' SConstruct
%build %build
export CCFLAGS="%{optflags}" export CCFLAGS="%{optflags}"
export LINKFLAGS="%{__global_ldflags}" export LINKFLAGS="%{__global_ldflags}"
@ -145,18 +147,6 @@ desktop-file-install \
# Not needed since gpsd.h is not installed # Not needed since gpsd.h is not installed
rm %{buildroot}%{_libdir}/{libgpsd.so,pkgconfig/libgpsd.pc} rm %{buildroot}%{_libdir}/{libgpsd.so,pkgconfig/libgpsd.pc}
# Remove RPATH (even the actual string)
for i in \
%{buildroot}%{_bindir}/gps{mon,ctl,2udp,decode,pipe} \
%{buildroot}%{_bindir}/{lcdgps,cgps,gpxlogger} \
%{buildroot}%{_sbindir}/gpsd{,ctl} \
%{buildroot}%{_libdir}/libgps{,d}.so.*.*.* \
%{buildroot}%{python_sitearch}/gps/*.so
do
chrpath -r "" $i
chrpath -d $i
done
%post %post
%systemd_post gpsd.service gpsd.socket %systemd_post gpsd.service gpsd.socket