# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/freebsd-usbin-9.0.ebuild,v 1.3 2012/04/26 14:33:24 aballier Exp $ EAPI=2 inherit bsdmk freebsd flag-o-matic eutils DESCRIPTION="FreeBSD /usr/sbin tools" SLOT="0" KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" SRC_URI="mirror://gentoo/${P}.tar.bz2 mirror://gentoo/${CONTRIB}.tar.bz2 mirror://gentoo/${UBIN}.tar.bz2 mirror://gentoo/${LIB}.tar.bz2 mirror://gentoo/${SBIN}.tar.bz2 mirror://gentoo/${ETC}.tar.bz2 mirror://gentoo/${GNU}.tar.bz2 nis? ( mirror://gentoo/${LIBEXEC}.tar.bz2 ) build? ( mirror://gentoo/${SYS}.tar.bz2 mirror://gentoo/${INCLUDE}.tar.bz2 )" RDEPEND="=sys-freebsd/freebsd-lib-${RV}*[usb?,bluetooth?,netware?] =sys-freebsd/freebsd-libexec-${RV}* =sys-freebsd/freebsd-contrib-${RV}* acpi? ( sys-power/iasl ) build? ( sys-apps/baselayout ) ssl? ( dev-libs/openssl ) >=app-arch/libarchive-3 sys-apps/tcp-wrappers dev-util/dialog dev-libs/libelf >=dev-libs/libedit-20120311.3.0-r1 net-libs/libpcap" DEPEND="${RDEPEND} =sys-freebsd/freebsd-mk-defs-${RV}* =sys-freebsd/freebsd-ubin-${RV}* !build? ( =sys-freebsd/freebsd-sources-${RV}* ) sys-apps/texinfo sys-devel/flex" S="${WORKDIR}/usr.sbin" IUSE="acpi atm audit bluetooth floppy ipv6 isdn minimal netware nis pam ssl usb build" pkg_setup() { # Release crunch is something like minimal. It seems to remove everything # which is not needed to work. use minimal && mymakeopts="${mymakeopts} RELEASE_CRUNCH= " use acpi || mymakeopts="${mymakeopts} WITHOUT_ACPI= " use atm || mymakeopts="${mymakeopts} WITHOUT_ATM= " use audit || mymakeopts="${mymakeopts} WITHOUT_AUDIT= " use bluetooth || mymakeopts="${mymakeopts} WITHOUT_BLUETOOTH= " use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6= WITHOUT_INET6_SUPPORT= " use isdn || mymakeopts="${mymakeopts} WITHOUT_I4B= " use netware || mymakeopts="${mymakeopts} WITHOUT_IPX= WITHOUT_IPX_SUPPORT= WITHOUT_NCP= " use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= " use pam || mymakeopts="${mymakeopts} WITHOUT_PAM_SUPPORT= " use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= " use usb || mymakeopts="${mymakeopts} WITHOUT_USB= " use floppy || mymakeopts="${mymakeopts} WITHOUT_FLOPPY= " mymakeopts="${mymakeopts} WITHOUT_BIND_NAMED= WITHOUT_BIND_DNSSEC= WITHOUT_PF= WITHOUT_LPR= WITHOUT_SENDMAIL= WITHOUT_AUTHPF= WITHOUT_MAILWRAPPER= " append-flags $(test-flags -fno-strict-aliasing) } PATCHES=( "${FILESDIR}/${PN}-adduser.patch" "${FILESDIR}/${PN}-9.0-newsyslog.patch" ) REMOVE_SUBDIRS=" named named-checkzone named-checkconf rndc rndc-confgen dnssec-keygen dnssec-signzone tcpdchk tcpdmatch sendmail praliases editmap mailstats makemap sysinstall cron mailwrapper ntp bsnmpd tcpdump ndp inetd wpa/wpa_supplicant wpa/hostapd wpa/hostapd_cli wpa/wpa_cli wpa/wpa_passphrase zic amd pkg_install freebsd-update" src_prepare() { if ! use build; then ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys" ln -s "/usr/include" "${WORKDIR}/include" else dummy_mk mount_smbfs fi # Don't install mtree format manpage # it's installed by libarchive. sed -e "s: mtree.5::g" -i "${S}"/mtree/Makefile } src_install() { # By creating these directories we avoid having to do a # more complex hack dodir /usr/share/doc dodir /sbin dodir /usr/libexec dodir /usr/bin # FILESDIR is used by some makefiles which will install files # in the wrong place, just put it in the doc directory. mkinstall DOCDIR=/usr/share/doc/${PF} || die "Install failed" # Most of these now come from openrc. for util in nfs rpc.statd rpc.lockd; do newinitd "${FILESDIR}/"${util}.initd ${util} || die if [[ -e "${FILESDIR}"/${util}.confd ]]; then \ newconfd "${FILESDIR}"/${util}.confd ${util} || die fi done for class in daily monthly weekly; do cat - > "${T}/periodic.${class}" <