From 55691b2d33562a1f6694a4f3dbc668549e85ec90 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Thu, 24 Nov 2016 13:57:46 +0100 Subject: [PATCH] update to 1.0.16 (#1397242) - use license macro - drop obsolete stuff and simplify --- .gitignore | 1 + gsm-makefile.patch | 146 +++++++++++++++++++++++++++++++++------------ gsm.spec | 44 ++++++-------- sources | 2 +- 4 files changed, 127 insertions(+), 66 deletions(-) diff --git a/.gitignore b/.gitignore index 69fe097..5c5c2bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ gsm-1.0.13.tar.gz +/gsm-1.0.16.tar.gz diff --git a/gsm-makefile.patch b/gsm-makefile.patch index cf3e99b..8531122 100644 --- a/gsm-makefile.patch +++ b/gsm-makefile.patch @@ -1,17 +1,7 @@ ---- gsm-1.0-pl12/Makefile.mk 2006-04-26 21:14:26.000000000 +0200 -+++ gsm-1.0-pl12/Makefile 2007-05-13 13:03:32.000000000 +0200 -@@ -30,6 +30,10 @@ - ######### define this, and read about the GSM_OPT_WAV49 option in the - ######### manual page on gsm_option(3). - -+PG = -+#PG = -g -pg -+######### Profiling flags. If you don't know what that means, leave it blank -+ - # Choose a compiler. The code works both with ANSI and K&R-C. - # Use -DNeedFunctionPrototypes to compile with, -UNeedFunctionPrototypes to - # compile without, function prototypes in the header files. -@@ -44,7 +48,7 @@ +diff -up gsm-1.0-pl16/Makefile.mk gsm-1.0-pl16/Makefile +--- gsm-1.0-pl16/Makefile.mk 2006-04-26 21:14:26.000000000 +0200 ++++ gsm-1.0-pl16/Makefile 2016-11-24 13:49:47.810060070 +0100 +@@ -44,13 +44,17 @@ WAV49 = -DWAV49 # CCFLAGS = -c -O CC = gcc -ansi -pedantic @@ -20,7 +10,17 @@ LD = $(CC) -@@ -81,7 +85,7 @@ + # LD = gcc + # LDFLAGS = + ++SO_MAJOR = 1 ++SO_MINOR = 0 ++SO_MICRO = 16 ++SO_VER = $(SO_MAJOR).$(SO_MINOR).$(SO_MICRO) + + # If your compiler needs additional flags/libraries, regardless of + # the source compiled, configure them here. +@@ -81,7 +85,7 @@ INSTALL_ROOT = GSM_INSTALL_ROOT = $(INSTALL_ROOT) GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc @@ -29,7 +29,7 @@ # Where do you want to install the toast binaries and their manpage? -@@ -91,16 +95,16 @@ +@@ -91,16 +95,16 @@ GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/ma TOAST_INSTALL_ROOT = $(INSTALL_ROOT) TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin @@ -49,20 +49,7 @@ FIND = find COMPRESS = compress COMPRESSFLAGS = -@@ -129,17 +133,18 @@ - # DEBUG = -DNDEBUG - ######### Remove -DNDEBUG to enable assertions. - --CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \ -+CFLAGS = $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \ - $(WAV49) $(CCINC) -I$(INC) - ######### It's $(CC) $(CFLAGS) - --LFLAGS = $(LDFLAGS) $(LDINC) -+LFLAGS = $(PG) $(LDFLAGS) $(LDINC) - ######### It's $(LD) $(LFLAGS) - - +@@ -140,6 +144,7 @@ LFLAGS = $(LDFLAGS) $(LDINC) # Targets LIBGSM = $(LIB)/libgsm.a @@ -70,23 +57,38 @@ TOAST = $(BIN)/toast UNTOAST = $(BIN)/untoast -@@ -279,7 +284,7 @@ +@@ -257,7 +262,9 @@ STUFF = ChangeLog \ + # Install targets + + GSM_INSTALL_TARGETS = \ +- $(GSM_INSTALL_LIB)/libgsm.a \ ++ $(GSM_INSTALL_LIB)/libgsm.so.$(SO_VER) \ ++ $(GSM_INSTALL_LIB)/libgsm.so.$(SO_MAJOR)\ ++ $(GSM_INSTALL_LIB)/libgsm.so \ + $(GSM_INSTALL_INC)/gsm.h \ + $(GSM_INSTALL_MAN)/gsm.3 \ + $(GSM_INSTALL_MAN)/gsm_explode.3 \ +@@ -279,7 +286,7 @@ TOAST_INSTALL_TARGETS = \ # Target rules -all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST) -+all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST) ++all: $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST) @-echo $(ROOT): Done. tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result -@@ -299,24 +304,28 @@ +@@ -299,24 +306,32 @@ install: toastinstall gsminstall # The basic API: libgsm -+$(LIBGSMSO): $(LIB) $(GSM_OBJECTS) -+ $(LD) -o $@.1.0.12 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc -+ ln -fs libgsm.so.1.0.12 lib/libgsm.so.1 -+ ln -fs libgsm.so.1.0.12 lib/libgsm.so ++$(LIBGSMSO).$(SO_VER): $(LIB) $(GSM_OBJECTS) ++ $(LD) -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) ++ ++$(LIBGSMSO): $(LIBGSMSO).$(SO_VER) ++ ln -fs libgsm.so.$(SO_VER) lib/libgsm.so + $(LIBGSM): $(LIB) $(GSM_OBJECTS) -rm $(RMFLAGS) $(LIBGSM) @@ -98,7 +100,7 @@ -$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM) - $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB) -+$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM) $(LIBGSMSO) ++$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSMSO) + $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB) $(UNTOAST): $(BIN) $(TOAST) @@ -113,3 +115,71 @@ # The local bin and lib directories +@@ -352,8 +367,7 @@ toastuninstall: + + $(TOAST_INSTALL_BIN)/toast: $(TOAST) + -rm $@ +- cp $(TOAST) $@ +- chmod 755 $@ ++ install -pm755 $(TOAST) $@ + + $(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast + -rm $@ +@@ -365,39 +379,43 @@ $(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTA + + $(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1 + -rm $@ +- cp $? $@ +- chmod 444 $@ ++ install -pm644 $? $@ + + $(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3 + -rm $@ +- cp $? $@ +- chmod 444 $@ ++ install -pm644 $? $@ + + $(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3 + -rm $@ +- cp $? $@ +- chmod 444 $@ ++ install -pm644 $? $@ + + $(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3 + -rm $@ +- cp $? $@ +- chmod 444 $@ ++ install -pm644 $? $@ + + $(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3 + -rm $@ +- cp $? $@ +- chmod 444 $@ ++ install -pm644 $? $@ + + $(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h + -rm $@ +- cp $? $@ +- chmod 444 $@ ++ install -pm644 $? $@ + + $(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM) + -rm $@ +- cp $? $@ +- chmod 444 $@ ++ install -pm644 $? $@ + ++$(GSM_INSTALL_LIB)/libgsm.so.$(SO_VER): $(LIBGSMSO).$(SO_VER) ++ -rm $@ ++ install -pm755 $? $@ ++ ++$(GSM_INSTALL_LIB)/libgsm.so.$(SO_MAJOR): $(LIBGSMSO).$(SO_MAJOR) ++ -rm $@ ++ ln -s libgsm.so.$(SO_VER) $@ ++ ++$(GSM_INSTALL_LIB)/libgsm.so: $(LIBGSMSO) ++ -rm $@ ++ ln -s libgsm.so.$(SO_VER) $@ + + # Distribution + diff --git a/gsm.spec b/gsm.spec index e5b0570..709249c 100644 --- a/gsm.spec +++ b/gsm.spec @@ -1,6 +1,6 @@ Name: gsm -Version: 1.0.13 -Release: 14%{?dist} +Version: 1.0.16 +Release: 1%{?dist} Summary: Shared libraries for GSM speech compressor Group: System Environment/Libraries @@ -10,10 +10,9 @@ Source: http://www.quut.com/gsm/%{name}-%{version}.tar.gz Patch0: %{name}-makefile.patch Patch1: %{name}-warnings.patch Patch2: %{name}-64bit.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -%global srcver 1.0-pl13 -%global soname 1.0.12 +%global srcver 1.0-pl16 +%global soname 1.0.16 %description Contains runtime shared libraries for libgsm, an implementation of @@ -47,7 +46,7 @@ excitation/long term prediction) coding at 13 kbit/s. %package devel Summary: Header files and development libraries for libgsm Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{_isa} = %{version}-%{release} %description devel Contains header files and development libraries for libgsm, an @@ -66,44 +65,28 @@ export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC"; make %{?_smp_mflags} all %install -rm -rf %{buildroot} - -mkdir -p %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{_includedir}/gsm -mkdir -p %{buildroot}%{_libdir} -mkdir -p %{buildroot}%{_mandir}/{man1,man3} +mkdir -p %{buildroot}{%{_bindir},%{_includedir}/gsm,%{_libdir},%{_mandir}/{man1,man3}} make install \ INSTALL_ROOT=%{buildroot}%{_prefix} \ GSM_INSTALL_INC=%{buildroot}%{_includedir}/gsm \ GSM_INSTALL_LIB=%{buildroot}%{_libdir} -cp -p $RPM_BUILD_DIR/gsm-%{srcver}/lib/libgsm.so.%{soname} %{buildroot}%{_libdir} -ln -s libgsm.so.%{soname} %{buildroot}%{_libdir}/libgsm.so.1 -ln -s libgsm.so.%{soname} %{buildroot}%{_libdir}/libgsm.so - # some apps look for this in /usr/include ln -s gsm/gsm.h %{buildroot}%{_includedir} -rm -f %{buildroot}%{_libdir}/lib*.a - - %check # This is to ensure that the patch creates the proper library version. [ -f %{buildroot}%{_libdir}/libgsm.so.%{soname} ] make addtst - -%clean -rm -rf %{buildroot} - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -%defattr(-,root,root,-) -%doc ChangeLog COPYRIGHT MACHINES README +%license COPYRIGHT +%doc ChangeLog MACHINES README %{_libdir}/libgsm.so.* %files tools @@ -113,14 +96,21 @@ rm -rf %{buildroot} %{_mandir}/man1/toast.1* %files devel -%defattr(-,root,root,-) %dir %{_includedir}/gsm %{_includedir}/gsm/gsm.h %{_includedir}/gsm.h %{_libdir}/libgsm.so -%{_mandir}/man3/* +%{_mandir}/man3/gsm.3* +%{_mandir}/man3/gsm_explode.3* +%{_mandir}/man3/gsm_option.3* +%{_mandir}/man3/gsm_print.3* %changelog +* Thu Nov 24 2016 Dominik Mierzejewski 1.0.16-1 +- update to 1.0.16 (#1397242) +- use license macro +- drop obsolete stuff and simplify + * Wed Feb 03 2016 Fedora Release Engineering - 1.0.13-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 80ef4da..61d724a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c1ba392ce61dc4aff1c29ea4e92f6df4 gsm-1.0.13.tar.gz +94b03ba7b9cf7da7caa8456c219a8673 gsm-1.0.16.tar.gz