]> git.pld-linux.org Git - packages/asa.git/blob - asa.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/asa.git] / asa.spec
1 #
2 # TODO:
3 # - more clean init script ? (especially asa.sh) but usable,
4
5 Summary:        Jabber server component agent for sending SMS messages
6 Summary(pl.UTF-8):      Komponent serwera Jabbera do wysyłania wiadomości SMS
7 Name:           asa
8 Version:        0.1.7
9 Release:        2
10 License:        GPL
11 Group:          Applications/Communications
12 Source0:        http://www.apatsch.wroc.biz/asa/%{name}-%{version}.tar.gz
13 # Source0-md5:  2a754e9ab1220f79060a68a46a76cc6c
14 Source1:        jabber-%{name}-transport.init
15 Source2:        %{name}.sh
16 # This patch updates asa to recent version from SVN (kg doesn't releases tarball)
17 Patch0:         %{name}-svn-26-05-2007.patch
18 Patch1:         %{name}-PLD.patch
19 Patch2:         %{name}-userrun.patch
20 Patch3:         %{name}-lib64.patch
21 URL:            http://www.apatsch.wroc.biz/asa/
22 BuildRequires:  rpm-perlprov
23 BuildRequires:  rpmbuild(macros) >= 1.268
24 Requires(post): /usr/bin/perl
25 Requires(post): sed >= 4.0
26 Requires(post,preun):   /sbin/chkconfig
27 Requires(pre):  jabber-common
28 Requires:       jabberd >= 1.4
29 Requires:       perl-Crypt-SSLeay
30 Requires:       perl-Unicode-Lite
31 Requires:       perl-Unicode-Map
32 Requires:       perl-Unicode-String
33 Requires:       perl-libwww
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 ApaSMSAgent - Jabber server component agent for sending SMS messages
39 to cellular networks. Targetted at polish users, but can be adopted
40 for international use, because of it's plugin-based architecture.
41
42 %description -l pl.UTF-8
43 ApaSMSAgent - komponent serwera Jabbera umożliwiający wysyłanie
44 wiadomości SMS do sieci komórkowych. Aktualnie obsługuje głównie
45 polskie sieci, ale z łatwością może zostać rozszerzony o inne dzięki
46 modularnej budowie opartej na wtyczkach.
47
48 %prep
49 %setup -q
50 %patch0 -p1
51 %patch1 -p0
52 %patch2 -p1
53 %if "%{_lib}" == "lib64"
54 %patch3 -p1
55 %endif
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,%{_sbindir},/etc/rc.d/init.d,/var/lib/jabber/asa/storage,%{_libdir}/jabber/asa/plugins}
60
61 install config.xml $RPM_BUILD_ROOT%{_sysconfdir}/jabber/asa.xml
62 install ApaSMSAgent.pl $RPM_BUILD_ROOT%{_sbindir}
63 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/jabber-asa-transport
64 install %{SOURCE2} $RPM_BUILD_ROOT%{_sbindir}
65 install plugins/*.pl $RPM_BUILD_ROOT%{_libdir}/jabber/asa/plugins/
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 if [ -f %{_sysconfdir}/jabber/secret ] ; then
72         SECRET=`cat %{_sysconfdir}/jabber/secret`
73         if [ -n "$SECRET" ] ; then
74                 echo "Updating component authentication secret in asa.xml..."
75                 %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/asa.xml
76         fi
77 fi
78 /sbin/chkconfig --add jabber-asa-transport
79 %service jabber-asa-transport restart "Jabber ASA transport"
80
81 %preun
82 if [ "$1" = "0" ]; then
83         %service jabber-asa-transport stop
84         /sbin/chkconfig --del jabber-asa-transport
85 fi
86
87 %files
88 %defattr(644,root,root,755)
89 %doc ChangeLog AUTHORS README
90 %attr(755,root,root) %{_sbindir}/*
91 %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/asa.xml
92 %attr(754,root,root) /etc/rc.d/init.d/jabber-asa-transport
93 %attr(770,root,jabber) /var/lib/jabber
94 %dir %{_libdir}/jabber
95 %dir %{_libdir}/jabber/asa
96 %attr(755,root,root) %{_libdir}/jabber/asa/plugins
This page took 0.051607 seconds and 3 git commands to generate.