kannel/kannel.spec

132 lines
4.0 KiB
RPMSpec
Raw Permalink Normal View History

%define kannel_uid 65041
%define kannel_gid 65041
Name: kannel
Version: 1.4.5
Release: 1mamba
Summary: A compact and very powerful open source WAP and SMS gateway
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.kannel.org/
Source: http://www.kannel.org/download/%{version}/gateway-%{version}.tar.bz2
Source1: %{name}-initscript
Patch0: gateway-1.4.5-fix-build.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: liblzma-devel
BuildRequires: libmariadb-devel
BuildRequires: libnsl-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
%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 needed for development.
%debug_package
%prep
%setup -q -n gateway-%{version}
%patch0 -p1
%build
%configure \
--enable-pcre \
--disable-docs \
--with-sqlite3 \
--with-mysql \
--with-pgsql \
CFLAGS="%{optflags} -fcommon"
%make -j1
%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
:
%preun
# erase
if [ $1 -eq 0 ]; then
userdel %{name} 2>/dev/null
fi
:
%files
%defattr(-,root,root)
%{_sbindir}/*
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_mandir}/man?/*
%dir %{_localstatedir}/log/%{name}
%doc AUTHORS COPYING
%files devel
%defattr(-,root,root)
%{_includedir}/%{name}
%{_libdir}/%{name}
%doc ChangeLog LICENSE NEWS README
%changelog
* Wed Jun 23 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4.5-1mamba
- update to 1.4.5
* 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