PKGBUILDs/core/lvm2/PKGBUILD

60 lines
2 KiB
Bash
Raw Normal View History

2009-10-10 02:17:35 +00:00
# Maintainer: Eric Belanger <eric@archlinux.org>
pkgname=('lvm2' 'device-mapper')
pkgver=2.02.53
_pkgverdm=1.02.38
_pkgverlvm=${pkgver}
pkgrel=1
2009-10-24 02:26:18 +00:00
arch=('arm')
2009-10-10 02:17:35 +00:00
url="http://sourceware.org/lvm2/"
license=('GPL')
groups=('base')
2009-10-24 02:26:18 +00:00
source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${_pkgverlvm}.tgz
lvm2_install
lvm2_hook
device-mapper.rules)
md5sums=('f9ae3579bf15467b7f1d7aea8b9ed9b3'
'40dccdb1044f00fc1e29ca549933d4bd'
'd6f3ca901747c386aa0d842e9ea64413'
'065f32a36947e6183722ed9aef13dc0c')
2009-10-10 02:17:35 +00:00
build() {
cd "${srcdir}/LVM2.${_pkgverlvm}"
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-readline \
--enable-pkgconfig --enable-static_link --with-staticdir=/sbin || return 1
make || return 1
}
package_device-mapper() {
pkgdesc="Device mapper userspace library and tools"
url="http://sourceware.org/dm/"
depends=('glibc' 'readline')
cd "${srcdir}/LVM2.${_pkgverlvm}"
make DESTDIR="${pkgdir}" sbindir="${pkgdir}/sbin" \
libdir="${pkgdir}/lib" install_device-mapper || return 1
# install the static library in /usr/lib
rm "${pkgdir}"/lib/libdevmapper.a*
install -D -m644 libdm/ioctl/libdevmapper.a "${pkgdir}/usr/lib/libdevmapper.a" || return 1
# install udev rule
install -D -m644 "${srcdir}/device-mapper.rules" "${pkgdir}/etc/udev/rules.d/device-mapper.rules" || return 1
# fix device-mapper link bug
ln -sf /lib/libdevmapper.so "${pkgdir}/usr/lib/libdevmapper.so" || return 1
}
package_lvm2() {
pkgdesc="Logical Volume Manager 2 utilities"
depends=('bash' "device-mapper>=${_pkgverdm}")
conflicts=('lvm')
backup=('etc/lvm/lvm.conf')
options=('!makeflags')
cd "${srcdir}/LVM2.${_pkgverlvm}"
make DESTDIR="${pkgdir}" sbindir="${pkgdir}/sbin" install_lvm2 || return 1
install -d "${pkgdir}"/etc/lvm/{archive,backup} || return 1
# add hook
install -D -m644 "${srcdir}/lvm2_hook" "${pkgdir}/lib/initcpio/hooks/lvm2" || return 1
install -D -m644 "${srcdir}/lvm2_install" "${pkgdir}/lib/initcpio/install/lvm2" || return 1
}