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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Apr 8 19:21:31 2010 UTC (4 years, 8 months ago) by ssuominen
Branch: MAIN
Changes since 1.2: +3 -3 lines
Fix LICENSE to include also LGPL-2.1 wrt #263611 by Justin Bronder.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2010 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.28.ebuild,v 1.2 2009/12/21 13:26:05 ssuominen 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 LGPL-2.1"
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 \
26 "${FILESDIR}"/device-mapper-1.02.27-export-format.diff \
27 "${FILESDIR}"/${P}-asneeded.patch
28 }
29
30 src_compile() {
31 econf \
32 --sbindir=/sbin \
33 --enable-dmeventd \
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 # move shared libs to /
43 mv "${D}"/usr/$(get_libdir) "${D}"/ || die "move libdir"
44 dolib.a lib/ioctl/libdevmapper.a || die "dolib.a"
45 gen_usr_ldscript libdevmapper.so
46
47 insinto /etc
48 doins "${FILESDIR}"/dmtab
49 insinto /lib/rcscripts/addons
50 doins "${FILESDIR}"/dm-start.sh
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 dolib.a dmeventd/libdevmapper-event.a || die
57 gen_usr_ldscript libdevmapper-event.so
58
59 insinto /etc/udev/rules.d/
60 newins "${FILESDIR}"/64-device-mapper.rules-1.02.22-r5 64-device-mapper.rules
61
62 dodoc INSTALL INTRO README VERSION WHATS_NEW
63 }
64
65 pkg_preinst() {
66 local l="${ROOT}"/$(get_libdir)/libdevmapper.so.1.01
67 [[ -e ${l} ]] && cp "${l}" "${D}"/$(get_libdir)/
68 }
69
70 pkg_postinst() {
71 preserve_old_lib_notify /$(get_libdir)/libdevmapper.so.1.01
72
73 elog "device-mapper volumes are no longer automatically created for"
74 elog "baselayout-2 users. If you are using baselayout-2, be sure to"
75 elog "run: # rc-update add device-mapper boot"
76 }

  ViewVC Help
Powered by ViewVC 1.1.20