# Maintainer: Natanael Copa pkgname=lvm2 pkgver=2.02.131 pkgrel=1 pkgdesc="Logical Volume Manager 2 utilities" url="http://sourceware.org/lvm2/" arch="all" license="GPL" depends= depends_dev="linux-headers" makedepends="$depends_dev" source="ftp://sources.redhat.com/pub/$pkgname/LVM2.$pkgver.tgz fix-stdio-usage.patch mallinfo.patch library_dir-default-config.patch mlockall-default-config.patch lvm.initd lvm.confd dmeventd.initd " subpackages="$pkgname-dev $pkgname-doc $pkgname-dmeventd device-mapper:dm $pkgname-libs" _builddir="$srcdir/LVM2.$pkgver" prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build () { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --libdir=/lib \ --sbindir=/sbin \ --localstatedir=/var \ --disable-nls \ --disable-readline \ --enable-pkgconfig \ --enable-applib \ --with-thin=internal \ --enable-dmeventd \ --enable-cmdlib \ --with-thin-check=/sbin/thin_check \ --with-thin-dump=/sbin/thin_dump \ --with-thin-repair=/sbin/thin_repair \ --with-dmeventd-path=/sbin/dmeventd \ CLDFLAGS="$LDFLAGS" \ || return 1 # TODO: fix parallel builds make || return 1 } package() { cd "$_builddir" 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 } dmeventd() { pkgdesc="Device-mapper event daemon" mkdir -p "$subpkgdir"/sbin mv "$pkgdir"/sbin/dmeventd "$subpkgdir"/sbin/ install -Dm755 "$srcdir"/dmeventd.initd "$subpkgdir"/etc/init.d/dmeventd } 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="ae0d8004b9753b87054ae5178b22f57c LVM2.2.02.131.tgz 2395ae17f924ebf25e9737d02f758f8f fix-stdio-usage.patch 3f4a9d57620f240f6bf389c1debc2ba5 mallinfo.patch d718e3301f035ebd2e2bbf25df34e817 library_dir-default-config.patch 42ad8de153db667e82ae2e1cd711761f mlockall-default-config.patch cdefa1dbd95caabbf92198764f18a54e lvm.initd ec36d5fe4561220304e406c5c797e71f lvm.confd 3bec717f7092c1934909962d38038eb3 dmeventd.initd" sha256sums="adc315228c96f7b77c37310c47fbc43358915194af54652b9d20ccd3b8c0d267 LVM2.2.02.131.tgz 79c5379cbf660f8dabd45359463c77a40b5a83153b54c67ce36049260dac9071 fix-stdio-usage.patch 40d2def3e99c13e3ecbaeb79bb863f42e7ae0e47762ebbc0d025962022a6dc3c mallinfo.patch 303e19a3933c9ad48112dd3c7ae0dfd86e12b88593c7508d745ba2a885286ffb library_dir-default-config.patch 8a490eccf4ea951fea0bbf2921657286f5d92a41cf74ae8ad7d9a8f756b1db9e mlockall-default-config.patch 9eea2a296d63794f6200351a625d317e028c0cafcbb6ad6083ea98acc5454e29 lvm.initd e2ff57977ace6098e1a2efc8a1f6796e8bf6e5dd148e4c105bb647ffc6f79230 lvm.confd 05fad3581e8c22ecd81c78aa97fd79b521e622963d519d2d200a06823007d48d dmeventd.initd" sha512sums="c1065727e2fa756e462e55c2cb85414773fae04d195fd9dea3c085301691b6c3a4cad65196f1050ee46098e127586034f5e8210331029f46f5eddb328d79b307 LVM2.2.02.131.tgz c4d55b366a60926baadf431dd382012eb808490c0bb514e01503d526cfd7ae573efa2d60a92bd5f6f451b54b11fb5cf827f45cec35cfcdee6aa291674cc776dd fix-stdio-usage.patch 9272ec8c5184ef5dc776ead8f74132e072b7563b5119a3a38b712f00d92a1e3878c9b3a54eb2b01dcba038110c686b39d4c17ecd0eb258537e9217d7ed03c408 mallinfo.patch 33004594a5cce7af1e493a2a66ce8ad2f864dde3b2ec0960d0fda9df9b7bcf65d9455f9eccf7860f48726c48f14111b843b0a0c9bd395ef2952b41aaab8092b2 library_dir-default-config.patch 5ba7b2533db0c418f425fc9f97c775d0bb8b79c5bd488eb550a371238e7cc6929043b8196554fdd5b2bf8feab25625f2f27fff7aebae8f2f6ab13c1708474c51 mlockall-default-config.patch a853078660fd2fd943538924f56e81dc5793294e26b8f61d93e6188893f15f4a438d33792b341c1865d61e03f4a371b7c7ee0db5f4130ef7cb7aeaeb9290086a lvm.initd 07caf8fa942290f3c953cc2463aaf55bac01d0bcb9351daf3880fa4d0eefb67fe00761c46a7a4da91cd2f8e492a12fed35853a15dc939cd80d19d3303bc3951d lvm.confd ca06220065525e93347efb7a5746a367cf55cb03574e50eed29bd7c4eae036bdd199b52c42d81811b6e742649e73ab8e66525f663bed66f9d1d82d0efde50332 dmeventd.initd"