opsi/net-misc/opsi-depotserver/opsi-depotserver-4.0.2.3.ebuild
Mario Fetka bb5fc9ac96 Bump
(Portage version: 2.2.0_alpha123/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)
2012-11-12 22:40:36 +01:00

62 lines
1.6 KiB
Bash

# Copyright 1999-2012 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_12.1/src/${P}-${RPM_VER}.src.rpm"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
#KEYWORDS=""
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
}