besseres ebuild für yahoo-transport, aus gentoo bugzilla
Hanno Böck

Hanno Böck commited on 2008-04-19 20:16:34
Zeige 3 geänderte Dateien mit 87 Einfügungen und 0 Löschungen.

... ...
@@ -0,0 +1,3 @@
1
+AUX pyyim-t-0.4-initd 535 RMD160 bf76cb332404d38602698835ef2e330e4bcfccbf SHA1 a64e26d9cd2e00fd858a485dd57ec427fbfcffe3 SHA256 f422c7510fd4bcfe4db8f1a59f35deba1118c9b854a7cd8422d1a32889fda2de
2
+DIST yahoo-transport-0.4.tar.gz 101030 RMD160 18b56aa47ac78c885e623e70c8824a0ce73a9846 SHA1 a89efcd9f65c37626d5b1cf5a2ee4ab9af739340 SHA256 99f6866dab0b53dfa2ebb56839e86669d7b8f5c307fb5edcf7e84fc048993249
3
+EBUILD pyyim-t-0.4.ebuild 1699 RMD160 07ccc3d67da47b8bbcc8a61860db58739ffc17a0 SHA1 fac71810ae5c64b581527e66dbad018882977df2 SHA256 9695c00f922975f8023878ce10f54debfbefe36723eb0ceb0013fd77b1edabd4
... ...
@@ -0,0 +1,22 @@
1
+#!/sbin/runscript
2
+# Copyright 1999-2008 Gentoo Foundation
3
+# Distributed under the terms of the GNU General Public License v2
4
+# $Header: $
5
+
6
+depend() {
7
+	need net
8
+	use jabber-server
9
+}
10
+
11
+start() {
12
+	ebegin "Starting YIM Jabber Transport"
13
+        start-stop-daemon --start --quiet --background --pidfile /var/run/jabber/pyyim-t.pid --chuid jabber:jabber \
14
+		--exec /usr/bin/python INSPATH/yahoo.py
15
+	eend $?
16
+}
17
+
18
+stop() {
19
+	ebegin "Stopping YIM Jabber Transport"
20
+	start-stop-daemon --stop --quiet --pidfile /var/run/jabber/pyyim-t.pid
21
+	eend $?
22
+}
... ...
@@ -0,0 +1,62 @@
1
+# Copyright 1999-2008 Gentoo Foundation
2
+# Distributed under the terms of the GNU General Public License v2
3
+# $Header: $
4
+
5
+NEED_PYTHON=2.3
6
+
7
+inherit eutils multilib python
8
+
9
+DESCRIPTION="Python based jabber transport for YIM"
10
+HOMEPAGE="http://xmpppy.sourceforge.net/yahoo/"
11
+SRC_URI="mirror://sourceforge/xmpppy/yahoo-transport-${PV}.tar.gz"
12
+
13
+LICENSE="GPL-2"
14
+SLOT="0"
15
+KEYWORDS="~x86"
16
+IUSE=""
17
+
18
+DEPEND="net-im/jabber-base"
19
+RDEPEND="${DEPEND}
20
+	>=dev-python/imaging-1.1
21
+	>=dev-python/twisted-2.2.0
22
+	>=dev-python/twisted-words-0.1.0
23
+	>=dev-python/twisted-web-0.5.0
24
+	>=dev-python/xmpppy-0.4.1"
25
+
26
+src_install() {
27
+	local inspath
28
+
29
+	python_version
30
+	inspath=/usr/$(get_libdir)/python${PYVER}/site-packages/${PN}
31
+	insinto ${inspath}
32
+	doins -r yahoo-transport-${PV}/curphoo
33
+	doins yahoo-transport-${PV}/*.py
34
+
35
+	insinto /etc/jabber
36
+	newins yahoo-transport-${PV}/config_example.xml ${PN}.xml
37
+	fperms 600 /etc/jabber/${PN}.xml
38
+	fowners jabber:jabber /etc/jabber/${PN}.xml
39
+	dosed \
40
+		"s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber</spooldir>:" \
41
+		/etc/jabber/${PN}.xml
42
+	dosed \
43
+		"s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \
44
+		/etc/jabber/${PN}.xml
45
+	dosym /etc/jabber/${PN}.xml /etc/pyyimt.conf.xml
46
+
47
+	newinitd "${FILESDIR}/${PN}-${PV}-initd" ${PN}
48
+	dosed "s:INSPATH:${inspath}:" /etc/init.d/${PN}
49
+}
50
+
51
+pkg_postinst() {
52
+	python_version
53
+	python_mod_optimize "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${PN}"
54
+
55
+	elog "A sample configuration file has been installed in /etc/jabber/${PN}.xml."
56
+	elog "Please edit it and the configuration of your Jabber server to match."
57
+}
58
+
59
+pkg_postrm() {
60
+	python_version
61
+	python_mod_cleanup "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${PN}"
62
+}
0 63