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