]>
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 |
696776f7 | 12 | Version: 1.4.5 |
78014488 | 13 | Release: 2.1 |
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 |
696776f7 | 17 | # Source0-md5: b6b5b48edb646e0e0e2ea5378c8ac9ff |
51a540df | 18 | Source1: %{name}.init |
9468b827 | 19 | Source2: %{name}.sysconfig |
20 | Source3: %{name}.conf | |
696776f7 | 21 | Patch0: %{name}-bison.patch |
6a1435a6 | 22 | Patch1: %{name}-openssl-1.1.0.patch |
7911885d | 23 | Patch2: %{name}-parallel-build.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} |
3eca4687 AG |
30 | BuildRequires: pam-devel |
31 | BuildRequires: pcre-devel | |
8bc7020a AM |
32 | %if %{with doc} |
33 | BuildRequires: openjade | |
34 | BuildRequires: texlive-latex | |
35 | BuildRequires: texlive-latex-ams | |
36 | BuildRequires: texlive-latex-extend | |
37 | %endif | |
9468b827 | 38 | # requires multithread enabled openssl (?) |
a24f3c69 | 39 | %{?with_openssl:BuildRequires: openssl-devel >= 0.9.7d} |
9468b827 | 40 | BuildRequires: zlib-devel |
27eb402a | 41 | Requires(post,preun): /sbin/chkconfig |
51a540df AM |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
44 | %description | |
fb10c3c2 | 45 | Kannel is an Open Source SMS/WAP gateway. WAP is short for Wireless |
46 | Application Protocol. It lets the phone act as a simple hypertext | |
47 | browser, but optimizes the markup language, scripting language, and | |
48 | the transmission protocols for wirelessuse. The optimized protocols | |
49 | are translated to normal Internet protocols by a WAP gateway. Kannel | |
50 | also works as a SMS gateway for GSM networks. Almost all GSM phones | |
51 | can send and receive SMS messages, so this is a way to serve many more | |
52 | clients than just those using WAP phones. | |
51a540df | 53 | |
7a220c34 JR |
54 | %description -l pl.UTF-8 |
55 | Kannel jest bramką SMS/WAP Open Source. WAP pozwala używać telefonów | |
56 | jako prostych przeglądarek hipertekstowych, ale korzysta ze | |
57 | zoptymalizowanych protokołów transmisji. Bramka WAP tłumaczy je na | |
58 | protokoły internetowe. Kannel działa również jako bramka SMS dla sieci | |
59 | GSM. Prawie wszystkie telefony GSM mogą odbierać i wysyłać wiadomości | |
60 | SMS, więc pozwala to na obsługę większej liczby klientów. | |
51a540df | 61 | |
518da49f AG |
62 | %package devel |
63 | Summary: Header files for %{name} library | |
64 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
65 | Group: Development/Libraries | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | ||
68 | %description devel | |
69 | Header files for %{name} library. | |
70 | ||
71 | %description devel -l pl.UTF-8 | |
72 | Pliki nagłówkowe biblioteki %{name}. | |
73 | ||
74 | %package static | |
75 | Summary: Static %{name} library | |
76 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
77 | Group: Development/Libraries | |
78 | Requires: %{name}-devel = %{version}-%{release} | |
79 | ||
80 | %description static | |
81 | Static %{name} library. | |
82 | ||
83 | %description static -l pl.UTF-8 | |
84 | Statyczna biblioteka %{name}. | |
85 | ||
51a540df AM |
86 | %prep |
87 | %setup -q -n gateway-%{version} | |
40c9dbce | 88 | %patch0 -p1 |
6a1435a6 | 89 | %patch1 -p1 |
7911885d | 90 | %patch2 -p1 |
51a540df AM |
91 | |
92 | %build | |
741694c7 | 93 | cp -f /usr/share/automake/config.sub . |
40c9dbce JB |
94 | %{__autoconf} |
95 | %configure \ | |
8bc7020a AM |
96 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ |
97 | --with-malloc=native \ | |
51a540df | 98 | --enable-cookies \ |
8bc7020a AM |
99 | --enable-pcre \ |
100 | --enable-pam \ | |
101 | --with%{!?with_mysql:out}-mysql \ | |
8961ecde | 102 | %{?with_openssl: --with-wtls=openssl --with-ssl=%{_prefix} --en}%{!?with_openssl: --dis}able-ssl \ |
103 | --%{!?with_doc:dis}%{?with_doc:en}able-docs | |
51a540df AM |
104 | |
105 | touch .depend | |
106 | %{__make} depend | |
107 | %{__make} | |
108 | ||
109 | %install | |
110 | rm -rf $RPM_BUILD_ROOT | |
7fa4f974 | 111 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man{1,8}} |
9468b827 | 112 | |
7fa4f974 PG |
113 | %{__make} install \ |
114 | DESTDIR=$RPM_BUILD_ROOT | |
51a540df | 115 | |
33dcd0a2 | 116 | install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
117 | install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
e9f73c49 | 118 | install -D %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kannel/%{name}.conf |
3eca4687 AG |
119 | cp -p gw/smskannel.conf $RPM_BUILD_ROOT%{_sysconfdir}/kannel/smskannel.conf |
120 | cp -p test/fakesmsc $RPM_BUILD_ROOT%{_bindir} | |
121 | cp -p test/fakewap $RPM_BUILD_ROOT%{_bindir} | |
51a540df AM |
122 | |
123 | %clean | |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
126 | %post | |
2e3a0733 | 127 | if [ "$1" = "1" ]; then |
128 | /sbin/chkconfig --add %{name} | |
129 | echo "Run \"/etc/rc.d/init.d/kannel start\" to start kannel." >&2 | |
130 | else | |
131 | if [ -f /var/lock/subsys/kannel ]; then | |
132 | /etc/rc.d/init.d/kannel restart >&2 | |
133 | fi | |
134 | fi | |
135 | ||
51a540df AM |
136 | |
137 | %preun | |
138 | if [ "$1" = "0" ]; then | |
e9f73c49 | 139 | if [ -f /var/lock/subsys/kannel ]; then |
140 | /etc/rc.d/init.d/kannel stop >&2 | |
141 | fi | |
142 | /sbin/chkconfig --del kannel | |
51a540df AM |
143 | fi |
144 | ||
145 | %files | |
146 | %defattr(644,root,root,755) | |
8bc7020a AM |
147 | %doc LICENSE README COPYING NEWS VERSION STATUS doc/{*.txt,examples/*.conf} |
148 | %doc doc/ChangeLog* | |
51a540df AM |
149 | %attr(755,root,root) %{_bindir}/* |
150 | %attr(755,root,root) %{_sbindir}/* | |
e4b5efdb | 151 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
38a92f05 ER |
152 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
153 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kannel/kannel.conf | |
154 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kannel/smskannel.conf | |
7fa4f974 PG |
155 | %dir %{_sysconfdir}/kannel |
156 | %{_mandir}/man*/* | |
518da49f AG |
157 | |
158 | %files devel | |
159 | %defattr(644,root,root,755) | |
160 | %{_includedir}/%{name} | |
161 | ||
162 | %files static | |
163 | %defattr(644,root,root,755) | |
164 | %{_libdir}/%{name} |