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