# $Id$ PNAME="util-linux" PVER="2.20.1" PBUILD="r1" PCATEGORIE="sys-apps" DESCRIPTION="Various useful Linux utilities." HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux-ng/" DEPEND=">= virtual/glibc >= sys-libs/ncurses-5.9 >= sys-fs/e2fsprogs-1.41" SDEPEND=">= virtual/kernel-headers >= sys-apps/sed-4 >= sys-dev/gettext-0.18" SRCFILE="${PNAME}-${PVER/_/-}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER/_/-}" sminclude mtools multilib SRC_URI=( http://www.kernel.org/pub/linux/utils/${PNAME}-ng/v${PVER/%.?/}/${SRCFILE} http://www.kernel.org/pub/linux/utils/${PNAME}-ng/v${PVER/%_*/}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd \"${HOMEPAGE}/v\$(updatecmd ${HOMEPAGE} | grep v.*/ | sed -n 's/.*v\(.*\)\/.*/\1/;$ p')/?C=M;O=A\" | grep -v 'rc' | lasttarball" src_prepare() { munpack ${SRCFILE} || die # fhs compatibility all-abis sed -i 's:etc/adjtime:var/lib/hwclock/adjtime:' hwclock/hwclock.c || die # regen configure autoreconf --verbose --install --force || die } src_compile() { # enabled libmount-mount to utilize mount with a mtab symlink # which is needed by systemd # we are using blkid from util linux now (--with-fsprobe=built --enable-fsck) # which merges the old blkid from e2fsprogs and udevs libvolume # see: http://lists.freedesktop.org/archives/hal-commit/2009-May/004936.html mconfigure \ --without-pam \ --with-fsprobe=builtin \ --enable-nls \ --enable-agetty \ --enable-cramfs \ --enable-partx \ --enable-raw \ --enable-rdev \ --enable-rename \ --enable-schedutils \ --enable-write \ --disable-reset \ --disable-login-utils \ --disable-init \ --disable-kill \ --disable-last \ --disable-mesg \ --disable-wall \ --enable-fsck \ --enable-libmount-mount \ --disable-silent-rules \ || die mmake || die } src_install() { # needed directories mkeepdir /var/lib/hwclock || die mmake DESTDIR=${BINDIR} install || die minstalldocs HISTORY MAINTAINER README VERSION || die } preinstall() { if [[ ! -z $(magequery -n linux32) ]] then echo -e ${COLRED} echo -e "Error: dev-util/linux32 is installed!!" echo -e "linux32 is now provided by util-linux and doesn't need an extra package anymore." echo -e "Please uninstall dev-util/linux32 first!" echo -e ${COLDEFAULT} die "dev-util/linux32 found!" fi }