Lars Strojny commited on 2006-12-31 03:03:02
Zeige 5 geänderte Dateien mit 178 Einfügungen und 101 Löschungen.
... | ... |
@@ -0,0 +1,168 @@ |
1 |
+# Copyright 1999-2006 Gentoo Foundation |
|
2 |
+# Distributed under the terms of the GNU General Public License v2 |
|
3 |
+# $Header: $ |
|
4 |
+ |
|
5 |
+# |
|
6 |
+# Original Author: Lars Strojny <lars@strojny.net> |
|
7 |
+# Purpose: Providing macros to handle installation and setup of the py-transport |
|
8 |
+# family |
|
9 |
+# |
|
10 |
+ |
|
11 |
+inherit eutils python |
|
12 |
+ |
|
13 |
+ECLASS="pytransport" |
|
14 |
+INHERITED="$INHERITED $ECLASS" |
|
15 |
+ |
|
16 |
+EXPORT_FUNCTIONS src_install src_unpack pkg_postinst |
|
17 |
+ |
|
18 |
+MY_PN=${PN/-svn/} |
|
19 |
+MY_PV=${PV} |
|
20 |
+MY_P=${MY_PN}-${MY_PV} |
|
21 |
+ |
|
22 |
+ |
|
23 |
+LICENSE="GPL-2" |
|
24 |
+ |
|
25 |
+HOMEPAGE="http://${MY_PN}.blathersource.org/" |
|
26 |
+ |
|
27 |
+ |
|
28 |
+pytransport_is_subversion() { |
|
29 |
+ [[ "${PN}" =~ "^py[a-z]+-t-svn$" ]] && return 0 || return 1 |
|
30 |
+} |
|
31 |
+ |
|
32 |
+ |
|
33 |
+pytransport_is_subversion && S=${WORKDIR}/${PN} |
|
34 |
+ |
|
35 |
+ |
|
36 |
+ |
|
37 |
+if pytransport_is_subversion; then |
|
38 |
+ inherit subversion |
|
39 |
+ ESVN_REPO_URI="svn://svn.blathersource.org/${MY_PN}/trunk" |
|
40 |
+ SRC_URI="" |
|
41 |
+else |
|
42 |
+ SRC_URI="http://www.blathersource.org/download.php/${PN}/${MY_P}.tar.gz" |
|
43 |
+fi |
|
44 |
+ |
|
45 |
+ |
|
46 |
+DEPEND=">=net-im/jabber-base-0.0 |
|
47 |
+ >=dev-lang/python-2.3" |
|
48 |
+ |
|
49 |
+RDEPEND=">=dev-python/twisted-1.3.0 |
|
50 |
+ >=dev-python/twisted-words-0.1.0 |
|
51 |
+ >=dev-python/twisted-xish-0.1.0 |
|
52 |
+ >=dev-python/twisted-web-0.5.0 |
|
53 |
+ >=dev-python/nevow-0.4.1 |
|
54 |
+ >=dev-python/imaging-1.1" |
|
55 |
+ |
|
56 |
+ |
|
57 |
+ |
|
58 |
+ |
|
59 |
+ |
|
60 |
+# Create the minimal token name from the package name |
|
61 |
+# |
|
62 |
+# Example: pyicq-t-svn |
|
63 |
+# |
|
64 |
+pytransport_get_human_name() { |
|
65 |
+ echo "${MY_PN}" \ |
|
66 |
+ | sed -e "s:^py\([a-z]*\)-t$:\1:g" \ |
|
67 |
+ | tr [:lower:] [:upper:] |
|
68 |
+} |
|
69 |
+ |
|
70 |
+ |
|
71 |
+ |
|
72 |
+# |
|
73 |
+# Guess the script name |
|
74 |
+# |
|
75 |
+pytransport_get_script_name() { |
|
76 |
+ echo "Py$(pytransport_get_human_name ${PN})t.py" |
|
77 |
+} |
|
78 |
+ |
|
79 |
+ |
|
80 |
+pytransport_adjust_configfile() { |
|
81 |
+ local configfile="$1" |
|
82 |
+ dosed \ |
|
83 |
+ "s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/</spooldir>:" \ |
|
84 |
+ "${configfile}" || die "Could not sed ${configfile}" |
|
85 |
+ dosed \ |
|
86 |
+ "s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \ |
|
87 |
+ "${configfile}" || die "Could not sed ${configfile}" |
|
88 |
+ return 0 |
|
89 |
+} |
|
90 |
+ |
|
91 |
+pytransport_get_python_version() { |
|
92 |
+ [ -z "${PYVER}" ] && python_version |
|
93 |
+ echo "${PYVER}" |
|
94 |
+} |
|
95 |
+ |
|
96 |
+pytransport_install_libs() { |
|
97 |
+ insinto /usr/lib/python$(pytransport_get_python_version)/site-packages/${PN}/ |
|
98 |
+ doins -r tools data src || \ |
|
99 |
+ die "Could not install data, tools, src" |
|
100 |
+ newins $(pytransport_get_script_name) ${PN}.py || \ |
|
101 |
+ die "Could not find initial .py-scripts" |
|
102 |
+ return 0 |
|
103 |
+} |
|
104 |
+ |
|
105 |
+PYTRANSPORT_CONFIG=config_example.xml |
|
106 |
+ |
|
107 |
+pytransport_install_config() { |
|
108 |
+ insinto /etc/jabber |
|
109 |
+ newins "${PYTRANSPORT_CONFIG}" ${PN}.xml |
|
110 |
+ fperms 600 /etc/jabber/${PN}.xml || die "Could not adjust perms" |
|
111 |
+ fowners jabber:jabber /etc/jabber/${PN}.xml || die "Could not adjust perms" |
|
112 |
+ return 0 |
|
113 |
+} |
|
114 |
+ |
|
115 |
+pytransport_generate_initd() { |
|
116 |
+ pytransport_is_subversion && local suffix=" (Subversion)" |
|
117 |
+ echo "depend() { |
|
118 |
+ need net |
|
119 |
+ use jabber-server |
|
120 |
+} |
|
121 |
+ |
|
122 |
+start() { |
|
123 |
+ ebegin \"Starting $(pytransport_get_human_name) Jabber Transport${suffix}\" |
|
124 |
+ start-stop-daemon --start --quiet \\ |
|
125 |
+ --background --name \"${PN}\" --chuid jabber:jabber \\ |
|
126 |
+ --exec /usr/bin/softlimit -- -r 100000 \\ |
|
127 |
+ /usr/bin/python$(pytransport_get_python_version) \\ |
|
128 |
+ /usr/lib/python$(pytransport_get_python_version)/site-packages/${PN}/${PN}.py \\ |
|
129 |
+ -c /etc/jabber/${PN}.xml \\ |
|
130 |
+ -l /var/log/jabber/${PN}.log |
|
131 |
+ eend \$? |
|
132 |
+} |
|
133 |
+ |
|
134 |
+stop() { |
|
135 |
+ ebegin \"Stopping $(pytransport_get_human_name) Jabber Transport${suffix}\" |
|
136 |
+ start-stop-daemon --stop --quiet --pidfile /var/run/jabber/pyicq-t-svn.pid |
|
137 |
+ sleep 3 |
|
138 |
+ eend \$? |
|
139 |
+}" |
|
140 |
+} |
|
141 |
+ |
|
142 |
+pytransport_src_unpack() { |
|
143 |
+ if pytransport_is_subversion; then |
|
144 |
+ subversion_src_unpack || die |
|
145 |
+ else |
|
146 |
+ unpack ${A} |
|
147 |
+ fi |
|
148 |
+} |
|
149 |
+ |
|
150 |
+pytransport_src_install() { |
|
151 |
+ einfo "Installing library files ..." |
|
152 |
+ pytransport_install_libs || die "Failed installing libs" |
|
153 |
+ |
|
154 |
+ einfo "Installing config file: /etc/jabber/${PN}.xml" |
|
155 |
+ pytransport_install_config || die "Failed installing configuration" |
|
156 |
+ |
|
157 |
+ einfo "Generating init script: /etc/init.d/${PN}" |
|
158 |
+ exeinto /etc/init.d |
|
159 |
+ pytransport_generate_initd > myinitd |
|
160 |
+ newexe myinitd ${PN} |
|
161 |
+} |
|
162 |
+ |
|
163 |
+pytransport_pkg_postinst() { |
|
164 |
+ einfo "A sample configuration file has been installed in /etc/jabber/${PN}.xml." |
|
165 |
+ einfo "Please edit it, and the configuration of you Jabber server to match." |
|
166 |
+ einfo "You also need to create a directory <host>.yourjabberhostname.tld in" |
|
167 |
+ einfo "/var/spool/jabber and chown it to jabber:jabber." |
|
168 |
+} |
... | ... |
@@ -8,10 +8,10 @@ EBUILD pyaim-t-0.7c.ebuild 1521 RMD160 d4571e817711efa4bcc54be287d3c23d0dca6f28 |
8 | 8 |
MD5 c4d65e1205e19494785b61da6c4c0881 pyaim-t-0.7c.ebuild 1521 |
9 | 9 |
RMD160 d4571e817711efa4bcc54be287d3c23d0dca6f28 pyaim-t-0.7c.ebuild 1521 |
10 | 10 |
SHA256 c57b84e574f4d6a2b7602c27ec9cc6b3432c1b306eb0c1b72dab6a4da01412ca pyaim-t-0.7c.ebuild 1521 |
11 |
-EBUILD pyaim-t-0.7d.ebuild 1536 RMD160 9957040d28ec97a0511db4d9ed4618ea438b2816 SHA1 0a57c5a03017ee6f08f48bb74bc3b3176747f823 SHA256 b451bbd747065bf14e960ad7ce79579aae68e9bc85d79181dfa736678bfa4577 |
|
12 |
-MD5 68add7554723f5361f756ea673c17b9b pyaim-t-0.7d.ebuild 1536 |
|
13 |
-RMD160 9957040d28ec97a0511db4d9ed4618ea438b2816 pyaim-t-0.7d.ebuild 1536 |
|
14 |
-SHA256 b451bbd747065bf14e960ad7ce79579aae68e9bc85d79181dfa736678bfa4577 pyaim-t-0.7d.ebuild 1536 |
|
11 |
+EBUILD pyaim-t-0.7d.ebuild 229 RMD160 9dbcd4d69157401d057724a749498d4b8a764589 SHA1 bb707cbe77dfe544f3bf63aa60e7d7cdf59f0cd0 SHA256 b6b612438adf0fb7b8abbe0d15350b5a27c27ce4f614d7e876d41fef2cbf8cd7 |
|
12 |
+MD5 019863a5eaab5b7f86106a2c4d906287 pyaim-t-0.7d.ebuild 229 |
|
13 |
+RMD160 9dbcd4d69157401d057724a749498d4b8a764589 pyaim-t-0.7d.ebuild 229 |
|
14 |
+SHA256 b6b612438adf0fb7b8abbe0d15350b5a27c27ce4f614d7e876d41fef2cbf8cd7 pyaim-t-0.7d.ebuild 229 |
|
15 | 15 |
MISC ChangeLog 386 RMD160 10719f33a5e60ca2401122a50770d7fa6c44368b SHA1 db0e52ae0299963c7738a6ad0260791935747424 SHA256 fedf1935ba7b84a862597844dd31bcd7987b12cce16065b6328565095488cff0 |
16 | 16 |
MD5 f08fda208a969c415d605218a29d92db ChangeLog 386 |
17 | 17 |
RMD160 10719f33a5e60ca2401122a50770d7fa6c44368b ChangeLog 386 |
... | ... |
@@ -2,52 +2,7 @@ |
2 | 2 |
# Distributed under the terms of the GNU General Public License v2 |
3 | 3 |
# $Header: $ |
4 | 4 |
|
5 |
-inherit eutils python |
|
5 |
+inherit pytransport |
|
6 | 6 |
|
7 | 7 |
DESCRIPTION="New Python based jabber transport for AIM" |
8 |
-HOMEPAGE="http://pyaim-t.blathersource.org/" |
|
9 |
-SRC_URI="http://www.blathersource.org/download.php/${PN}/${P}.tar.gz" |
|
10 |
-LICENSE="GPL-2" |
|
11 |
-SLOT="0" |
|
12 | 8 |
KEYWORDS="-* ~x86 ~ppc ~amd64" |
13 |
- |
|
14 |
- |
|
15 |
-DEPEND=">=net-im/jabber-base-0.0 |
|
16 |
- >=dev-lang/python-2.3" |
|
17 |
- |
|
18 |
-RDEPEND=">=dev-python/twisted-1.3.0 |
|
19 |
- >=dev-python/twisted-words-0.1.0 |
|
20 |
- >=dev-python/twisted-xish-0.1.0 |
|
21 |
- >=dev-python/twisted-web-0.5.0 |
|
22 |
- >=dev-python/nevow-0.4.1 |
|
23 |
- >=dev-python/imaging-1.1" |
|
24 |
-IUSE="" |
|
25 |
- |
|
26 |
-src_install() { |
|
27 |
- python_version |
|
28 |
- insinto /usr/lib/python${PYVER}/site-packages/${PN}/ |
|
29 |
- doins -r tools src data |
|
30 |
- newins PyAIMt.py ${PN}.py |
|
31 |
- |
|
32 |
- insinto /etc/jabber |
|
33 |
- newins config_example.xml ${PN}.xml |
|
34 |
- fperms 600 /etc/jabber/${PN}.xml |
|
35 |
- fowners jabber:jabber /etc/jabber/${PN}.xml |
|
36 |
- dosed \ |
|
37 |
- "s:<spooldir>[^\<]*</spooldir>:<spooldir>/var/spool/jabber/</spooldir>:" \ |
|
38 |
- /etc/jabber/${PN}.xml |
|
39 |
- dosed \ |
|
40 |
- "s:<pid>[^\<]*</pid>:<pid>/var/run/jabber/${PN}.pid</pid>:" \ |
|
41 |
- /etc/jabber/${PN}.xml |
|
42 |
- |
|
43 |
- exeinto /etc/init.d |
|
44 |
- newexe ${FILESDIR}/${P}.initd ${PN} |
|
45 |
- dosed "s/PATH/python${PYVER}/" /etc/init.d/${PN} |
|
46 |
-} |
|
47 |
- |
|
48 |
-pkg_postinst() { |
|
49 |
- einfo "A sample configuration file has been installed in /etc/jabber/${PN}.xml." |
|
50 |
- einfo "Please edit it, and the configuration of you Jabber server to match." |
|
51 |
- einfo "You also need to create a directory aim.yourjabberhostname.tld in" |
|
52 |
- einfo "/var/spool/jabber and chown it to jabber:jabber." |
|
53 |
-} |
... | ... |
@@ -2,10 +2,10 @@ AUX pyicq-t-svn-0.8.initd 651 RMD160 6fa9a9205c490770d888f69af9c1e64bde55ecbf SH |
2 | 2 |
MD5 e6a1d659fe2e1733a18653294735f12f files/pyicq-t-svn-0.8.initd 651 |
3 | 3 |
RMD160 6fa9a9205c490770d888f69af9c1e64bde55ecbf files/pyicq-t-svn-0.8.initd 651 |
4 | 4 |
SHA256 fef146a0edcc0150b49bc1a97bfd6dc95aeabfbfc6b4b95096dae90146b7dd75 files/pyicq-t-svn-0.8.initd 651 |
5 |
-EBUILD pyicq-t-svn-0.8.ebuild 1572 RMD160 9d70bc49d74f891a0d5639fde4fee0bac0be9b50 SHA1 cd74a5b9394bb8b98f51ef7a3c04ff9b3e57854c SHA256 2499ae8e5175f23528e07d18cf48ca9473b2c44cc41fa0531ec4986d09294ac7 |
|
6 |
-MD5 557d62130af05c70cbe478e4710ff6ba pyicq-t-svn-0.8.ebuild 1572 |
|
7 |
-RMD160 9d70bc49d74f891a0d5639fde4fee0bac0be9b50 pyicq-t-svn-0.8.ebuild 1572 |
|
8 |
-SHA256 2499ae8e5175f23528e07d18cf48ca9473b2c44cc41fa0531ec4986d09294ac7 pyicq-t-svn-0.8.ebuild 1572 |
|
5 |
+EBUILD pyicq-t-svn-0.8.ebuild 246 RMD160 c19e675a3227133f5a21196bacd393519f5ed3a4 SHA1 cf450f441a7f57ea734c6dcc22d900d7fe7f169d SHA256 cbd7ca3e028d97f27d7e9912d9a535917280f381c2e35e8a9e1fe25d34c5e458 |
|
6 |
+MD5 4685b3949c658382868c6095ba795735 pyicq-t-svn-0.8.ebuild 246 |
|
7 |
+RMD160 c19e675a3227133f5a21196bacd393519f5ed3a4 pyicq-t-svn-0.8.ebuild 246 |
|
8 |
+SHA256 cbd7ca3e028d97f27d7e9912d9a535917280f381c2e35e8a9e1fe25d34c5e458 pyicq-t-svn-0.8.ebuild 246 |
|
9 | 9 |
MISC metadata.xml 298 RMD160 666d6893bdcfaaaf8f5bab8f0675c2d070b8de58 SHA1 01a81ff31aefcbc2d7a63aba28760e8d21f8bd07 SHA256 31355dfddbcb89e8082ed7f17be6b7f49215228385223470e3ed5ea59cb84640 |
10 | 10 |
MD5 508ad196f8fa94f919bf37b68d2f3a74 metadata.xml 298 |
11 | 11 |
RMD160 666d6893bdcfaaaf8f5bab8f0675c2d070b8de58 metadata.xml 298 |
... | ... |
@@ -2,55 +2,9 @@ |
2 | 2 |
# Distributed under the terms of the GNU General Public License v2 |
3 | 3 |
# $Header: $ |
4 | 4 |
|
5 |
-inherit eutils python subversion |
|
6 |
- |
|
7 |
-ESVN_REPO_URI="svn://svn.blathersource.org/pyicq-t/trunk" |
|
8 |
-#ESVN_PROJECT="pyicq-t" |
|
5 |
+inherit pytransport |
|
9 | 6 |
|
10 | 7 |
DESCRIPTION="New Python based jabber transport for ICQ" |
11 |
-HOMEPAGE="http://pyicq-t.blathersource.org/" |
|
12 | 8 |
LICENSE="GPL-2" |
13 | 9 |
SLOT="0" |
14 | 10 |
KEYWORDS="~x86 ~amd64" |
15 |
- |
|
16 |
-DEPEND=">=net-im/jabber-base-0.0 |
|
17 |
- >=dev-lang/python-2.3" |
|
18 |
- |
|
19 |
-RDEPEND=">=dev-python/twisted-1.3.0 |
|
20 |
- >=dev-python/twisted-words-0.1.0 |
|
21 |
- >=dev-python/twisted-xish-0.1.0 |
|
22 |
- >=dev-python/twisted-web-0.5.0 |
|
23 |
- >=dev-python/nevow-0.4.1 |
|
24 |
- >=dev-python/imaging-1.1" |
|
25 |
-IUSE="" |
|
26 |
- |
|
27 |
-S=${WORKDIR}/${PN}/ |
|
28 |
- |
|
29 |
-src_install() { |
|
30 |
- python_version |
|
31 |
- insinto /usr/lib/python${PYVER}/site-packages/${PN}/ |
|
32 |
- doins -r tools data src |
|
33 |
- newins PyICQt.py ${PN}.py |
|
34 |
- |
|
35 |
- insinto /etc/jabber |
|
36 |
- newins 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 |
- |
|
46 |
- exeinto /etc/init.d |
|
47 |
- newexe ${FILESDIR}/${P}.initd ${PN} |
|
48 |
- dosed "s/PATH/python${PYVER}/" /etc/init.d/${PN} |
|
49 |
-} |
|
50 |
- |
|
51 |
-pkg_postinst() { |
|
52 |
- einfo "A sample configuration file has been installed in /etc/jabber/${PN}.xml." |
|
53 |
- einfo "Please edit it, and the configuration of you Jabber server to match." |
|
54 |
- einfo "You also need to create a directory icq.yourjabberhostname.tld in" |
|
55 |
- einfo "/var/spool/jabber and chown it to jabber:jabber." |
|
56 |
-} |
|
57 | 11 |