kannel/kannel.spec

141 lines
4.1 KiB
RPMSpec
Raw Permalink Normal View History

%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