4 # - run from user jabber script or patch,
5 # - working init script,
7 %include /usr/lib/rpm/macros.perl
8 Summary: Jabber server component agent for sending SMS messages
9 Summary(pl): Komponent serwera Jabbera do wysy³ania wiadomo¶ci SMS
14 Group: Applications/Communications
15 Source0: http://www.apatsch.wroc.biz/asa/%{name}-%{version}.tar.gz
16 # Source0-md5: e2bdce7a80a758fa02aff2cdc39c66b1
17 Source1: jabber-asa-transport.init
18 Patch0: %{name}-PLD.patch
19 Patch1: %{name}-lib64.patch
20 URL: http://www.apatsch.wroc.biz/asa/
21 BuildRequires: rpm-perlprov
22 Requires(pre): jabber-common
23 Requires(post,preun): /sbin/chkconfig
24 Requires(post): /usr/bin/perl
25 Requires: jabberd >= 1.4
27 Requires: perl-Unicode-Lite
28 Requires: perl-Crypt-SSLeay
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 ApaSMSAgent - Jabber server component agent for sending
34 SMS messages to cellular networks. Targetted at polish users,
35 but can be adopted for international use, because of it's
36 plugin-based architecture.
39 ApaSMSAgent - komponent serwera Jabbera umo¿liwiaj±cy wysy³anie
40 wiadomo¶ci SMS do sieci komórkowych. Aktualnie obs³uguje g³ównie
41 polskie sieci, ale z ³atwo¶ci± mo¿e zostaæ rozszerzony o inne dziêki
42 modularnej budowie opartej na wtyczkach.
47 %if "%{_lib}" == "lib64"
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,%{_sbindir},/etc/rc.d/init.d,/var/lib/jabber/asa/storage,%{_libdir}/jabber/asa/plugins}
55 install config.xml $RPM_BUILD_ROOT%{_sysconfdir}/jabber/asa.xml
56 install ApaSMSAgent.pl $RPM_BUILD_ROOT%{_sbindir}
57 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/jabber-asa-transport
58 install plugins/*.pl $RPM_BUILD_ROOT/%{_libdir}/jabber/asa/plugins/
61 rm -rf $RPM_BUILD_ROOT
64 if [ -f /etc/jabber/secret ] ; then
65 SECRET=`cat /etc/jabber/secret`
66 if [ -n "$SECRET" ] ; then
67 echo "Updating component authentication secret in asa.xml..."
68 perl -pi -e "s/>secret</>$SECRET</" /etc/jabber/asa.xml
71 /sbin/chkconfig --add jabber-asa-transport
72 if [ -r /var/lock/subsys/jabber-asa-transport ]; then
73 /etc/rc.d/init.d/jabber-asa-transport restart >&2
75 echo "Run \"/etc/rc.d/init.d/jabber-asa-transport start\" to start Jabber ASA transport."
79 if [ "$1" = "0" ]; then
80 if [ -r /var/lock/subsys/jabber-asa-transport ]; then
81 /etc/rc.d/init.d/jabber-asa-transport stop >&2
83 /sbin/chkconfig --del jabber-asa-transport
87 %defattr(644,root,root,755)
88 %doc ChangeLog AUTHORS README
89 %attr(755,root,root) %{_sbindir}/*
90 %attr(640,root,jabber) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/jabber/asa.xml
91 %attr(754,root,root) /etc/rc.d/init.d/jabber-asa-transport
92 %attr(770,root,jabber) /var/lib/jabber/asa
93 %attr(755,root,root) %{_libdir}/jabber/asa/plugins/*