# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 DESCRIPTION="Utility to manage hardware, network, power or other profiles" SRC_URI="mirror://sourceforge/hprofile/${P}.tar.gz" HOMEPAGE="http://hprofile.sf.net" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86 ~ppc ~sparc " DEPEND=">=app-shells/bash-2.0 >=app-admin/sudo-1.6" src_install() { # Install the executables dosbin scripts/* # Install the /etc/hprofile example dodir /etc/hprofile cp -Rd config/hprofile/* ${D}/etc/hprofile dosed "s:/usr/local/sbin/hpdet:/usr/sbin/hpdet:" /etc/hprofile/conf # Service scripts exeinto /etc/init.d doexe extra/rc-scripts/gentoo/* local initscript="" for initscript in extra/rc-scripts/gentoo/* ; do dosed "s:/usr/local/sbin/:/usr/sbin/:" /etc/init.d/${initscript##*/} done # Set up critical services, if necessary local critical="" if ! test -r /etc/runlevels/boot/.critical || ! grep "hprofile" /etc/runlevels/boot/.critical >/dev/null ; then echo "checkroot hprofile hostname modules checkfs localmount" > critical insinto /etc/runlevels/boot newins critical .critical fi # Documentation dodoc README COPYING } pkg_postinst() { einfo "Example profiles have been installed into /etc/hprofile/example-profiles" einfo "Initscripts have been been installed to /etc/init.d." einfo einfo "Scripts that should be run from the 'boot' runlevel:" einfo " - hprofile (applies the 'boot' profile)" einfo " - hprunlevel (switches to profile-specific runlevel)" einfo "Scripts that shoudl be run from your default runlevel:" einfo " - net.profile (applies the current 'net' profile)" einfo " - power-profile (applies the current 'power' profile)" einfo einfo "If you get an error message that 'hprunlevel' and 'local' have a" einfo "circular dependency of type 'iafter', this is not a problem, since" einfo "'hprunlevel' and 'local' are not started from the same runlevel" einfo einfo "Also note that the file /etc/runlevels/.critical has been created." einfo "This file contains the 'critical' boot services; since hprofile" einfo "should be started before modules (which is a critical service)," einfo "it must be mentioned in this file." }