3 # _with_docs - build documentation
4 # _with_openssl - link against openssl (requires multithreaded libs)
5 # _without_mysql - don't link against mysql
9 # - check file list when built with docs
11 Summary: SMS/WAP gateway
12 Summary(pl): Bramka WAP oraz SMS
16 License: BSD-like (see COPYING)
17 Group: Networking/Daemons
18 Source0: http://www.kannel.org/download/%{version}/gateway-%{version}.tar.gz
19 # Source0-md5: 963502f15909ff3e53f5f7b2d8bdb218
21 Source2: %{name}.sysconfig
23 URL: http://www.kannel.org/
24 BuildRequires: ImageMagick
25 BuildRequires: libxml2-devel
26 %{!?_without_mysql:BuildRequires: mysql-devel}
27 %{?_with_docs:BuildRequires: openjade}
28 # requires multithread enabled openssl (?)
29 %{?_with_openssl:BuildRequires: openssl-devel}
30 BuildRequires: zlib-devel
31 Requires(post,preun): /sbin/chkconfig
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Kannel is an Open Source SMS/WAP gateway. WAP is short for Wireless
36 Application Protocol. It lets the phone act as a simple hypertext
37 browser, but optimizes the markup language, scripting language, and
38 the transmission protocols for wirelessuse. The optimized protocols
39 are translated to normal Internet protocols by a WAP gateway. Kannel
40 also works as a SMS gateway for GSM networks. Almost all GSM phones
41 can send and receive SMS messages, so this is a way to serve many more
42 clients than just those using WAP phones.
45 Kannel jest bramk± SMS/WAP Open Source. WAP pozwala u¿ywaæ telefonów
46 jako prostych przegl±darek hipertekstowych, ale korzysta ze
47 zoptymalizowanych protoko³ów transmisji. Bramka WAP t³umaczy je na
48 protoko³y internetowe. Kannel dzia³a równie¿ jako bramka SMS dla sieci
49 GSM. Prawie wszystkie telefony GSM mog± odbieraæ i wysy³aæ wiadomo¶ci
50 SMS, wiêc pozwala to na obs³ugê wiêkszej liczby klientów.
53 %setup -q -n gateway-%{version}
57 --with-malloc-native \
59 --%{!?_without_mysql:en}%{?_without_mysql:dis}able-mysql \
60 %{?_with_openssl: --with-wtls=openssl --with-ssl=%{_prefix} --en}%{!?_with_openssl: --dis}able-ssl \
61 --%{!?_with_docs:dis}%{?_with_docs:en}able-docs
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man{1,8}}
72 DESTDIR=$RPM_BUILD_ROOT
74 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
75 install -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
76 install -D %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kannel/%{name}.conf
77 install gw/smskannel.conf $RPM_BUILD_ROOT%{_sysconfdir}/kannel/smskannel.conf
78 install test/fakesmsc $RPM_BUILD_ROOT%{_bindir}
79 install test/fakewap $RPM_BUILD_ROOT%{_bindir}
82 rm -rf $RPM_BUILD_ROOT
85 if [ "$1" = "1" ]; then
86 /sbin/chkconfig --add %{name}
87 echo "Run \"/etc/rc.d/init.d/kannel start\" to start kannel." >&2
89 if [ -f /var/lock/subsys/kannel ]; then
90 /etc/rc.d/init.d/kannel restart >&2
96 if [ "$1" = "0" ]; then
97 if [ -f /var/lock/subsys/kannel ]; then
98 /etc/rc.d/init.d/kannel stop >&2
100 /sbin/chkconfig --del kannel
104 %defattr(644,root,root,755)
105 %doc README COPYING NEWS VERSION STATUS doc/{dialup.txt,dlr-mysql.conf,kannel.conf,modems.conf}
106 %attr(755,root,root) %{_bindir}/*
107 %attr(755,root,root) %{_sbindir}/*
108 %attr(754,root,root) /etc/rc.d/init.d/%{name}
109 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/%{name}
110 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/kannel/kannel.conf
111 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/kannel/smskannel.conf
112 %dir %{_sysconfdir}/kannel