5 # - /usr/lib vs /usr/lib64 - need patch!
6 # - run from user jabber script or patch,
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 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 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 ApaSMSAgent - Jabber server component agent for sending
31 SMS messages to cellular networks. Targetted at polish users,
32 but can be adopted for international use, because of it's
33 plugin-based architecture.
36 ApaSMSAgent - komponent serwera Jabbera umo¿liwiaj±cy wysy³anie
37 wiadomo¶ci SMS do sieci komórkowych. Aktualnie obs³uguje g³ównie
38 polskie sieci, ale z ³atwo¶ci± mo¿e zostaæ rozszerzony o inne dziêki
39 modularnej budowie opartej na wtyczkach.
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,%{_sbindir},/etc/rc.d/init.d,/var/lib/jabber/asa/storage,%{_libdir}/jabber/asa/plugins}
48 install config.xml $RPM_BUILD_ROOT%{_sysconfdir}/jabber/asa.xml
49 install ApaSMSAgent.pl $RPM_BUILD_ROOT%{_sbindir}
50 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/jabber-asa-transport
51 install plugins/*.pl $RPM_BUILD_ROOT/%{_libdir}/jabber/asa/plugins/
54 rm -rf $RPM_BUILD_ROOT
57 if [ -f /etc/jabber/secret ] ; then
58 SECRET=`cat /etc/jabber/secret`
59 if [ -n "$SECRET" ] ; then
60 echo "Updating component authentication secret in ile.xml..."
61 perl -pi -e "s/>secret</>$SECRET</" /etc/jabber/asa.xml
64 /sbin/chkconfig --add jabber-asa-transport
65 if [ -r /var/lock/subsys/jabber-asa-transport ]; then
66 /etc/rc.d/init.d/jabber-asa-transport restart >&2
68 echo "Run \"/etc/rc.d/init.d/jabber-asa-transport start\" to start Jabber ASA transport."
72 if [ "$1" = "0" ]; then
73 if [ -r /var/lock/subsys/jabber-asa-transport ]; then
74 /etc/rc.d/init.d/jabber-asa-transport stop >&2
76 /sbin/chkconfig --del jabber-asa-transport
80 %defattr(644,root,root,755)
81 %doc ChangeLog AUTHORS README
82 %attr(755,root,root) %{_sbindir}/*
83 %attr(640,root,jabber) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/jabber/asa.xml
84 %attr(754,root,root) /etc/rc.d/init.d/jabber-asa-transport
85 %attr(770,root,jabber) /var/lib/jabber/asa
86 %attr(755,root,root) %{_libdir}/jabber/asa/plugins/*