summaryrefslogtreecommitdiffstats
path: root/main/lvm2
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
commit2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd (patch)
treea63d3b3b1c89018b5419358eed5c2bb0acf1cd92 /main/lvm2
parente374901731eb35599bd6735de4dd38560e3a79b8 (diff)
downloadaports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.bz2
aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.xz
move core/* to main/
added maintainer to several packages as well
Diffstat (limited to 'main/lvm2')
-rw-r--r--main/lvm2/APKBUILD35
-rw-r--r--main/lvm2/lvm.initd33
2 files changed, 68 insertions, 0 deletions
diff --git a/main/lvm2/APKBUILD b/main/lvm2/APKBUILD
new file mode 100644
index 000000000..d113a383c
--- /dev/null
+++ b/main/lvm2/APKBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lvm2
+pkgver=2.02.48
+pkgrel=0
+pkgdesc="Logical Volume Manager 2 utilities"
+url="http://sourceware.org/lvm2/"
+license="GPL"
+depends=
+makedepends="readline-dev"
+source="ftp://sources.redhat.com/pub/$pkgname/LVM2.$pkgver.tgz
+ lvm.initd
+ "
+subpackages="$pkgname-dev $pkgname-doc"
+
+build () {
+ cd "$srcdir"/LVM2.$pkgver
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/lib \
+ --sbindir=/sbin \
+ --localstatedir=/var \
+ --disable-nls \
+ CLDFLAGS="$LDFLAGS" \
+ || return 1
+
+ # TODO: fix parallel builds
+ make -j1 || return 1
+ make -j1 DESTDIR="$pkgdir" install || return 1
+
+ install -d "$pkgdir"/etc/lvm/archive "$pkgdir"/etc/lvm/backup
+ install -Dm755 "$srcdir"/lvm.initd "$pkgdir"/etc/init.d/lvm
+}
+md5sums="0d24c2709f439eeca36261e5cea68330 LVM2.2.02.48.tgz
+e60d88f78eedb9c1252deb5b9b9b978b lvm.initd"
diff --git a/main/lvm2/lvm.initd b/main/lvm2/lvm.initd
new file mode 100644
index 000000000..022cbb1e0
--- /dev/null
+++ b/main/lvm2/lvm.initd
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+
+dm_in_proc() {
+ local rc=0 i=
+ for i in devices misc; do
+ grep -qs 'device-mapper' /proc/$i
+ rc=$(($rc + $?))
+ done
+ return $rc
+}
+
+start() {
+ local rc=0 msg=
+ ebegin "Setting up the Logical Volume Manager"
+ if [ -e /proc/modules ] && ! dm_in_proc; then
+ modprobe dm-mod 2>/dev/null
+ fi
+ if [ -d /proc/lvm ] || dm_in_proc; then
+ vgscan --mknodes --ignorelockingfailure >/dev/null 2>&1 &&\
+ vgchange --ignorelockingfailure -a y >/dev/null 2>&1
+ rc=$?
+ else
+ rc=1
+ fi
+ eend $rc
+}
+
+stop() {
+ ebegin "Shutting down the Logical Volume Manager"
+ vgchange --ignorelockingfailure -a n >/dev/null 2>&1
+ eend $?
+}
+