[kannel] Add patch for ARM, modernise spec

Peter Robinson pbrobinson at fedoraproject.org
Tue Jun 12 09:48:15 UTC 2012


commit bf57e1cbd238bf6bc90db027e3703f64dd908a52
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Tue Jun 12 10:48:05 2012 +0100

    Add patch for ARM, modernise spec

 kannel.spec       |   45 ++++++++++++++++++++++-----------------------
 log-arm-587.patch |   18 ++++++++++++++++++
 2 files changed, 40 insertions(+), 23 deletions(-)
---
diff --git a/kannel.spec b/kannel.spec
index 1f431ef..fa6e8fc 100644
--- a/kannel.spec
+++ b/kannel.spec
@@ -1,10 +1,11 @@
 Summary: WAP and SMS gateway
 Name: kannel
 Version: 1.4.3
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: BSD
 Group: System Environment/Daemons
 URL: http://www.kannel.org/
+
 Source0: http://www.kannel.org/download/%{version}/gateway-%{version}.tar.bz2
 Source1: kannel.logrotate
 Source2: kannel-bearerbox.service
@@ -15,7 +16,8 @@ Source6: kannel-smsbox.service
 # TODO: a corresponding configure.in patch could be upstreamable?
 Patch0: gateway-1.4.3-ssldetect.patch
 Patch1: gateway-1.4.1-typesh.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Patch2: log-arm-587.patch
+
 BuildRequires: bison, byacc, flex, ghostscript
 BuildRequires: libxml2-devel, openssl-devel, zlib-devel, pcre-devel
 BuildRequires: sqlite-devel
@@ -60,9 +62,7 @@ use the Kannel WAP and SMS gateway.
 %package docs
 Summary: Documentation for the Kannel WAP and SMS gateway
 Group: Documentation
-%if 0%{?fedora} > 9
 BuildArch: noarch
-%endif
 
 %description docs
 The Kannel Open Source WAP and SMS gateway works as both an SMS gateway, for
@@ -79,7 +79,8 @@ This package contains documentation for the Kannel WAP and SMS gateway.
 %setup -q -n gateway-%{version}
 %patch0 -p1 -b .ssldetect
 %patch1 -p1 -b .typesh
-%{__chmod} -c -x gwlib/html-entities.def # for -debuginfo, as of 1.4.3
+%patch2 -p1 -b .arm
+chmod -c -x gwlib/html-entities.def # for -debuginfo, as of 1.4.3
 
 
 %build
@@ -90,37 +91,32 @@ This package contains documentation for the Kannel WAP and SMS gateway.
     %{?_with_mysql} \
     %{?_with_pgsql}
 # Remove %{?_smp_mflags} since the docs fail to build with it as of 1.4.3
-%{__make}
+make
 
 
 %install
-%{__rm} -rf %{buildroot}
-%{__make} install DESTDIR=%{buildroot}
+make install DESTDIR=%{buildroot}
 # Install fakesmsc and fakewap, useful for monitoring
-%{__install} -m 0755 test/{fakesmsc,fakewap} %{buildroot}%{_bindir}/
+install -m 0755 test/{fakesmsc,fakewap} %{buildroot}%{_bindir}/
 # Logrotate entry
-%{__install} -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/kannel
+install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/kannel
 # Unit files
-%{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/kannel-bearerbox.service
-%{__install} -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/kannel-wapbox.service
-%{__install} -D -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/kannel-smsbox.service
+install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/kannel-bearerbox.service
+install -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/kannel-wapbox.service
+install -D -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/kannel-smsbox.service
 # Default configuration file
-%{__install} -D -m 0640 %{SOURCE3} %{buildroot}%{_sysconfdir}/kannel.conf
+install -D -m 0640 %{SOURCE3} %{buildroot}%{_sysconfdir}/kannel.conf
 # Empty log directory
-%{__mkdir_p} %{buildroot}%{_var}/log/kannel/
+mkdir -p %{buildroot}%{_var}/log/kannel/
 # Rename start-stop-daemon to start-stop-kannel
-%{__mv} %{buildroot}%{_sbindir}/start-stop-daemon \
+mv %{buildroot}%{_sbindir}/start-stop-daemon \
         %{buildroot}%{_sbindir}/start-stop-kannel
 # Remove executable bit from man pages (as of 1.4.3)
-%{__chmod} -c -x %{buildroot}%{_mandir}/man?/*
+chmod -c -x %{buildroot}%{_mandir}/man?/*
 # Multilib fix : Replace the gw-config with our wrapper script
-%{__mv} %{buildroot}%{_bindir}/gw-config \
+mv %{buildroot}%{_bindir}/gw-config \
         %{buildroot}%{_bindir}/gw-config.%{_arch}
-%{__install} -p -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/gw-config
-
-
-%clean
-%{__rm} -rf %{buildroot}
+install -p -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/gw-config
 
 
 %pre
@@ -196,6 +192,9 @@ fi
 
 
 %changelog
+* Mon Jun 11 2012 Peter Robinson <pbrobinson at fedoraproject.org> - 1.4.3-9
+- Add patch for ARM, modernise spec
+
 * Thu May 10 2012 Jon Ciesla <limburgher at gmail.com> - 1.4.3-8
 - Migrate to systemd, BZ 789714.
 
diff --git a/log-arm-587.patch b/log-arm-587.patch
new file mode 100644
index 0000000..2fdd84c
--- /dev/null
+++ b/log-arm-587.patch
@@ -0,0 +1,18 @@
+--- gateway-1.4.3/gwlib/log.c.orig	2012-06-12 09:44:36.282824727 +0100
++++ gateway-1.4.3/gwlib/log.c	2012-06-12 09:46:10.796149152 +0100
+@@ -431,13 +431,8 @@
+     int translog;
+     
+     if (level >= sysloglevel && dosyslog) {
+-	if (args == NULL) {
+-	    strncpy(buf, format, sizeof(buf));
+-	    buf[sizeof(buf) - 1] = '\0';
+-	} else {
+-	    vsnprintf(buf, sizeof(buf), format, args);
+-	    /* XXX vsnprint not 100% portable */
+-	}
++        vsnprintf(buf, sizeof(buf), format, args);
++        /* XXX vsnprint not 100% portable */
+ 
+ 	switch(level) {
+ 	case GW_DEBUG:


More information about the scm-commits mailing list