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 %{?_with_docs:BuildRequires: openjade}
27 # requires multithread enabled openssl (?)
28 %{?_with_openssl:BuildRequires: openssl-devel}
29 %{!?_without_mysql:BuildRequires: mysql-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}}
70 install -d $RPM_BUILD_ROOT%{_mandir}/man{1,8}
71 #install -d $RPM_BUILD_ROOT/home/httpd/html
73 #install mini_httpd $RPM_BUILD_ROOT%{_sbindir}
74 #install htpasswd $RPM_BUILD_ROOT%{_bindir}/mini-htpasswd
75 #install *.1 $RPM_BUILD_ROOT%{_mandir}/man1
76 #install *.8 $RPM_BUILD_ROOT%{_mandir}/man8
78 # install index.html $RPM_BUILD_ROOT/home/httpd/html
79 install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
80 install -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
81 install -D %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kannel/%{name}.conf
84 DESTDIR=$RPM_BUILD_ROOT
86 install gw/smskannel.conf $RPM_BUILD_ROOT%{_sysconfdir}/kannel/smskannel.conf
87 install test/fakesmsc $RPM_BUILD_ROOT%{_bindir}
88 install test/fakewap $RPM_BUILD_ROOT%{_bindir}
91 rm -rf $RPM_BUILD_ROOT
94 if [ "$1" = "1" ]; then
95 /sbin/chkconfig --add %{name}
96 echo "Run \"/etc/rc.d/init.d/kannel start\" to start kannel." >&2
98 if [ -f /var/lock/subsys/kannel ]; then
99 /etc/rc.d/init.d/kannel restart >&2
105 if [ "$1" = "0" ]; then
106 if [ -f /var/lock/subsys/kannel ]; then
107 /etc/rc.d/init.d/kannel stop >&2
109 /sbin/chkconfig --del kannel
113 %defattr(644,root,root,755)
114 %doc README COPYING NEWS VERSION STATUS doc/{dialup.txt,dlr-mysql.conf,kannel.conf,modems.conf}
115 %attr(755,root,root) %{_bindir}/*
116 %attr(755,root,root) %{_sbindir}/*
117 #/home/httpd/html/index.html
118 %attr(754,root,root) /etc/rc.d/init.d/%{name}
121 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/%{name}
122 %dir %{_sysconfdir}/kannel
123 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/kannel/kannel.conf
124 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/kannel/smskannel.conf