blob: 35c9bcff1293cabd1587d0fced21723b43f5ed46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="1"
WX_GTK_VER="2.6"
inherit zproduct python multilib wxwidgets
MY_PN="ccPublisher"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Tool to tag and upload CC-licensed media files"
HOMEPAGE="http://wiki.creativecommons.org/CcPublisher"
SRC_URI="mirror://berlios/cctools/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="zope"
ZPROD_LIST="${MY_PN}"
S="${WORKDIR}/${MY_P}"
DEPEND=""
RDEPEND=">=dev-python/wxpython-2.6.3.2:2.6
>=x11-libs/wxGTK-2.6.3.3:2.6
zope? ( net-zope/zope )
|| ( ( dev-python/elementtree >=dev-lang/python-2.4 ) >=dev-lang/python-2.5 )"
src_install() {
# change directories, so that the python library is found
sed -i "s#\.:#/usr/$(get_libdir)/${P}:# ; s#ccp.py#/usr/$(get_libdir)/${P}/ccp.py#" \
ccPublisher.sh
newbin ccPublisher.sh ccPublisher
# docs
dodoc README.txt resources/*txt
# copy python libraries, no not include the script, readme or
# zope libraries. zope libs will be installed if USE="zope"
rm ccPublisher.sh README.txt -f
mv "zope" "${WORKDIR}"
insinto /usr/$(get_libdir)/${P}
doins -r *
# optimize python by compiling it
python_mod_optimize /usr/$(get_libdir)/${P}
# copy the zope Product folder
if use zope; then
einfo "Installing the Zope Product"
# we need to reorganize a bit, since the zproduct
# eclass defines S=$WORKDIR
# the zope directory is already in $WORKDIR
rm -rf "${S}/*"
mv "${WORKDIR}/zope" "${S}/${MY_PN}"
zproduct_src_install all
fi
}
pkg_postrm() {
python_mod_cleanup /usr/$(get_libdir)/${P}
}
pkg_postinst() {
python_version
python_mod_optimize "${ROOT}"usr/$(get_libdir)/${P}
elog
elog "ccPublisher is now installed to /usr/bin/ccPublisher"
elog
elog "If you get python errors, check that both wxpython and"
elog "wxGTK are the same version."
elog
if use zope; then
elog "The Zope Product has been installed."
elog "Use \"zprod-manager add\" to activate it."
elog
fi
}
|