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