aboutsummaryrefslogtreecommitdiffstats
path: root/main/ocfs2-tools/APKBUILD
blob: 36974afd8126f48985fd8a6646e9d2269dd23325 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Contributor:
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ocfs2-tools
pkgver=1.6.4
pkgrel=1
pkgdesc="Oracle Cluster File System 2 utilities"
url="http://oss.oracle.com/projects/ocfs2-tools"
arch="all"
license="GPL2"
depends=
depends_dev="e2fsprogs-dev glib-dev ncurses-dev readline-dev"
makedepends="$depends_dev"
install=
subpackages="$pkgname-dev $pkgname-doc"
source="http://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v${pkgver%.*}/$pkgname-$pkgver.tar.gz
	build.patch
	$pkgname.initd
	$pkgname.confd
	$pkgname.cluster-conf
	ocfs2-tools-1.6-operations-missing-include.patch"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	local i
	for i in ../*.patch
	do
		msg "Applying patch $i"
		patch -p1 -i $i || return 1
	done

	sed -i 's%sys/raw.h%linux/raw.h%' fswreck/include/main.h || return 1
	sed -i 's%sys/raw.h%linux/raw.h%' debugfs.ocfs2/include/main.h || return 1
	sed -i 's%sys/raw.h%linux/raw.h%' o2info/operations.c || return 1
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-ocfs2console=yes \
		--enable-dynamic-fsck=yes \
		--enable-dynamic-ctl=yes \
		--disable-glibtest || return 1
	make -j1 || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install

	# remove the 2 lines below (and this) if there is no init.d script
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/o2cb
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/o2cb
	install -m644 -D "$srcdir"/$pkgname.cluster-conf "$pkgdir"/etc/ocfs2/cluster.conf
}

md5sums="2e94423507b63fcc08f93c094e789be8  ocfs2-tools-1.6.4.tar.gz
c938040f0e77a4bb23e952c8f99b6cc5  build.patch
601fbd79acdc52a9046293aa977b1547  ocfs2-tools.initd
d81b6ab068ec92a137b58c9ad56c4637  ocfs2-tools.confd
189e433cf001465f1565faae2e6e10ac  ocfs2-tools.cluster-conf
f1d6bd7f02e69b31b8a103d18c7209f6  ocfs2-tools-1.6-operations-missing-include.patch"