]>
Commit | Line | Data |
---|---|---|
8b2c795b | 1 | # |
2 | # TODO: | |
243ab769 | 3 | # - more clean init script ? (especially asa.sh) but usable, |
8b2c795b | 4 | |
8b2c795b | 5 | Summary: Jabber server component agent for sending SMS messages |
a7ba988b | 6 | Summary(pl.UTF-8): Komponent serwera Jabbera do wysyłania wiadomości SMS |
8b2c795b | 7 | Name: asa |
fb7aac82 | 8 | Version: 0.1.7 |
65fd8cd7 | 9 | Release: 2 |
8b2c795b | 10 | License: GPL |
11 | Group: Applications/Communications | |
12 | Source0: http://www.apatsch.wroc.biz/asa/%{name}-%{version}.tar.gz | |
fb7aac82 | 13 | # Source0-md5: 2a754e9ab1220f79060a68a46a76cc6c |
e2af77f8 | 14 | Source1: jabber-%{name}-transport.init |
a4fa3df5 | 15 | Source2: %{name}.sh |
243ab769 | 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 | |
30217832 | 19 | Patch2: %{name}-userrun.patch |
243ab769 | 20 | Patch3: %{name}-lib64.patch |
8b2c795b | 21 | URL: http://www.apatsch.wroc.biz/asa/ |
3a193b5c | 22 | BuildRequires: rpm-perlprov |
c5fcaf09 | 23 | BuildRequires: rpmbuild(macros) >= 1.268 |
8b2c795b | 24 | Requires(post): /usr/bin/perl |
5036cd5a | 25 | Requires(post): sed >= 4.0 |
c5fcaf09 | 26 | Requires(post,preun): /sbin/chkconfig |
e2af77f8 | 27 | Requires(pre): jabber-common |
8b2c795b | 28 | Requires: jabberd >= 1.4 |
7a02eaad | 29 | Requires: perl-Crypt-SSLeay |
e2af77f8 | 30 | Requires: perl-Unicode-Lite |
0ceffdfb | 31 | Requires: perl-Unicode-Map |
e2af77f8 ER |
32 | Requires: perl-Unicode-String |
33 | Requires: perl-libwww | |
8b2c795b | 34 | BuildArch: noarch |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
e2af77f8 ER |
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. | |
8b2c795b | 41 | |
0deee79c JR |
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 | |
8b2c795b | 46 | modularnej budowie opartej na wtyczkach. |
47 | ||
48 | %prep | |
49 | %setup -q | |
7febb40e | 50 | %patch0 -p1 |
243ab769 | 51 | %patch1 -p0 |
52 | %patch2 -p1 | |
7febb40e | 53 | %if "%{_lib}" == "lib64" |
243ab769 | 54 | %patch3 -p1 |
7febb40e | 55 | %endif |
243ab769 | 56 | |
8b2c795b | 57 | %install |
58 | rm -rf $RPM_BUILD_ROOT | |
c743e7d6 | 59 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/jabber,%{_sbindir},/etc/rc.d/init.d,/var/lib/jabber/asa/storage,%{_libdir}/jabber/asa/plugins} |
8b2c795b | 60 | |
c743e7d6 | 61 | install config.xml $RPM_BUILD_ROOT%{_sysconfdir}/jabber/asa.xml |
8b2c795b | 62 | install ApaSMSAgent.pl $RPM_BUILD_ROOT%{_sbindir} |
63 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/jabber-asa-transport | |
a4fa3df5 | 64 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sbindir} |
19742307 | 65 | install plugins/*.pl $RPM_BUILD_ROOT%{_libdir}/jabber/asa/plugins/ |
8b2c795b | 66 | |
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %post | |
c5fcaf09 ER |
71 | if [ -f %{_sysconfdir}/jabber/secret ] ; then |
72 | SECRET=`cat %{_sysconfdir}/jabber/secret` | |
8b2c795b | 73 | if [ -n "$SECRET" ] ; then |
5da58de0 | 74 | echo "Updating component authentication secret in asa.xml..." |
5036cd5a | 75 | %{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/asa.xml |
8b2c795b | 76 | fi |
77 | fi | |
78 | /sbin/chkconfig --add jabber-asa-transport | |
c5fcaf09 | 79 | %service jabber-asa-transport restart "Jabber ASA transport" |
8b2c795b | 80 | |
81 | %preun | |
82 | if [ "$1" = "0" ]; then | |
c5fcaf09 | 83 | %service jabber-asa-transport stop |
8b2c795b | 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}/* | |
e2af77f8 | 91 | %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/asa.xml |
8b2c795b | 92 | %attr(754,root,root) /etc/rc.d/init.d/jabber-asa-transport |
eae74a72 | 93 | %attr(770,root,jabber) /var/lib/jabber |
94 | %dir %{_libdir}/jabber | |
103cc9b9 | 95 | %dir %{_libdir}/jabber/asa |
4a30a860 | 96 | %attr(755,root,root) %{_libdir}/jabber/asa/plugins |