]> git.pld-linux.org Git - packages/kannel.git/blob - kannel.spec
81bc76a62beb7d2d078b049e967f4668774dc3d6
[packages/kannel.git] / kannel.spec
1 # TODO:
2 # - check file list when built with docs
3 #
4 # Conditional build:
5 %bcond_with     doc             # build documentation
6 %bcond_without  openssl         # link against openssl (requires multithreaded libs)
7 %bcond_without  mysql           # don't link against mysql
8 #
9 Summary:        SMS/WAP gateway
10 Summary(pl.UTF-8):      Bramka WAP oraz SMS
11 Name:           kannel
12 Version:        1.4.5
13 Release:        0.1
14 License:        BSD-like (see COPYING)
15 Group:          Networking/Daemons
16 Source0:        http://www.kannel.org/download/%{version}/gateway-%{version}.tar.gz
17 # Source0-md5:  b6b5b48edb646e0e0e2ea5378c8ac9ff
18 Source1:        %{name}.init
19 Source2:        %{name}.sysconfig
20 Source3:        %{name}.conf
21 Patch0:         %{name}-bison.patch
22 Patch1:         %{name}-openssl-1.1.0.patch
23 URL:            http://www.kannel.org/
24 BuildRequires:  ImageMagick
25 BuildRequires:  autoconf
26 BuildRequires:  automake
27 BuildRequires:  libxml2-devel
28 BuildRequires:  pcre-devel
29 BuildRequires:  pam-devel
30 %{?with_mysql:BuildRequires:    mysql-devel}
31 %if %{with doc}
32 BuildRequires:  openjade
33 BuildRequires:  texlive-latex
34 BuildRequires:  texlive-latex-ams
35 BuildRequires:  texlive-latex-extend
36 %endif
37 # requires multithread enabled openssl (?)
38 %{?with_openssl:BuildRequires:  openssl-devel >= 0.9.7d}
39 BuildRequires:  zlib-devel
40 Requires(post,preun):   /sbin/chkconfig
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
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.
52
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.
60
61 %package devel
62 Summary:        Header files for %{name} library
63 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki %{name}
64 Group:          Development/Libraries
65 Requires:       %{name} = %{version}-%{release}
66
67 %description devel
68 Header files for %{name} library.
69
70 %description devel -l pl.UTF-8
71 Pliki nagłówkowe biblioteki %{name}.
72
73 %package static
74 Summary:        Static %{name} library
75 Summary(pl.UTF-8):      Statyczna biblioteka %{name}
76 Group:          Development/Libraries
77 Requires:       %{name}-devel = %{version}-%{release}
78
79 %description static
80 Static %{name} library.
81
82 %description static -l pl.UTF-8
83 Statyczna biblioteka %{name}.
84
85 %prep
86 %setup -q -n gateway-%{version}
87 %patch0 -p1
88 %patch1 -p1
89
90 %build
91 cp -f /usr/share/automake/config.sub .
92 %{__autoconf}
93 %configure \
94         CFLAGS="%{rpmcppflags} %{rpmcflags}" \
95         --with-malloc=native \
96         --enable-cookies \
97         --enable-pcre \
98         --enable-pam \
99         --with%{!?with_mysql:out}-mysql \
100         %{?with_openssl: --with-wtls=openssl --with-ssl=%{_prefix} --en}%{!?with_openssl: --dis}able-ssl \
101         --%{!?with_doc:dis}%{?with_doc:en}able-docs
102
103 touch .depend
104 %{__make} depend
105 %{__make}
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man{1,8}}
110
111 %{__make} install \
112         DESTDIR=$RPM_BUILD_ROOT
113
114 install -D %{SOURCE1}   $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
115 install -D %{SOURCE2}   $RPM_BUILD_ROOT/etc/sysconfig/%{name}
116 install -D %{SOURCE3}   $RPM_BUILD_ROOT%{_sysconfdir}/kannel/%{name}.conf
117 install gw/smskannel.conf $RPM_BUILD_ROOT%{_sysconfdir}/kannel/smskannel.conf
118 install test/fakesmsc $RPM_BUILD_ROOT%{_bindir}
119 install test/fakewap $RPM_BUILD_ROOT%{_bindir}
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %post
125 if [ "$1" = "1" ]; then
126         /sbin/chkconfig --add %{name}
127         echo "Run \"/etc/rc.d/init.d/kannel start\" to start kannel." >&2
128 else
129         if [ -f /var/lock/subsys/kannel ]; then
130                 /etc/rc.d/init.d/kannel restart >&2
131         fi
132 fi
133
134
135 %preun
136 if [ "$1" = "0" ]; then
137         if [ -f /var/lock/subsys/kannel ]; then
138                 /etc/rc.d/init.d/kannel stop >&2
139         fi
140         /sbin/chkconfig --del kannel
141 fi
142
143 %files
144 %defattr(644,root,root,755)
145 %doc LICENSE README COPYING NEWS VERSION STATUS doc/{*.txt,examples/*.conf}
146 %doc doc/ChangeLog*
147 %attr(755,root,root) %{_bindir}/*
148 %attr(755,root,root) %{_sbindir}/*
149 %attr(754,root,root) /etc/rc.d/init.d/%{name}
150 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
151 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kannel/kannel.conf
152 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/kannel/smskannel.conf
153 %dir %{_sysconfdir}/kannel
154 %{_mandir}/man*/*
155
156 %files devel
157 %defattr(644,root,root,755)
158 %{_includedir}/%{name}
159
160 %files static
161 %defattr(644,root,root,755)
162 %{_libdir}/%{name}
This page took 0.084033 seconds and 2 git commands to generate.