Lars Strojny commited on 2007-04-10 00:18:49
Zeige 1 geänderte Dateien mit 64 Einfügungen und 0 Löschungen.
... | ... |
@@ -0,0 +1,64 @@ |
1 |
+# Copyright 1999-2006 Gentoo Foundation |
|
2 |
+# Distributed under the terms of the GNU General Public License v2 |
|
3 |
+# $Header: $ |
|
4 |
+ |
|
5 |
+ |
|
6 |
+DESCRIPTION="Jabber2SMS-gateway via aspsms.com" |
|
7 |
+HOMEPAGE="http://www.micressor.ch/content/projects/aspsms-t" |
|
8 |
+SRC_URI="http://svn.micressor.ch/public/${PN}/files/${P}.tar.gz" |
|
9 |
+ |
|
10 |
+LICENSE="GPL-2" |
|
11 |
+SLOT="0" |
|
12 |
+KEYWORDS="~x86 ~amd64" |
|
13 |
+IUSE="doc" |
|
14 |
+ |
|
15 |
+DEPEND="dev-lang/perl |
|
16 |
+ net-im/jabber-base" |
|
17 |
+ |
|
18 |
+RDEPEND="dev-perl/Object-MultiType |
|
19 |
+ dev-perl/Authen-SASL |
|
20 |
+ dev-perl/Digest-SHA1 |
|
21 |
+ dev-perl/XML-Parser |
|
22 |
+ dev-perl/XML-Smart |
|
23 |
+ dev-perl/Net-Jabber" |
|
24 |
+ |
|
25 |
+S=${WORKDIR}/${PN}_${PV} |
|
26 |
+ |
|
27 |
+src_install() { |
|
28 |
+ dodoc INSTALL COPYING ChangeLog || die |
|
29 |
+ insinto /usr/doc/${PF} |
|
30 |
+ doins ${PN}.pl aspsms.notification.pl || die |
|
31 |
+ use doc && dodoc -r docs |
|
32 |
+ |
|
33 |
+ insinto /usr/lib/${PN} |
|
34 |
+ doins -r ASPSMS config.pm Presence.pm Iq.pm aspsms-t.pl InMessage.pm || die |
|
35 |
+ dosed "s:^use lib \"\./\";$:use lib \"/usr/lib/${PN}\";:" \ |
|
36 |
+ /usr/lib/${PN}/${PN}.pl || die |
|
37 |
+ |
|
38 |
+ exeinto /usr/bin |
|
39 |
+ echo "#! /bin/bash |
|
40 |
+perl /usr/lib/${PN}/${PN}.pl -c /etc/jabber/${PN}.xml >/dev/null" > ${PN} |
|
41 |
+ doexe ${PN} |
|
42 |
+ |
|
43 |
+ insinto /etc/jabber |
|
44 |
+ newins etc/aspsms.xml.dist ${PN}.xml || die |
|
45 |
+ fperms 600 /etc/jabber/${PN}.xml || die |
|
46 |
+ fowners jabber:jabber /etc/jabber/${PN}.xml || die |
|
47 |
+ dosed "s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/sms.YOURHOST</spooldir>:" \ |
|
48 |
+ /etc/jabber/${PN}.xml || die |
|
49 |
+ |
|
50 |
+ newins etc/fees.xml sms-fees.xml || die |
|
51 |
+ newins etc/networks.xml sms-networks.xml || die |
|
52 |
+ |
|
53 |
+ dosed 's:\./etc/fees.xml:/etc/jabber/sms-fees.xml:' \ |
|
54 |
+ /usr/lib/${PN}/config.pm || die |
|
55 |
+ dosed 's:\./etc/networks.xml:/etc/jabber/sms-networks.xml:' \ |
|
56 |
+ /usr/lib/${PN}/config.pm || die |
|
57 |
+ |
|
58 |
+ newinitd ${FILESDIR}/${P}.initd ${PN} || die |
|
59 |
+} |
|
60 |
+ |
|
61 |
+pkg_postinst() { |
|
62 |
+ einfo "Move /usr/doc/${P}/${PN/-t/}.notification.pl in your webroot" |
|
63 |
+ einfo "and make it executable" |
|
64 |
+} |
|
0 | 65 |