APKBUILD 1.7 KB
Newer Older
Hugo Amoros's avatar
Hugo Amoros committed
1 2 3
# Contributor: H <agathos5@gmail.com>
# Maintainer:
pkgname=megatools
TBK's avatar
TBK committed
4 5
pkgver=1.10.2
pkgrel=0
Hugo Amoros's avatar
Hugo Amoros committed
6 7 8
pkgdesc="Megatools is a collection of programs for accessing Mega.nz service from a command line of your desktop or server."
url="https://megatools.megous.com"
arch="all"
9
license="GPL-2.0"
10
makedepends="curl-dev glib-dev openssl-dev gmp-dev asciidoc"
Hugo Amoros's avatar
Hugo Amoros committed
11
subpackages="$pkgname-doc"
TBK's avatar
TBK committed
12
source="https://megatools.megous.com/builds/megatools-$pkgver.tar.gz"
Hugo Amoros's avatar
Hugo Amoros committed
13 14 15 16 17 18 19 20
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure --prefix=/usr
	make
}

21 22 23 24 25 26 27 28 29
check() {
	cd "$builddir"
	make check
	for i in  megacopy megadf megadl megaget megals megamkdir megaput megareg megarm; do
		msg $i
		./$i --version
	done
}

Hugo Amoros's avatar
Hugo Amoros committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
package() {
	cd "$builddir"
	#make DESTDIR="$pkgdir" install
	./install-sh -c -d "${pkgdir}/usr/bin"
	./install-sh -c -d "${pkgdir}/usr/share/doc/megatools"
	./install-sh -c -d "${pkgdir}/usr/share/man/man1"
	./install-sh -c -d "${pkgdir}/usr/share/man/man5"
	./install-sh -c -d "${pkgdir}/usr/share/man/man7"
	./install-sh -c -m 755 megacopy megadf megadl megaget megals megamkdir megaput megareg megarm "${pkgdir}/usr/bin"
	./install-sh -c -m 644 LICENSE NEWS TODO README INSTALL HACKING "${pkgdir}/usr/share/doc/megatools"
	./install-sh -c -m 644 docs/megadf.1 docs/megaget.1 docs/megals.1 docs/megamkdir.1 docs/megaput.1 docs/megareg.1 docs/megarm.1 \
													docs/megacopy.1 docs/megadl.1 "${pkgdir}/usr/share/man/man1"
	./install-sh -c -m 644 docs/megarc.5 "${pkgdir}/usr/share/man/man5"
	./install-sh -c -m 644 docs/megatools.7 "${pkgdir}/usr/share/man/man7"
}

TBK's avatar
TBK committed
46
sha512sums="6d9a5dcba6be12bce38313c3481565b2f8671e354d2e021614b62c2cf30963b9e4a87574dd80b36613290db7721e3ef4d32072a19efee76ff292b17bc6c2bafe  megatools-1.10.2.tar.gz"