rebuild with libpcre 8.33 [release 1.4.3-2mamba;Wed Jul 24 2013]
This commit is contained in:
parent
a1c737d1f8
commit
fe095dd594
@ -1,2 +1,8 @@
|
|||||||
# kannel
|
# kannel
|
||||||
|
|
||||||
|
Kannel is an open source WAP gateway.
|
||||||
|
It attempts to provide this essential part of the WAP infrastructure freely to everyone so that the market potential for WAP services, both from wireless operators and specialized service providers, will be realized as efficiently as possible.
|
||||||
|
|
||||||
|
Kannel also works as an SMS gateway for GSM networks.
|
||||||
|
Almost all GSM phones can send and receive SMS messages, so this is a way to serve many more clients than just those using a new WAP phone.
|
||||||
|
|
||||||
|
113
kannel-initscript
Normal file
113
kannel-initscript
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# kannel This script takes care of starting and stopping the kannel \
|
||||||
|
# WAP gateway services (bearer/wap/smsbox).
|
||||||
|
#
|
||||||
|
# chkconfig: - 97 03
|
||||||
|
# description: The Kannel WAP and SMS gateway services
|
||||||
|
# config: /etc/kannel.conf
|
||||||
|
#
|
||||||
|
# Modified by Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
|
||||||
|
|
||||||
|
. /etc/sysconfig/rc
|
||||||
|
. $rc_functions
|
||||||
|
|
||||||
|
NAME=kannel
|
||||||
|
KANNEL=/usr/sbin/$NAME
|
||||||
|
KANNEL_CONFIG=/etc/$NAME.conf
|
||||||
|
LOCKFILE=/var/lock/subsys/$NAME
|
||||||
|
|
||||||
|
BEARERBOX=/usr/sbin/bearerbox
|
||||||
|
WAPBOX=/usr/sbin/wapbox
|
||||||
|
SMSBOX=/usr/sbin/smsbox
|
||||||
|
|
||||||
|
# Check that networking is up.
|
||||||
|
[ "${NETWORKING}" = "no" ] && exit 0
|
||||||
|
|
||||||
|
[ -x $KANNEL ] || exit 0
|
||||||
|
[ -r $KANNEL_CONFIG ] || exit 1
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
RETVAL_BEARERBOX=0
|
||||||
|
RETVAL_WAPBOX=0
|
||||||
|
RETVAL_SMSBOX=0
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Starting kannel bearer box: "
|
||||||
|
daemon $KANNEL --start --background --chuid kannel:kannel --exec $BEARERBOX $KANNEL_CONFIG
|
||||||
|
RETVAL_BEARERBOX=$?
|
||||||
|
echo
|
||||||
|
|
||||||
|
# It seems like the bearerbox may need to settle before accepting
|
||||||
|
# connections from wapbox and smsbox
|
||||||
|
sleep 3s
|
||||||
|
|
||||||
|
# Starting wap and sms only makes sense if bearerbox is running
|
||||||
|
if [ $RETVAL_BEARERBOX -eq 0 ]; then
|
||||||
|
if grep "^group = wapbox" $KANNEL_CONFIG &>/dev/null; then
|
||||||
|
echo -n "Starting kannel wap box: "
|
||||||
|
daemon $KANNEL --start --background --chuid kannel:kannel --exec $WAPBOX $KANNEL_CONFIG
|
||||||
|
RETVAL_WAPBOX=$?
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
if grep "^group = smsbox" $KANNEL_CONFIG &>/dev/null; then
|
||||||
|
echo -n "Starting kannel sms box: "
|
||||||
|
daemon $KANNEL --start --background --chuid kannel:kannel --exec $SMSBOX $KANNEL_CONFIG
|
||||||
|
RETVAL_SMSBOX=$?
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
[ $RETVAL_BEARERBOX -eq 0 -a $RETVAL_WAPBOX -eq 0 -a $RETVAL_SMSBOX -eq 0 ] &&
|
||||||
|
touch $LOCKFILE || RETVAL=1
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
if grep "^group = smsbox" $KANNEL_CONFIG &>/dev/null; then
|
||||||
|
echo -n "Shutting down kannel sms box: "
|
||||||
|
killproc $SMSBOX
|
||||||
|
RETVAL_SMSBOX=$?
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
if grep "^group = wapbox" $KANNEL_CONFIG &>/dev/null; then
|
||||||
|
echo -n "Shutting down kannel wap box: "
|
||||||
|
killproc $WAPBOX
|
||||||
|
RETVAL_WAPBOX=$?
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
echo -n "Shutting down kannel bearer box: "
|
||||||
|
killproc /usr/sbin/bearerbox
|
||||||
|
RETVAL_BEARERBOX=$?
|
||||||
|
echo
|
||||||
|
[ $RETVAL_BEARERBOX -eq 0 -a $RETVAL_WAPBOX -eq 0 -a $RETVAL_SMSBOX -eq 0 ] ||
|
||||||
|
RETVAL=1
|
||||||
|
rm -f $LOCKFILE
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status $BEARERBOX
|
||||||
|
RETVAL_BEARERBOX=$?
|
||||||
|
if grep "^group = wapbox" $KANNEL_CONFIG &>/dev/null; then
|
||||||
|
status $WAPBOX
|
||||||
|
RETVAL_WAPBOX=$?
|
||||||
|
fi
|
||||||
|
if grep "^group = smsbox" $KANNEL_CONFIG &>/dev/null; then
|
||||||
|
status $SMSBOX
|
||||||
|
RETVAL_SMSBOX=$?
|
||||||
|
fi
|
||||||
|
[ $RETVAL_BEARERBOX -eq 0 -a $RETVAL_WAPBOX -eq 0 -a $RETVAL_SMSBOX -eq 0 ] ||
|
||||||
|
RETVAL=1
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
condrestart)
|
||||||
|
[ -e $LOCKFILE ] && $0 restart || :
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
||||||
|
RETVAL=1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $RETVAL
|
||||||
|
|
140
kannel.spec
Normal file
140
kannel.spec
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
%define kannel_uid 65041
|
||||||
|
%define kannel_gid 65041
|
||||||
|
|
||||||
|
Name: kannel
|
||||||
|
Version: 1.4.3
|
||||||
|
Release: 2mamba
|
||||||
|
Summary: A compact and very powerful open source WAP and SMS gateway
|
||||||
|
Group: System/Servers
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
|
||||||
|
URL: http://www.kannel.org
|
||||||
|
Source: http://www.kannel.org/download/%{version}/gateway-%{version}.tar.bz2
|
||||||
|
Source1: %{name}-initscript
|
||||||
|
License: BSD
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libmysql5-devel
|
||||||
|
BuildRequires: libopenssl-devel
|
||||||
|
BuildRequires: libpcre-devel
|
||||||
|
BuildRequires: libpostgresql-devel
|
||||||
|
BuildRequires: libsqlite-devel
|
||||||
|
BuildRequires: libxml2-devel
|
||||||
|
BuildRequires: libz-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
BuildRequires: bind-devel
|
||||||
|
BuildRequires: sqlite3-tools
|
||||||
|
Requires(pre): /usr/sbin/groupadd
|
||||||
|
Requires(pre): /usr/sbin/useradd
|
||||||
|
Requires(pre): /sbin/chkconfig
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%description
|
||||||
|
Kannel is an open source WAP gateway.
|
||||||
|
It attempts to provide this essential part of the WAP infrastructure freely to everyone so that the market potential for WAP services, both from wireless operators and specialized service providers, will be realized as efficiently as possible.
|
||||||
|
|
||||||
|
Kannel also works as an SMS gateway for GSM networks.
|
||||||
|
Almost all GSM phones can send and receive SMS messages, so this is a way to serve many more clients than just those using a new WAP phone.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Devel package for %{name}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Kannel is an open source WAP gateway.
|
||||||
|
It attempts to provide this essential part of the WAP infrastructure freely to everyone so that the market potential for WAP services, both from wireless operators and specialized service providers, will be realized as efficiently as possible.
|
||||||
|
|
||||||
|
Kannel also works as an SMS gateway for GSM networks.
|
||||||
|
Almost all GSM phones can send and receive SMS messages, so this is a way to serve many more clients than just those using a new WAP phone.
|
||||||
|
|
||||||
|
This package contains static libraries and header files need for development.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n gateway-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure \
|
||||||
|
--enable-pcre \
|
||||||
|
--disable-docs \
|
||||||
|
--enable-start-stop-daemon \
|
||||||
|
--with-sqlite3 \
|
||||||
|
--with-mysql \
|
||||||
|
--with-pgsql
|
||||||
|
|
||||||
|
%make
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
%makeinstall
|
||||||
|
|
||||||
|
install -D -m 0755 %{S:1} \
|
||||||
|
%{buildroot}%{_initrddir}/%{name}
|
||||||
|
|
||||||
|
install -D -m 0640 debian/%{name}.conf \
|
||||||
|
%{buildroot}%{_sysconfdir}/%{name}.conf
|
||||||
|
sed -i "s/ on Debian//" %{buildroot}%{_sysconfdir}/%{name}.conf
|
||||||
|
|
||||||
|
mv %{buildroot}%{_sbindir}/start-stop-daemon \
|
||||||
|
%{buildroot}%{_sbindir}/%{name}
|
||||||
|
|
||||||
|
install -d %{buildroot}%{_localstatedir}/log/%{name}
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# add Kannel gateway group and user
|
||||||
|
/usr/sbin/groupadd -g %{kannel_gid} %{name} 2>/dev/null
|
||||||
|
/usr/sbin/useradd -u %{kannel_uid} -c 'Kannel WAP and SMS gateway' -m \
|
||||||
|
-d %{_localstatedir}/lib/%{name} -g %{name} -s /bin/false %{name} 2>/dev/null
|
||||||
|
:
|
||||||
|
|
||||||
|
%post
|
||||||
|
/sbin/chkconfig --add %{name}
|
||||||
|
[ $1 -eq 1 ] && service %{name} start
|
||||||
|
:
|
||||||
|
|
||||||
|
%preun
|
||||||
|
# erase
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
service %{name} stop 2>/dev/null
|
||||||
|
/sbin/chkconfig --del %{name}
|
||||||
|
userdel %{name} 2>/dev/null
|
||||||
|
fi
|
||||||
|
:
|
||||||
|
|
||||||
|
%postun
|
||||||
|
if [ $1 -ge 1 ]; then
|
||||||
|
service %{name} condrestart 2>/dev/null
|
||||||
|
fi
|
||||||
|
:
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_sbindir}/*
|
||||||
|
%{_bindir}/*
|
||||||
|
%{_initrddir}/%{name}
|
||||||
|
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||||
|
%{_mandir}/man?/*
|
||||||
|
%dir %{_localstatedir}/log/%{name}
|
||||||
|
%doc AUTHORS COPYING ChangeLog LICENSE NEWS README
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_includedir}/%{name}
|
||||||
|
%{_libdir}/%{name}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jul 24 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.3-2mamba
|
||||||
|
- rebuild with libpcre 8.33
|
||||||
|
|
||||||
|
* Fri Feb 05 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.3-1mamba
|
||||||
|
- update to 1.4.3
|
||||||
|
|
||||||
|
* Fri Mar 13 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.1-2mamba
|
||||||
|
- automatic rebuild by autodist
|
||||||
|
|
||||||
|
* Fri May 11 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 1.4.1-1mamba
|
||||||
|
- package created by autospec
|
Loading…
Reference in New Issue
Block a user