# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.74.ebuild,v 1.2 2011/11/30 04:35:37 vapier Exp $ EAPI=2 inherit eutils multilib toolchain-funcs autotools linux-info DESCRIPTION="User-land utilities for LVM2 (device-mapper) software." HOMEPAGE="http://sources.redhat.com/lvm2/" SRC_URI="ftp://sources.redhat.com/pub/lvm2/${PN/lvm/LVM}.${PV}.tgz ftp://sources.redhat.com/pub/lvm2/old/${PN/lvm/LVM}.${PV}.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" IUSE="readline +static clvm cman +lvm1 selinux" DEPEND_COMMON="!!sys-fs/device-mapper readline? ( sys-libs/readline ) clvm? ( =sys-cluster/dlm-2* cman? ( =sys-cluster/cman-2* ) ) >=sys-fs/udev-151-r4" RDEPEND="${DEPEND_COMMON} !=sys-apps/util-linux-2.16" # Upgrading to this LVM will break older cryptsetup RDEPEND="${RDEPEND} ! /$(get_libdir) #X#mv -f "${D}"/usr/lib/lib*.so* "${D}"/$(get_libdir) #X#[[ "$(get_libdir)" != "lib" ]] && \ #X# mv "${D}"/usr/$(get_libdir)/lib*.so* "${D}"/$(get_libdir) #X## .a -> /usr/$(get_libdir) #X#[[ "$(get_libdir)" != "lib" ]] && \ #X# mv -f "${D}"/usr/lib/lib*.a "${D}"/usr/$(get_libdir) #X## The upstream symlinks are borked. lets rebuild them instead. #X#find "${D}"/{usr,}/{lib,$(get_libdir)} -type l \ #X# | xargs rm -f 2>/dev/null #X#for i in "${D}"/$(get_libdir)/*.so.* ; do #X# b="${i//*\/}" o="${b/.so.*/.so}" #X# ln -s "${b}" "${D}/$(get_libdir)/${o}" #X#done #X## Now enable building properly #X#for i in \ #X# libdevmapper-event{,-lvm2{,mirror,snapshot}} \ #X# libdevmapper \ #X# liblvm2{format1,snapshot,cmd,app} \ #X# ; do #X# gen_usr_ldscript ${i}.so || die #X#done dodoc README VERSION WHATS_NEW doc/*.{conf,c,txt} insinto /$(get_libdir)/rcscripts/addons newins "${FILESDIR}"/lvm2-start.sh-2.02.67-r1 lvm-start.sh || die newins "${FILESDIR}"/lvm2-stop.sh-2.02.67-r1 lvm-stop.sh || die newinitd "${FILESDIR}"/lvm.rc-2.02.67-r1 lvm || die newinitd "${FILESDIR}"/lvm-monitoring.initd-2.02.67-r2 lvm-monitoring || die newconfd "${FILESDIR}"/lvm.confd-2.02.28-r2 lvm || die if use clvm; then newinitd "${FILESDIR}"/clvmd.rc-2.02.39 clvmd || die newconfd "${FILESDIR}"/clvmd.confd-2.02.39 clvmd || die fi # move shared libs to /lib(64) dolib.a libdm/ioctl/libdevmapper.a || die "dolib.a libdevmapper.a" #gen_usr_ldscript libdevmapper.so dosbin "${S}"/scripts/lvm2create_initrd/lvm2create_initrd doman "${S}"/scripts/lvm2create_initrd/lvm2create_initrd.8 newdoc "${S}"/scripts/lvm2create_initrd/README README.lvm2create_initrd insinto /etc doins "${FILESDIR}"/dmtab insinto /$(get_libdir)/rcscripts/addons doins "${FILESDIR}"/dm-start.sh # Device mapper stuff newinitd "${FILESDIR}"/device-mapper.rc-2.02.67-r1 device-mapper || die newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper || die newinitd "${FILESDIR}"/dmeventd.initd-2.02.67-r1 dmeventd || die dolib.a daemons/dmeventd/libdevmapper-event.a \ || die "dolib.a libdevmapper-event.a" #gen_usr_ldscript libdevmapper-event.so #insinto /etc/udev/rules.d/ #newins "${FILESDIR}"/64-device-mapper.rules-2.02.56-r3 64-device-mapper.rules || die # do not rely on /lib -> /libXX link sed -e "s-/lib/rcscripts/-/$(get_libdir)/rcscripts/-" -i "${D}"/etc/init.d/* elog "USE flag nocman is deprecated and replaced" elog "with the cman USE flag." elog "" elog "USE flags clvm and cman are masked" elog "by default and need to be unmasked to use them" elog "" elog "If you are using genkernel and root-on-LVM, rebuild the initramfs." } pkg_postinst() { elog "lvm volumes are no longer automatically created for" elog "baselayout-2 users. If you are using baselayout-2, be sure to" elog "run: # rc-update add lvm boot" elog "Do NOT add it if you are using baselayout-1 still." } src_test() { einfo "Testcases disabled because of device-node mucking" einfo "If you want them, compile the package and see ${S}/tests" }