/[gentoo-x86]/net-misc/resolvconf-gentoo/resolvconf-gentoo-0.2.ebuild
Gentoo

Contents of /net-misc/resolvconf-gentoo/resolvconf-gentoo-0.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri May 12 11:39:11 2006 UTC (13 years, 7 months ago) by uberlord
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Punt old versions
(Portage version: 2.1_pre10-r5)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/resolvconf-gentoo/resolvconf-gentoo-0.2.ebuild,v 1.1 2006/04/20 17:42:17 uberlord Exp $
4
5 DESCRIPTION="A framework for managing DNS information"
6 HOMEPAGE="http://www.gentoo.org"
7 SRC_URI="http://dev.gentoo.org/~uberlord/${PN}/${P}.tar.bz2"
8
9 LICENSE="GPL-2"
10 SLOT="0"
11 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
12 IUSE=""
13
14 DEPEND=""
15 RDEPEND="app-shells/bash"
16
17 pkg_setup() {
18 if ! grep -q "^uniqify()" "${ROOT}"/etc/init.d/functions.sh ; then
19 eerror "/etc/init.d/functions.sh does not supply the uniqify function"
20 eerror "Please upgrade to a baselayout that support it"
21 eerror "(baselayout-1.12.0_pre17 and later versions do)"
22 die "function uniqify does not exist"
23 fi
24 }
25
26 src_install() {
27 make ROOT="${D}" install || die "Failed to install"
28 }
29
30 pkg_postinst() {
31 if [[ ! -"L ${ROOT}/etc/resolv.conf" ]] \
32 || [[ $(readlink "${ROOT}/etc/resolv.conf") != \
33 "resolvconf/run/resolv.conf" ]] ; then
34 ewarn "resolvconf requires ${ROOT}/etc/resolv.conf to be a symbolic"
35 ewarn "to resolvconf/run/resolv.conf"
36 einfo "To set this up automatically type"
37 einfo " emerge --config =${PF}"
38 fi
39 }
40
41 pkg_config() {
42 cd "${ROOT}/etc"
43 if [[ -L resolv.conf && $(readlink resolv.conf) == \
44 "resolvconf/run/resolv.conf" ]] ; then
45 einfo "${ROOT}/etc/resolv.conf is already configured for ${PN}"
46 else
47 if [[ -e resolv.conf ]] ; then
48 einfo "Your existing resolv.conf is will be mapped to an"
49 einfo "interface called \"dummy\" in resolvconf. This will"
50 einfo "disappear when you reboot."
51 cp resolv.conf resolvconf/run/resolv.conf
52 [[ ! -d resolvconf/run/interfaces ]] \
53 && mkdir resolvconf/run/interfaces
54 cp resolv.conf resolvconf/run/interfaces/dummy
55 echo "dummy" > resolvconf/run/add_order
56 fi
57 rm -f resolv.conf
58 ln -snf resolvconf/run/resolv.conf .
59 einfo "${ROOT}/etc/resolv.conf is now correctly configured for ${PN}"
60 fi
61 }

  ViewVC Help
Powered by ViewVC 1.1.20