# Maintainer: Natanael Copa pkgname=lvm2 pkgver=2.02.80 pkgrel=0 pkgdesc="Logical Volume Manager 2 utilities" url="http://sourceware.org/lvm2/" arch="all" license="GPL" depends= makedepends="pkgconfig" source="ftp://sources.redhat.com/pub/$pkgname/LVM2.$pkgver.tgz lvm.initd lvm.confd " subpackages="$pkgname-dev $pkgname-doc device-mapper:dm $pkgname-libs" build () { cd "$srcdir"/LVM2.$pkgver ./configure --prefix=/usr \ --sysconfdir=/etc \ --libdir=/lib \ --sbindir=/sbin \ --localstatedir=/var \ --disable-nls \ --disable-readline \ --enable-pkgconfig \ --enable-applib \ CLDFLAGS="$LDFLAGS" \ || return 1 # TODO: fix parallel builds make -j1 || return 1 } package() { cd "$srcdir"/LVM2.$pkgver make -j1 DESTDIR="$pkgdir" \ install || return 1 #usrlibdir="$pkgdir"/lib \ install -d "$pkgdir"/etc/lvm/archive "$pkgdir"/etc/lvm/backup install -Dm755 "$srcdir"/lvm.initd "$pkgdir"/etc/init.d/lvm install -Dm644 "$srcdir"/lvm.confd "$pkgdir"/etc/conf.d/lvm cd "$pkgdir"/lib || return 1 ln -s libdevmapper.so.1.02 libdevmapper.so || return 1 } dm() { pkgdesc="Device mapper userspace library and tools from LVM2" mkdir -p "$subpkgdir"/sbin "$subpkgdir"/lib mv "$pkgdir"/lib/libdevmapper.so.* "$subpkgdir"/lib/ mv "$pkgdir"/sbin/dm* "$subpkgdir"/sbin/ } libs() { pkgdesc="LVM2 shared libraries" mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/liblvm2*.so.* "$subpkgdir"/lib/ } md5sums="816f4cee75674e3a21fd40f1961279f2 LVM2.2.02.80.tgz 6f65f902cf19f144a42b8d6aceadf395 lvm.initd ec36d5fe4561220304e406c5c797e71f lvm.confd"