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 Patch0: %{name}-alpha.patch
24 URL: http://www.kannel.org/
25 BuildRequires: ImageMagick
26 BuildRequires: libxml2-devel
27 %{?_with_docs:BuildRequires: openjade}
28 # requires multithread enabled openssl (?)
29 %{?_with_openssl:BuildRequires: openssl-devel}
30 %{!?_without_mysql:BuildRequires: mysql-devel}
31 BuildRequires: zlib-devel
32 Requires(post,preun): /sbin/chkconfig
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Kannel is an Open Source SMS/WAP gateway. WAP is short for Wireless
37 Application Protocol. It lets the phone act as a simple hypertext
38 browser, but optimizes the markup language, scripting language, and
39 the transmission protocols for wirelessuse. The optimized protocols
40 are translated to normal Internet protocols by a WAP gateway. Kannel
41 also works as a SMS gateway for GSM networks. Almost all GSM phones
42 can send and receive SMS messages, so this is a way to serve many more
43 clients than just those using WAP phones.
46 Kannel jest bramk± SMS/WAP Open Source. WAP pozwala u¿ywaæ telefonów
47 jako prostych przegl±darek hipertekstowych, ale korzysta ze
48 zoptymalizowanych protoko³ów transmisji. Bramka WAP t³umaczy je na
49 protoko³y internetowe. Kannel dzia³a równie¿ jako bramka SMS dla sieci
50 GSM. Prawie wszystkie telefony GSM mog± odbieraæ i wysy³aæ wiadomo¶ci
51 SMS, wiêc pozwala to na obs³ugê wiêkszej liczby klientów.
54 %setup -q -n gateway-%{version}
59 --with-malloc-native \
61 --%{!?_without_mysql:en}%{?_without_mysql:dis}able-mysql \
62 %{?_with_openssl: --with-wtls=openssl --with-ssl=%{_prefix} --en}%{!?_with_openssl: --dis}able-ssl \
63 --%{!?_with_docs:dis}%{?_with_docs:en}able-docs
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}
72 install -d $RPM_BUILD_ROOT%{_mandir}/man{1,8}
73 #install -d $RPM_BUILD_ROOT/home/httpd/html
75 #install mini_httpd $RPM_BUILD_ROOT%{_sbindir}
76 #install htpasswd $RPM_BUILD_ROOT%{_bindir}/mini-htpasswd
77 #install *.1 $RPM_BUILD_ROOT%{_mandir}/man1
78 #install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
80 # install index.html $RPM_BUILD_ROOT/home/httpd/html
81 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
82 install -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
83 install -D %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kannel/%{name}.conf
86 DESTDIR=$RPM_BUILD_ROOT
88 install gw/smskannel.conf $RPM_BUILD_ROOT%{_sysconfdir}/kannel/smskannel.conf
89 install test/fakesmsc $RPM_BUILD_ROOT%{_bindir}
90 install test/fakewap $RPM_BUILD_ROOT%{_bindir}
93 rm -rf $RPM_BUILD_ROOT
96 if [ "$1" = "1" ]; then
97 /sbin/chkconfig --add %{name}
98 echo "Run \"/etc/rc.d/init.d/kannel start\" to start kannel." >&2
100 if [ -f /var/lock/subsys/kannel ]; then
101 /etc/rc.d/init.d/kannel restart >&2
107 if [ "$1" = "0" ]; then
108 if [ -f /var/lock/subsys/kannel ]; then
109 /etc/rc.d/init.d/kannel stop >&2
111 /sbin/chkconfig --del kannel
115 %defattr(644,root,root,755)
116 %doc README COPYING NEWS VERSION STATUS doc/{dialup.txt,dlr-mysql.conf,kannel.conf,modems.conf}
117 %attr(755,root,root) %{_bindir}/*
118 %attr(755,root,root) %{_sbindir}/*
119 #/home/httpd/html/index.html
120 %attr(754,root,root) /etc/rc.d/init.d/%{name}
123 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/%{name}
124 %dir %{_sysconfdir}/kannel
125 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/kannel/kannel.conf
126 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/kannel/smskannel.conf