aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocfs2-tools/APKBUILD
blob: b27dce5db87819feb54b6a97b2c372e6ae3586fd (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
#
# TODO: Fix init script (remove bashisms)
pkgname=ocfs2-tools
pkgver=1.8.5
pkgrel=1
pkgdesc="Oracle Cluster File System 2 Core Tools"
url="https://oss.oracle.com/projects/ocfs2-tools"
arch="all"
license="GPL-2.0-only"
depends_dev="$pkgname=$pkgver-r$pkgrel glib-dev"
makedepends="$depends_dev autoconf automake e2fsprogs-dev libaio-dev libtool
	libtirpc-dev linux-headers ncurses-dev python2-dev py-gtk-dev readline-dev"
subpackages="$pkgname-dev $pkgname-doc ocfs2-console:_console"
source="$pkgname-$pkgver.tar.gz::https://github.com/markfasheh/$pkgname/archive/$pkgname-$pkgver.tar.gz
	o2cb.initd
	o2cb.confd
	cluster.conf
	musl-libocfs2-__bswap_constant_32.patch
	musl-o2info-atimensec.patch
	musl-sys-raw.h.patch
	fix-unknown-type-errcode_t.patch
	fix-operations-include-ioctl.patch
	fix-o2monitor-undeclared-PATH_MAX.patch
	ocfs2console-explicitly-specified-link-libraries.patch
	tunefs-remove-op_query.patch
	"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"

prepare() {
	cd "$builddir"

	update_config_guess
	update_config_sub
	default_prepare

	./autogen.sh
}

build() {
	cd "$builddir"

	# _GNU_SOURCE is needed for loff_t from fcntl.h; it's already defined
	# in many ocfs2-tools' sources, but after fcntl.h is included.
	export CFLAGS="$CFLAGS -D_GNU_SOURCE $(pkgconf --cflags libtirpc)"
	export LDFLAGS="$LDFLAGS $(pkgconf --cflags libtirpc)"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--disable-glibtest \
		--enable-ocfs2console=yes
	make -j1
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	find "$pkgdir"/usr/lib/python*/site-packages -name '*.so' -exec chmod +x {} +

	# FIXME: remove bashisms
	#install -m 755 -D "$srcdir"/o2cb.initd "$pkgdir"/etc/init.d/o2cb
	#install -m 644 -D "$srcdir"/o2cb.confd "$pkgdir"/etc/conf.d/o2cb
	install -m 644 -D "$srcdir"/cluster.conf "$pkgdir"/etc/ocfs2/cluster.conf
}

_console() {
	pkgdesc="GUI frontend for OCFS2 management"
	depends="$pkgname=$pkgver-r$pkgrel"

	cd "$pkgdir"
	_mv usr/sbin/ocfs2console "$subpkgdir"/usr/sbin/
	_mv usr/lib/python* "$subpkgdir"/usr/lib/
}

_mv() {
	local dest; for dest; do true; done  # get last argument
	mkdir -p "$dest"
	mv $@
}

sha512sums="94153af0570dafd60c4f6eb31d53ad222ec1e001acb1b29333cef3eafd0a134921566b8dcbd148b4b4af8067dd7419d5bd8d8cd3fef87ab0efcc6c8fb304d22d  ocfs2-tools-1.8.5.tar.gz
e6fd44358ba5a38446a8bea60c493f4ef9b7a2d7c0076116e91f0edabb66da1fd90be884a46052592f69e338887d4df5c7b7c0b01fadf837fdbc7906a96de52a  o2cb.initd
e510f08a9adc2d7c07e7b8a4d2c503c5a130a156ab1bf1cf45d8480dd94490968f718e966d0bae090a883ff36768e17971415f9905bd5dcf8632f16f7c0b931e  o2cb.confd
f844e5389e0b42d6f91a1335bd2ef4d2666e5b883c999d05acd3bc63ad901bc5838aa4da35bb1d069463d7cc7dcfa277dbaa938b5953e8d420a37cfbb30f24f3  cluster.conf
87ea579ddb4a6ae34c5b815fe9015dc0168cb267312f9ef3dccfd16cd65a1f13ef1275dda72308d952ca844e42a486c891340210c4757866f2caacd0d6d3a916  musl-libocfs2-__bswap_constant_32.patch
d1eb24086f71f22e0333f4c246389ce82c9b4540bb0a2d091f6deee7f563c7e5457a838937cd07f1b90359e9c215639aebcbc54c551fb0e9e3617f29c03d49a1  musl-o2info-atimensec.patch
b471c21f30f7ebba05ed8e4c63ff00b4ddad7e6095d256929472d61368dcb7566296201ad0af382a21f0a16c47f23cfa256ad91e6629f17595034e4807c96f3b  musl-sys-raw.h.patch
5c30855802132ab4aa3495d0e81de1f2ecfece457f008ed7c9570edd7fc8b33b741cfd891d7bdb2c825199a4468a522db9538a84106470e93ac8dd6280a6912c  fix-unknown-type-errcode_t.patch
41b5e0d2eae738a8e05b6377e6dd4fc79592c6fc7b62dbc1ea6d7bd1fdb80122bc2f915748e64e30c9e964a1ebc73a65d81b5409fd499a959b3015d8c0683ead  fix-operations-include-ioctl.patch
35d5872e6a3651583442b3a333a2e866bf241b4fc19bdbabf4bb46cdbdb6b2806d81092b1fa80a9841a49e95a40d2bc09d12ad33e8cfbf3c267698eb9120b307  fix-o2monitor-undeclared-PATH_MAX.patch
3f1bf02eaa0f26f800cd18445cab32c72a93b7b6bc60ed5940fcd9b36d9e0d4458c73133fa1de55d81b49367ce228c829cbf9eaef7590189b67c3fa11d1e45df  ocfs2console-explicitly-specified-link-libraries.patch
c614235c98426a60d484203b47c44643833496de9864f2f6b1bedec206de33231878799d0b16ad2462c7ed2920cd0d8f9fd41fd7b1fff5b644e8be4b31ed815d  tunefs-remove-op_query.patch"