[speech-dispatcher/f18] Move RPM hacks to source patches

Bastien Nocera hadess at fedoraproject.org
Thu Nov 29 15:05:30 UTC 2012


commit 49a7e471dd23dc5086c44ce70bfb819e3fcb87dd
Author: Bastien Nocera <hadess at hadess.net>
Date:   Thu Nov 29 15:53:38 2012 +0100

    Move RPM hacks to source patches

 0001-RPM-Cleanups.patch |   37 +++++++++++++++++++++++++++++++++++++
 speech-dispatcher.spec  |   27 +++++++++------------------
 2 files changed, 46 insertions(+), 18 deletions(-)
---
diff --git a/0001-RPM-Cleanups.patch b/0001-RPM-Cleanups.patch
new file mode 100644
index 0000000..7d05c05
--- /dev/null
+++ b/0001-RPM-Cleanups.patch
@@ -0,0 +1,37 @@
+From 33d7aa0f39058f82414e50ad9ed13664bbecadeb Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Thu, 29 Nov 2012 15:46:23 +0100
+Subject: [PATCH] RPM Cleanups
+
+diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
+index 7fdf847..15e9ae6 100644
+--- a/src/tests/Makefile.am
++++ b/src/tests/Makefile.am
+@@ -5,10 +5,10 @@ c_api = $(top_builddir)/src/c/api
+ 
+ AM_CFLAGS = -I$(top_srcdir)/src/c/api -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ -I../audio/
+ 
+-bin_PROGRAMS = long_message clibrary clibrary2 run_test connection_recovery
++bin_PROGRAMS = sdp_long_message clibrary clibrary2 sdp_run_test connection_recovery
+ 
+-long_message_SOURCES = long_message.c
+-long_message_LDADD = $(c_api)/libspeechd.la -lpthread @EXTRA_SOCKET_LIBS@
++sdp_long_message_SOURCES = long_message.c
++sdp_long_message_LDADD = $(c_api)/libspeechd.la -lpthread @EXTRA_SOCKET_LIBS@
+ 
+ clibrary_SOURCES = clibrary.c
+ clibrary_LDADD = $(c_api)/libspeechd.la -lpthread @EXTRA_SOCKET_LIBS@
+@@ -19,8 +19,8 @@ clibrary2_LDADD = $(c_api)/libspeechd.la -lpthread @EXTRA_SOCKET_LIBS@
+ connection_recovery_SOURCES = connection-recovery.c
+ connection_recovery_LDADD = $(c_api)/libspeechd.la -lpthread @EXTRA_SOCKET_LIBS@
+ 
+-run_test_SOURCES = run_test.c
+-run_test_LDADD = $(c_api)/libspeechd.la -lpthread @EXTRA_SOCKET_LIBS@
++sdp_run_test_SOURCES = run_test.c
++sdp_run_sest_LDADD = $(c_api)/libspeechd.la -lpthread @EXTRA_SOCKET_LIBS@
+ 
+ EXTRA_DIST= basic.test general.test keys.test priority_progress.test \
+             pronunciation.test punctuation.test sound_icons.test spelling.test \
+-- 
+1.8.0
+
diff --git a/speech-dispatcher.spec b/speech-dispatcher.spec
index 2518425..808eb9d 100644
--- a/speech-dispatcher.spec
+++ b/speech-dispatcher.spec
@@ -3,7 +3,7 @@
 
 Name:          speech-dispatcher
 Version:       0.7.1
-Release:       8%{?dist}
+Release:       9%{?dist}
 Summary:       To provide a high-level device independent layer for speech synthesis
 Group:         System Environment/Libraries
 
@@ -24,6 +24,9 @@ Buildrequires: pulseaudio-libs-devel
 BuildRequires: python-setuptools-devel
 BuildRequires: texinfo
 BuildRequires: systemd-units
+BuildRequires: automake libtool
+Patch0: 0001-RPM-Cleanups.patch
+
 Requires(post): systemd-units
 Requires(post): systemd-sysv
 Requires(post): chkconfig
@@ -84,13 +87,8 @@ speechd python module
 
 %prep
 %setup -q
-
-## nuke unwanted rpaths, see also 
-## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
-sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
-# or (though this is more invasive, and BuildRequires: automake libtool
-#autoreconf -i -f
-
+%patch0 -p1
+autoreconf -i -f
 
 %build
 %configure --disable-static --with-alsa --with-pulse --without-nas --with-flite --sysconfdir=%{_sysconfdir}
@@ -98,8 +96,6 @@ sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
 make %{?_smp_mflags}
 
 %install
-rm -rf %{buildroot}
-
 for dir in \
  config/ doc/ src/audio/ src/c/ src/modules/ src/tests/ src/server/ src/python/
  do
@@ -111,14 +107,9 @@ done
 mkdir -p %{buildroot}%{_unitdir}
 install -p -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/
 
-#Rename certain generically named binaries
-mv %{buildroot}%{_bindir}/long_message %{buildroot}%{_bindir}/spd_long_message 
-mv %{buildroot}%{_bindir}/run_test %{buildroot}%{_bindir}/spd_run_test
-
 #Remove %{_infodir}/dir file
 rm -f %{buildroot}%{_infodir}/dir
 
-cd ../../
 find %{buildroot} -name '*.la' -exec rm -f {} ';'
 
 # Move the config files from /usr/share to /etc
@@ -131,9 +122,6 @@ mv %{buildroot}%{_datadir}/speech-dispatcher/conf/modules/* %{buildroot}%{_sysco
 # Create log dir
 %{__mkdir} -p -m 0700 %{buildroot}%{_localstatedir}/log/speech-dispatcher/
 
-# enable pulseaudio as default with a fallback to alsa
-sed 's/# AudioOutputMethod "pulse,alsa"/AudioOutputMethod "pulse,alsa"/' %{buildroot}%{_sysconfdir}/speech-dispatcher/speechd.conf
-
 %clean
 rm -rf %{buildroot}
 
@@ -221,6 +209,9 @@ fi
 %{python_sitearch}/speechd*
 
 %changelog
+* Thu Nov 29 2012 Bastien Nocera <bnocera at redhat.com> 0.7.1-9
+- Move RPM hacks to source patches
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.1-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list