Currently the current kannel version in epel is 1.4.3 /which according to kannel.org is the latest stable release/. However if you want to use sqlbox and smppbox, the only option is to use svn. So I decided to build my custom kannel rpm by using the source tarball from the daily svn snapshot. My kannel.spec is based on the file from the epel rpm for 1.4.3 version. The changes are minimal:
--- kannel.epel.spec 2011-10-28 16:29:01.000000000 +0300 +++ kannel.spec 2011-10-28 16:31:48.000000000 +0300 @@ -1,18 +1,18 @@ Summary: WAP and SMS gateway Name: kannel -Version: 1.4.3 -Release: 5%{?dist} +Version: 1.5.0 +Release: 20111028%{?dist} License: BSD Group: System Environment/Daemons URL: http://www.kannel.org/ -Source0: http://www.kannel.org/download/%{version}/gateway-%{version}.tar.bz2 +Source0: http://www.kannel.org/download/kannel-snapshot.tar.gz Source1: kannel.logrotate Source2: kannel.init Source3: kannel.conf Source4: gw-config # TODO: a corresponding configure.in patch could be upstreamable? -Patch0: gateway-1.4.3-ssldetect.patch -Patch1: gateway-1.4.1-typesh.patch +#Patch0: gateway-1.4.3-ssldetect.patch +#Patch1: gateway-1.4.1-typesh.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: bison, byacc, flex, ghostscript BuildRequires: libxml2-devel, openssl-devel, zlib-devel, pcre-devel @@ -69,9 +69,9 @@ %prep -%setup -q -n gateway-%{version} -%patch0 -p1 -b .ssldetect -%patch1 -p1 -b .typesh +%setup -q -n kannel-snapshot +#%patch0 -p1 -b .ssldetect +#%patch1 -p1 -b .typesh %{__chmod} -c -x gwlib/html-entities.def # for -debuginfo, as of 1.4.3 @@ -147,6 +147,7 @@ %{_bindir}/seewbmp %{_bindir}/wmlsc %{_bindir}/wmlsdasm +%{_bindir}/decode_emimsg %{_sbindir}/* %{_mandir}/man?/* %attr(0750,kannel,kannel) %dir %{_var}/log/kannel/ @@ -164,6 +165,9 @@
I assumed that the two patches applied to version 1.4.3 are not necessary, because they probably are part of the svn code.
There was a build error on the first run:
RPM build errors: Installed (but unpackaged) file(s) found: /usr/bin/decode_emimsg
so I had to add „%{_bindir}/decode_emimsg“ in the %files section.
The spec file expect the availability of the following files in the SOURCE directory: kannel.logrotate, kannel.init, kannel.conf, gw-config
The kannel.spec file can be found here.
The command used to build the rpm is:
rpmbuild -ba kannel.specAnother way to do the trick:
http://www.blogalex.com/archives/23
FINALLY :)