]>
Commit | Line | Data |
---|---|---|
9468b827 | 1 | # TODO: |
2 | # - upgrade to 1.2.2 | |
3 | # - check file list when built with docs | |
8961ecde | 4 | # |
5 | # Conditional build: | |
6 | %bcond_with doc # build documentation | |
7 | %bcond_with openssl # link against openssl (requires multithreaded libs) | |
8 | %bcond_without mysql # don't link against mysql | |
9 | # | |
9468b827 | 10 | Summary: SMS/WAP gateway |
2375cc07 | 11 | Summary(pl.UTF-8): Bramka WAP oraz SMS |
51a540df AM |
12 | Name: kannel |
13 | Version: 1.2.0 | |
a86e4fb6 | 14 | Release: 9 |
e4b5efdb | 15 | License: BSD-like (see COPYING) |
51a540df | 16 | Group: Networking/Daemons |
9468b827 | 17 | Source0: http://www.kannel.org/download/%{version}/gateway-%{version}.tar.gz |
ca4c70af | 18 | # Source0-md5: 963502f15909ff3e53f5f7b2d8bdb218 |
51a540df | 19 | Source1: %{name}.init |
9468b827 | 20 | Source2: %{name}.sysconfig |
21 | Source3: %{name}.conf | |
40c9dbce JB |
22 | Patch0: %{name}-types.patch |
23 | Patch1: %{name}-nolibs.patch | |
27eb402a | 24 | URL: http://www.kannel.org/ |
51a540df | 25 | BuildRequires: ImageMagick |
40c9dbce | 26 | BuildRequires: autoconf |
38a92f05 | 27 | BuildRequires: automake |
741694c7 | 28 | BuildRequires: libxml2-devel |
8961ecde | 29 | %{?with_mysql:BuildRequires: mysql-devel} |
30 | %{?with_doc:BuildRequires: openjade} | |
9468b827 | 31 | # requires multithread enabled openssl (?) |
a24f3c69 | 32 | %{?with_openssl:BuildRequires: openssl-devel >= 0.9.7d} |
9468b827 | 33 | BuildRequires: zlib-devel |
27eb402a | 34 | Requires(post,preun): /sbin/chkconfig |
51a540df AM |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
fb10c3c2 | 38 | Kannel is an Open Source SMS/WAP gateway. WAP is short for Wireless |
39 | Application Protocol. It lets the phone act as a simple hypertext | |
40 | browser, but optimizes the markup language, scripting language, and | |
41 | the transmission protocols for wirelessuse. The optimized protocols | |
42 | are translated to normal Internet protocols by a WAP gateway. Kannel | |
43 | also works as a SMS gateway for GSM networks. Almost all GSM phones | |
44 | can send and receive SMS messages, so this is a way to serve many more | |
45 | clients than just those using WAP phones. | |
51a540df | 46 | |
7a220c34 JR |
47 | %description -l pl.UTF-8 |
48 | Kannel jest bramką SMS/WAP Open Source. WAP pozwala używać telefonów | |
49 | jako prostych przeglądarek hipertekstowych, ale korzysta ze | |
50 | zoptymalizowanych protokołów transmisji. Bramka WAP tłumaczy je na | |
51 | protokoły internetowe. Kannel działa również jako bramka SMS dla sieci | |
52 | GSM. Prawie wszystkie telefony GSM mogą odbierać i wysyłać wiadomości | |
53 | SMS, więc pozwala to na obsługę większej liczby klientów. | |
51a540df AM |
54 | |
55 | %prep | |
56 | %setup -q -n gateway-%{version} | |
40c9dbce JB |
57 | %patch0 -p1 |
58 | %patch1 -p1 | |
51a540df AM |
59 | |
60 | %build | |
741694c7 | 61 | cp -f /usr/share/automake/config.sub . |
40c9dbce JB |
62 | %{__autoconf} |
63 | %configure \ | |
9468b827 | 64 | --with-malloc-native \ |
51a540df | 65 | --enable-cookies \ |
8961ecde | 66 | --%{?with_mysql:en}%{!?with_mysql:dis}able-mysql \ |
67 | %{?with_openssl: --with-wtls=openssl --with-ssl=%{_prefix} --en}%{!?with_openssl: --dis}able-ssl \ | |
68 | --%{!?with_doc:dis}%{?with_doc:en}able-docs | |
51a540df AM |
69 | |
70 | touch .depend | |
71 | %{__make} depend | |
72 | %{__make} | |
73 | ||
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
7fa4f974 | 76 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man{1,8}} |
9468b827 | 77 | |
7fa4f974 PG |
78 | %{__make} install \ |
79 | DESTDIR=$RPM_BUILD_ROOT | |
51a540df | 80 | |
33dcd0a2 | 81 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
82 | install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
e9f73c49 | 83 | install -D %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kannel/%{name}.conf |
9468b827 | 84 | install gw/smskannel.conf $RPM_BUILD_ROOT%{_sysconfdir}/kannel/smskannel.conf |
85 | install test/fakesmsc $RPM_BUILD_ROOT%{_bindir} | |
86 | install test/fakewap $RPM_BUILD_ROOT%{_bindir} | |
51a540df AM |
87 | |
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %post | |
2e3a0733 | 92 | if [ "$1" = "1" ]; then |
93 | /sbin/chkconfig --add %{name} | |
94 | echo "Run \"/etc/rc.d/init.d/kannel start\" to start kannel." >&2 | |
95 | else | |
96 | if [ -f /var/lock/subsys/kannel ]; then | |
97 | /etc/rc.d/init.d/kannel restart >&2 | |
98 | fi | |
99 | fi | |
100 | ||
51a540df AM |
101 | |
102 | %preun | |
103 | if [ "$1" = "0" ]; then | |
e9f73c49 | 104 | if [ -f /var/lock/subsys/kannel ]; then |
105 | /etc/rc.d/init.d/kannel stop >&2 | |
106 | fi | |
107 | /sbin/chkconfig --del kannel | |
51a540df AM |
108 | fi |
109 | ||
110 | %files | |
111 | %defattr(644,root,root,755) | |
9468b827 | 112 | %doc README COPYING NEWS VERSION STATUS doc/{dialup.txt,dlr-mysql.conf,kannel.conf,modems.conf} |
51a540df AM |
113 | %attr(755,root,root) %{_bindir}/* |
114 | %attr(755,root,root) %{_sbindir}/* | |
e4b5efdb | 115 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
38a92f05 ER |
116 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
117 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kannel/kannel.conf | |
118 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kannel/smskannel.conf | |
7fa4f974 PG |
119 | %dir %{_sysconfdir}/kannel |
120 | %{_mandir}/man*/* |