From 6f1bb17f9ff7863ab652f7ea7c262c84f3ec3177 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Wed, 7 Mar 2018 11:53:14 +0100 Subject: [PATCH] ensure binaries are linked with Fedora LDFLAGS (#1548532) use ldconfig_scriptlets macro add proper man links for tcat and untoast --- gsm-makefile.patch | 2 +- gsm.spec | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gsm-makefile.patch b/gsm-makefile.patch index d91307e..8153480 100644 --- a/gsm-makefile.patch +++ b/gsm-makefile.patch @@ -82,7 +82,7 @@ diff -up gsm-1.0-pl17/Makefile.mk gsm-1.0-pl17/Makefile # The basic API: libgsm +$(LIBGSMSO).$(SO_VER): $(LIB) $(GSM_OBJECTS) -+ $(LD) -o $@ -shared -Xlinker -soname -Xlinker libgsm.so.$(SO_MAJOR) $(GSM_OBJECTS) -lc ++ $(LD) $(LFLAGS) -o $@ -shared -Xlinker -soname -Xlinker libgsm.so.$(SO_MAJOR) $(GSM_OBJECTS) -lc + +$(LIBGSMSO).$(SO_MAJOR): $(LIBGSMSO).$(SO_VER) + ln -fs libgsm.so.$(SO_VER) lib/libgsm.so.$(SO_MAJOR) diff --git a/gsm.spec b/gsm.spec index 93a46bd..27d0acf 100644 --- a/gsm.spec +++ b/gsm.spec @@ -3,7 +3,7 @@ Name: gsm Version: %{ver_maj}.%{ver_min} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Shared libraries for GSM speech compressor Group: System Environment/Libraries @@ -61,9 +61,11 @@ full-rate speech transcoding, prI-ETS 300 036, which uses RPE/LTP %patch1 -p1 -b .warn %build +export LDFLAGS="%{?__global_ldflags}" make %{?_smp_mflags} all %install +export LDFLAGS="%{?__global_ldflags}" mkdir -p %{buildroot}{%{_bindir},%{_includedir}/gsm,%{_libdir},%{_mandir}/{man1,man3}} make install \ @@ -74,14 +76,16 @@ make install \ # some apps look for this in /usr/include ln -s gsm/gsm.h %{buildroot}%{_includedir} +echo ".so toast.1" > %{buildroot}%{_mandir}/man1/tcat.1 +echo ".so toast.1" > %{buildroot}%{_mandir}/man1/untoast.1 + %check # This is to ensure that the patch creates the proper library version. [ -f %{buildroot}%{_libdir}/libgsm.so.%{version} ] +export LDFLAGS="%{?__global_ldflags}" make addtst -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%ldconfig_scriptlets %files %license COPYRIGHT @@ -92,7 +96,9 @@ make addtst %{_bindir}/tcat %{_bindir}/toast %{_bindir}/untoast +%{_mandir}/man1/tcat.1* %{_mandir}/man1/toast.1* +%{_mandir}/man1/untoast.1* %files devel %dir %{_includedir}/gsm @@ -105,6 +111,11 @@ make addtst %{_mandir}/man3/gsm_print.3* %changelog +* Wed Mar 07 2018 Dominik Mierzejewski 1.0.17-2 +- ensure binaries are linked with Fedora LDFLAGS (#1548532) +- use ldconfig_scriptlets macro +- add proper man links for tcat and untoast + * Thu Jun 29 2017 Dominik Mierzejewski 1.0.17-1 - update to 1.0.17 (#1465878) - ease future updates by better macro use