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