]> git.pld-linux.org Git - packages/asa.git/blob - asa.spec
- missing dir
[packages/asa.git] / asa.spec
1 #
2 # TODO:
3 # - more clean init script ? (especially asa.sh),
4
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
8 Name:           asa
9 Version:        0.1.6
10 Release:        1
11 License:        GPL
12 Group:          Applications/Communications
13 Source0:        http://www.apatsch.wroc.biz/asa/%{name}-%{version}.tar.gz
14 # Source0-md5:  1f758fe0f38e3dcd6863fbe93f7e814d
15 Source1:        jabber-asa-transport.init
16 Source2:        %{name}.sh
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
25 Requires:       perl-libwww
26 Requires:       perl-Unicode-Lite
27 Requires:       perl-Crypt-SSLeay
28 Requires:       perl-Unicode-String
29 Requires:       perl-Unicode-Map
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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.
38
39 %description -l pl
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.
44
45 %prep
46 %setup -q
47 %patch0 -p1
48 %if "%{_lib}" == "lib64"
49 %patch1 -p1
50 %endif
51
52 %install
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}
55
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/
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
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
71         fi
72 fi
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
76 else
77         echo "Run \"/etc/rc.d/init.d/jabber-asa-transport start\" to start Jabber ASA transport."
78 fi
79
80 %preun
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
84         fi
85         /sbin/chkconfig --del jabber-asa-transport
86 fi
87
88 %files
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
This page took 0.05992 seconds and 3 git commands to generate.