opsi/dev-python/python-opsi/python-opsi-4.0.1.32.ebuild
geos_one e3c66df191 Bump
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/opsi@3041 6952d904-891a-0410-993b-d76249ca496b
2011-11-12 18:21:01 +00:00

80 lines
2.0 KiB
Bash

# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
RPM_VER="1.1"
inherit distutils eutils rpm
DESCRIPTION="opsi python library"
HOMEPAGE="http://opsi.org/"
SRC_URI="http://download.opensuse.org/repositories/home:/uibmz:/opsi:/opsi40/openSUSE_11.3/src/${P}-${RPM_VER}.src.rpm"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
RDEPEND="dev-python/twisted-web
dev-python/twisted-conch
sys-apps/file[python]
dev-python/pycrypto
dev-python/python-ldap
dev-python/simplejson
dev-python/pypam
dev-python/mysql-python
dev-python/sqlalchemy
sys-apps/iproute2
app-backup/duplicity
dev-python/ldaptor
sys-apps/lshw
dev-python/m2crypto
dev-python/pyopenssl
sys-apps/lsb-release
dev-libs/newt
sys-apps/shadow"
DEPEND="${RDEPEND}
sys-devel/gettext
dev-python/setuptools"
PYTHON_MODNAME="OPSI"
pkg_setup() {
enewgroup pcpatch
enewgroup opsiadmin
enewuser pcpatch -1 /bin/bash /opt/pcbin/pcpatch pcpatch
}
src_prepare() {
distutils_src_prepare
sed -i 's#/etc/dhcp3/dhcpd.conf#/etc/dhcp/dhcpd.conf#;s#/etc/init.d/dhcp3-server#/etc/init.d/dhcpd#' data/backends/dhcpd.conf
}
src_install() {
distutils_src_install
dosym ../20_legacy.conf etc/opsi/backendManager/extend.d/configed/20_legacy.conf
fowners -R root:pcpatch /etc/opsi/backendManager
find "${D}"/etc/opsi/backendManager -type d -exec chmod 770 {} \;
find "${D}"/etc/opsi/backendManager -type f -exec chmod 660 {} \;
fowners -R root:pcpatch /etc/opsi/backends
fperms 770 /etc/opsi/backends
fperms 660 /etc/opsi/backends/*.conf
touch "${D}"/etc/opsi/pckeys
fowners root:pcpatch /etc/opsi/pckeys
fperms 660 /etc/opsi/pckeys
touch "${D}"/etc/opsi/passwd
fowners root:pcpatch /etc/opsi/passwd
fperms 660 /etc/opsi/passwd
dosym acl.conf.default /etc/opsi/backendManager/acl.conf
dosym dispatch.conf.default /etc/opsi/backendManager/dispatch.conf
}