| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/device-mapper/device-mapper-1.02.19.ebuild,v 1.11 2007/10/08 22:16:40 robbat2 Exp $
|
| 4 |
|
| 5 |
inherit eutils multilib toolchain-funcs
|
| 6 |
|
| 7 |
DESCRIPTION="Device mapper ioctl library for use with LVM2 utilities"
|
| 8 |
HOMEPAGE="http://sources.redhat.com/dm/"
|
| 9 |
SRC_URI="ftp://sources.redhat.com/pub/dm/${PN}.${PV}.tgz
|
| 10 |
ftp://sources.redhat.com/pub/dm/old/${PN}.${PV}.tgz"
|
| 11 |
|
| 12 |
LICENSE="GPL-2"
|
| 13 |
SLOT="0"
|
| 14 |
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
|
| 15 |
IUSE="selinux"
|
| 16 |
|
| 17 |
DEPEND="selinux? ( sys-libs/libselinux )"
|
| 18 |
|
| 19 |
S=${WORKDIR}/${PN}.${PV}
|
| 20 |
|
| 21 |
src_compile() {
|
| 22 |
econf --sbindir=/sbin $(use_enable selinux) || die "econf failed"
|
| 23 |
emake || die "compile problem"
|
| 24 |
}
|
| 25 |
|
| 26 |
src_install() {
|
| 27 |
make install DESTDIR="${D}" || die
|
| 28 |
|
| 29 |
# move shared libs to /
|
| 30 |
mv "${D}"/usr/$(get_libdir) "${D}"/ || die "move libdir"
|
| 31 |
dolib.a lib/ioctl/libdevmapper.a || die "dolib.a"
|
| 32 |
gen_usr_ldscript libdevmapper.so
|
| 33 |
|
| 34 |
insinto /etc
|
| 35 |
doins "${FILESDIR}"/dmtab
|
| 36 |
insinto /lib/rcscripts/addons
|
| 37 |
doins "${FILESDIR}"/dm-start.sh
|
| 38 |
|
| 39 |
newinitd "${FILESDIR}"/device-mapper.rc device-mapper || die
|
| 40 |
|
| 41 |
dodoc INSTALL INTRO README VERSION WHATS_NEW
|
| 42 |
}
|
| 43 |
|
| 44 |
pkg_preinst() {
|
| 45 |
local l=${ROOT}/$(get_libdir)/libdevmapper.so.1.01
|
| 46 |
[[ -e ${l} ]] && cp "${l}" "${D}"/$(get_libdir)/
|
| 47 |
}
|
| 48 |
|
| 49 |
pkg_postinst() {
|
| 50 |
preserve_old_lib_notify /$(get_libdir)/libdevmapper.so.1.01
|
| 51 |
|
| 52 |
elog "device-mapper volumes are no longer automatically created for"
|
| 53 |
elog "baselayout-2 users. If you are using baselayout-2, be sure to"
|
| 54 |
elog "run: # rc-update add device-mapper boot"
|
| 55 |
}
|