| 1 |
# Copyright 1999-2005 Gentoo Technologies, Inc.
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header$
|
| 4 |
|
| 5 |
inherit freebsd-utils flag-o-matic eutils
|
| 6 |
|
| 7 |
DESCRIPTION="FreeBSD /usr/sbin tools"
|
| 8 |
HOMEPAGE="http://www.freebsd.org/"
|
| 9 |
SRC_URI="mirror://gentoo/${P}.tar.bz2
|
| 10 |
mirror://gentoo/${CONTRIB}.tar.bz2
|
| 11 |
mirror://gentoo/${UBIN}.tar.bz2
|
| 12 |
mirror://gentoo/${LIB}.tar.bz2
|
| 13 |
mirror://gentoo/${SBIN}.tar.bz2
|
| 14 |
mirror://gentoo/${LIBEXEC}.tar.bz2
|
| 15 |
mirror://gentoo/${GNU}.tar.bz2"
|
| 16 |
|
| 17 |
LICENSE="BSD"
|
| 18 |
SLOT="0"
|
| 19 |
KEYWORDS="~x86-fbsd"
|
| 20 |
IUSE="atm bluetooth crypt ssl usb ipv6
|
| 21 |
pf acpi lpr ipfilter isdn pam ssl radius netgraph minimal suid ipsec nis
|
| 22 |
pam suid nat radius"
|
| 23 |
DEPEND="=sys-devel/freebsd-mk-defs-5.4*
|
| 24 |
=sys-libs/freebsd-lib-5.4*
|
| 25 |
=sys-libs/freebsd-libexec-5.4*
|
| 26 |
=sys-kernel/freebsd-sources-5.4*
|
| 27 |
=sys-kernel/freebsd-headers-5.4*
|
| 28 |
ssl? ( dev-libs/openssl )
|
| 29 |
sys-apps/texinfo
|
| 30 |
sys-devel/flex
|
| 31 |
net-libs/libpcap"
|
| 32 |
PROVIDE="lpr? virtual/lpr"
|
| 33 |
|
| 34 |
S=${WORKDIR}/usr.sbin
|
| 35 |
|
| 36 |
pkg_setup() {
|
| 37 |
# Release crunch is something like minimal. It seems to remove everything
|
| 38 |
# which is not needed to work.
|
| 39 |
use minimal && mymakeopts="${mymakeopts} RELEASE_CRUNCH= "
|
| 40 |
|
| 41 |
use atm || mymakeopts="${mymakeopts} NOATM= "
|
| 42 |
use bluetooth || mymakeopts="${mymakeopts} NO_BLUETOOTH= "
|
| 43 |
use ipv6 || mymakeopts="${mymakeopts} NOINET6= "
|
| 44 |
use ipfilter || mymakeopts="${mymakeopts} NO_IPFILTER= "
|
| 45 |
use pf || mymakeopts="${mymakeopts} NO_PF= NO_AUTHPF= "
|
| 46 |
use lpr || mymakeopts="${mymakeopts} NO_LPR= "
|
| 47 |
use crypt || mymakeopts="${mymakeopts} NOCRYPT= "
|
| 48 |
use ssl || mymakeopts="${mymakeopts} NO_OPENSSL= NOCRYPT= "
|
| 49 |
use usb || mymakeopts="${mymakeopts} NO_USB= "
|
| 50 |
use acpi || mymakeopts="${mymakeopts} NO_ACPI= "
|
| 51 |
use isdn || mymakeopts="${mymakeopts} NO_I4B= "
|
| 52 |
use pam || mymakeopts="${mymakeopts} NOPAM= "
|
| 53 |
use ssl || mymakeopts="${mymakeopts} NO_OPENSSL= "
|
| 54 |
use radius || mymakeopts="${mymakeopts} NORADIUS= "
|
| 55 |
use suid || mymakeopts="${mymakeopts} NOSUID= "
|
| 56 |
use ipsec || mymakeopts="${mymakeopts} NOIPSEC= "
|
| 57 |
use nis || mymakeopts="${mymakeopts} NO_NIS= "
|
| 58 |
use nat || mymakeopts="${mymakeopts} NONAT= "
|
| 59 |
use pam || mymakeopts="${mymakeopts} NOPAM= "
|
| 60 |
use suid || mymakeopts="${mymakeopts} NOSUID= PPP_NOSUID= "
|
| 61 |
use radius || mymakeopts="${mymakeopts} NORADIUS= "
|
| 62 |
|
| 63 |
mymakeopts="${mymakeopts} NO_MAILWRAPPER= NO_BIND= NO_SENDMAIL= "
|
| 64 |
}
|
| 65 |
|
| 66 |
src_unpack() {
|
| 67 |
unpack ${A}
|
| 68 |
|
| 69 |
epatch ${FILESDIR}/${PN}-fixmakefiles.patch
|
| 70 |
epatch ${FILESDIR}/${PN}-minimal.patch
|
| 71 |
epatch ${FILESDIR}/${PN}-flex.patch
|
| 72 |
epatch ${FILESDIR}/${PN}-nontp.patch
|
| 73 |
|
| 74 |
cd ${S}
|
| 75 |
epatch ${FILESDIR}/${PN}-5.3-r1-makefile-docpaths.patch
|
| 76 |
}
|
| 77 |
|
| 78 |
src_compile() {
|
| 79 |
filter-flags -fomit-frame-pointer
|
| 80 |
# kldxref does not build with -O2
|
| 81 |
replace-flags "-O?" "-O1"
|
| 82 |
|
| 83 |
einfo "Building package now"
|
| 84 |
cd ${S}
|
| 85 |
fmake || die "fmake failed"
|
| 86 |
}
|
| 87 |
|
| 88 |
src_install() {
|
| 89 |
# By creating these two directories we avoid having to do a
|
| 90 |
# more complex hack inside lpr/SMM.doc and nologin makefiles.
|
| 91 |
dodir /usr/share/doc
|
| 92 |
dodir /sbin
|
| 93 |
dodir /usr/libexec
|
| 94 |
|
| 95 |
# FILESDIR is used by some makefiles which will install files
|
| 96 |
# in the wrong place, just put it in the doc directory.
|
| 97 |
fmake DESTDIR=${D} DOCDIR=/usr/share/doc/${PF} install || die "Install failed"
|
| 98 |
|
| 99 |
newinitd ${FILESDIR}/nfs.initd nfs
|
| 100 |
newconfd ${FILESDIR}/nfs.confd nfs
|
| 101 |
newinitd ${FILESDIR}/nfsmount.initd nfsmount
|
| 102 |
newinitd ${FILESDIR}/rpcbind.initd rpcbind
|
| 103 |
}
|