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