/[gentoo-x86]/sys-fs/device-mapper/device-mapper-1.02.27.ebuild
Gentoo

Contents of /sys-fs/device-mapper/device-mapper-1.02.27.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Oct 26 03:03:36 2008 UTC (5 years, 10 months ago) by vapier
Branch: MAIN
Changes since 1.1: +9 -9 lines
Enable pkg-config and tweak how we install into /lib #235256 by Xake.
(Portage version: 2.2_rc12/cvs/Linux 2.6.26.2 x86_64)

1 # Copyright 1999-2008 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.27.ebuild,v 1.1 2008/06/28 09:10:48 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 RDEPEND="!<sys-fs/udev-115-r1
19 ${DEPEND}"
20
21 S="${WORKDIR}/${PN}.${PV}"
22
23 src_unpack() {
24 unpack ${A}
25 EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/device-mapper-1.02.27-export-format.diff
26 }
27
28 src_compile() {
29 econf \
30 --libdir=/$(get_libdir) \
31 --sbindir=/sbin \
32 --enable-dmeventd \
33 --enable-pkgconfig \
34 $(use_enable selinux) \
35 CLDFLAGS="${LDFLAGS}" || die "econf failed"
36 emake || die "compile problem"
37 }
38
39 src_install() {
40 emake install DESTDIR="${D}" || die
41
42 dolib.a lib/ioctl/libdevmapper.a || die
43 gen_usr_ldscript libdevmapper.so
44 dolib.a dmeventd/libdevmapper-event.a || die
45 gen_usr_ldscript libdevmapper-event.so
46
47 insinto /etc
48 doins "${FILESDIR}"/dmtab || die
49 insinto /lib/rcscripts/addons
50 doins "${FILESDIR}"/dm-start.sh || die
51
52 newinitd "${FILESDIR}"/device-mapper.rc-1.02.22-r3 device-mapper || die
53 newconfd "${FILESDIR}"/device-mapper.conf-1.02.22-r3 device-mapper || die
54
55 newinitd "${FILESDIR}"/1.02.22-dmeventd.initd dmeventd || die
56
57 insinto /etc/udev/rules.d
58 newins "${FILESDIR}"/64-device-mapper.rules-1.02.22-r5 64-device-mapper.rules
59
60 dodoc INSTALL INTRO README VERSION WHATS_NEW
61 }
62
63 pkg_preinst() {
64 local l="${ROOT}"/$(get_libdir)/libdevmapper.so.1.01
65 [[ -e ${l} ]] && cp "${l}" "${D}"/$(get_libdir)/
66 }
67
68 pkg_postinst() {
69 preserve_old_lib_notify /$(get_libdir)/libdevmapper.so.1.01
70
71 elog "device-mapper volumes are no longer automatically created for"
72 elog "baselayout-2 users. If you are using baselayout-2, be sure to"
73 elog "run: # rc-update add device-mapper boot"
74 }

  ViewVC Help
Powered by ViewVC 1.1.20