aboutsummaryrefslogblamecommitdiffstats
path: root/testing/moosefs/APKBUILD
blob: c4b16faeb3d750af128445cb40477a426885ea86 (plain) (tree)
1
2
3
4
5



                                                   
        
































































































































                                                                                                            
                         






















                                                                                                                                                                    
# Contributor: Michael Pirogov <vbnet.ru@gmail.com>
# Maintainer: Michael Pirogov <vbnet.ru@gmail.com>
pkgname="moosefs"
pkgver="3.0.105"
pkgrel=1
pkgdesc="Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System"
url="https://moosefs.com"
arch="all"
license="GPL-2.0-only"
makedepends="autoconf automake zlib-dev libpcap-dev libtool fuse-dev python3-dev"
pkgusers="mfs"
pkggroups="mfs"
subpackages="$pkgname-doc $pkgname-static $pkgname-client $pkgname-master
	$pkgname-chunkserver $pkgname-metalogger $pkgname-cgi::noarch
	$pkgname-cgiserv::noarch
	$pkgname-metalogger-openrc:metalogger_openrc
	$pkgname-master-openrc:master_openrc
	$pkgname-chunkserver-openrc:chunkserver_openrc
	$pkgname-cgiserv-openrc:cgiserv_openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/moosefs/moosefs/archive/v$pkgver.tar.gz
	$pkgname-cgiserv.initd
	$pkgname-cgiserv.confd
	$pkgname-master.initd
	$pkgname-metalogger.initd
	$pkgname-chunkserver.initd"

prepare() {
	autoreconf -fi
}

build() {
	# Configure and remove systemd stuff
	./configure --prefix=/usr \
		--with-systemdsystemunitdir=no \
		--sysconfdir=/etc \
		--with-default-user=mfs \
		--with-default-group=mfs \
		--disable-dependency-tracking \
		--disable-silent-rules \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--datadir=/usr/share \
		--localstatedir=/var/lib \
		--libdir=/usr/lib
	make
}

check() {
	cd mfstests
	./mfstest_clocks
	./mfstest_crc32
	./mfstest_datapack
	./mfstest_delayrun
}

package() {
	make DESTDIR=$pkgdir install
	chown -R mfs:mfs "$pkgdir"/var/lib/mfs
}

_mv_files() {
	local i
	for i in "$@"; do
		case $i in
		*/*) mkdir -p "$subpkgdir"/${i%/*};;
		*) mkdir -p "$subpkgdir";;
		esac
		mv "$pkgdir"/$i "$subpkgdir"/$i
	done
}

master() {
	pkgdesc="MooseFS master server"
	depends="moosefs=$pkgver-r$pkgrel"
	cd "$pkgdir"
	_mv_files \
		usr/sbin/mfsmaster \
		usr/sbin/mfsmetadump \
		usr/sbin/mfsmetarestore \
		etc/mfs/mfsexports.cfg.sample \
		etc/mfs/mfstopology.cfg.sample \
		etc/mfs/mfsmaster.cfg.sample \
		var/lib/mfs/metadata.mfs.empty
		chown -R $pkgusers:$pkggroups "$subpkgdir"/var/lib/mfs
}

master_openrc() {
	default_openrc
	cd "$pkgdir"
	install -Dm755 "$srcdir"/moosefs-master.initd "$subpkgdir"/etc/init.d/moosefs-master
}

metalogger() {
	pkgdesc="MooseFS metadata replication server"
	depends="moosefs=$pkgver-r$pkgrel"
	cd "$pkgdir"
	_mv_files \
		usr/sbin/mfsmetalogger \
		etc/mfs/mfsmetalogger.cfg.sample
}

metalogger_openrc() {
	default_openrc
	cd "$pkgdir"
	install -Dm755 "$srcdir"/moosefs-metalogger.initd "$subpkgdir"/etc/init.d/moosefs-metalogger
}

chunkserver() {
	pkgdesc="MooseFS data server"
	depends="moosefs=$pkgver-r$pkgrel"
	cd "$pkgdir"
	_mv_files \
		usr/sbin/mfschunkserver \
		etc/mfs/mfschunkserver.cfg.sample \
		etc/mfs/mfshdd.cfg.sample
}

chunkserver_openrc() {
	default_openrc
	install -Dm755 "$srcdir"/moosefs-chunkserver.initd "$subpkgdir"/etc/init.d/moosefs-chunkserver
}

client() {
	pkgdesc="MooseFS client"
	depends="fuse"
	cd "$pkgdir"
	_mv_files \
		usr/bin/* \
		etc/mfs/mfsmount.cfg.sample

}

cgi() {
	pkgdesc="MooseFS CGI Monitor"
	depends="python3"
	cd "$pkgdir"
	_mv_files usr/share/mfscgi
}

cgiserv() {
	pkgdesc="Simple CGI-capable HTTP server to run MooseFS CGI Monitor"
	depends="$pkgname-cgi=$pkgver-r$pkgrel"
	cd "$pkgdir"
	_mv_files usr/sbin/mfscgiserv
}

cgiserv_openrc() {
	default_openrc
	install -Dm755 "$srcdir"/moosefs-cgiserv.initd "$subpkgdir"/etc/init.d/moosefs-cgiserv
	install -Dm644 "$srcdir"/moosefs-cgiserv.confd "$subpkgdir"/etc/conf.d/moosefs-cgiserv
}

sha512sums="d64bf58971a114c62bc3ae40d48fa800bec9a9ba012f51912b58ae14203b3b523f47bb2fb120759025ea1b604b6a8f74e87b0769b5888b137e7febed2d1fd24f  moosefs-3.0.105.tar.gz
c698aff4de9aeb76202a809e44ac8d0ec9c6348a806b1c813c2a40858339b1c139a480a9c5aff40bf2c9821883c6c0dfeabb010f3faa5746673235f0fb3c5a76  moosefs-cgiserv.initd
b5c625f0004df33889de60ddad37e41f3acf081b37247606a1544e5f63354e121fe4cce511a6e60f4f2c0305155faf0614b8a4bce7267929fe68a1a4b546b582  moosefs-cgiserv.confd
a041fa324d37bda098ad65e9d6507f281ed388471956ca79aa33b8b0d1c4a9d528662a2410c47f3856183d6378ac7fb417c3d7ec314f624e7e5dac7c5e4247f0  moosefs-master.initd
8e73a7715e7a010d435efb9058ed67aad1caa95c840d3f1fae6bafd2a700cedbb0244d29363929d8e8d9a2036a2e0b173c0c2f7b52529ba4088e1296479fc0f5  moosefs-metalogger.initd
56a714f3d29030ca12dc1859a1121b2a89606a2ccccec65481e2eb0b846757dea71dfe5f5a6d648b32e731d14b7d7725f79703851365b0862d7eb415a5f49dfb  moosefs-chunkserver.initd"