2011-06-23 09:23:16 +02:00
|
|
|
# Copyright 1999-2011 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
EAPI="3"
|
|
|
|
RPM_VER="1.1"
|
|
|
|
|
|
|
|
inherit eutils rpm
|
|
|
|
|
|
|
|
DESCRIPTION="opsi depot server"
|
|
|
|
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"
|
2011-06-24 19:32:24 +02:00
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
#KEYWORDS=""
|
2011-06-23 09:23:16 +02:00
|
|
|
IUSE=""
|
|
|
|
|
|
|
|
#Requires: python-opsi >= 4.0.1 opsiconfd >= 4.0.1 opsipxeconfd >= 4.0 opsi-utils >= 4.0 opsi-linux-bootimage >= 20090927 samba sudo wget
|
|
|
|
#%if 0%{?suse_version}
|
|
|
|
#BuildRequires: pwdutils python-opsi
|
|
|
|
#Requires: pwdutils dhcp-server
|
|
|
|
#%endif
|
|
|
|
#%if 0%{?rhel_version} || 0%{?centos_version}
|
|
|
|
#Requires: dhcp redhat-lsb
|
|
|
|
#%endif
|
|
|
|
|
|
|
|
|
|
|
|
RDEPEND="dev-python/python-opsi"
|
|
|
|
DEPEND="${RDEPEND}"
|
|
|
|
|
|
|
|
pkg_setup() {
|
|
|
|
enewuser opsiconfd -1 /bin/bash /var/lib/opsi pcpatch
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
keepdir /var/lib/opsi/workbench
|
|
|
|
keepdir /var/lib/opsi/depot
|
|
|
|
keepdir /home/opsiproducts
|
|
|
|
keepdir /opt/pcbin/install
|
|
|
|
keepdir /var/lib/opsi/repository
|
|
|
|
keepdir /var/log/opsi/clientconnect
|
|
|
|
keepdir /var/log/opsi/bootimage
|
|
|
|
keepdir /var/log/opsi/instlog
|
|
|
|
dobin opsi-setup
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
if has_version <net-misc/opsi-depotserver-${PVR} ; then
|
|
|
|
# Upgrade
|
|
|
|
/usr/bin/opsi-setup --update-from unknown || true
|
|
|
|
/usr/bin/opsi-setup --set-rights /etc/opsi || true
|
|
|
|
/usr/bin/opsi-setup --set-rights /tftpboot || true
|
|
|
|
#/usr/bin/opsi-setup --set-rights /var/lib/opsi || true
|
|
|
|
else
|
|
|
|
# Install
|
|
|
|
/usr/bin/opsi-setup --init-current-config --auto-configure-dhcpd --auto-configure-samba || true
|
|
|
|
/usr/bin/opsi-setup --set-rights || true
|
|
|
|
fi
|
|
|
|
}
|