aboutsummaryrefslogtreecommitdiffstats
path: root/main/f2fs-tools/APKBUILD
blob: 64e34cca0538e55b871acd03b84bda831d20bc5b (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=f2fs-tools
pkgver=1.4.0
pkgrel=0
pkgdesc="Tools for Flash-Friendly File System (F2FS)"
url="http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git"
arch="all"
license="GPLv2+"
depends=""
depends_dev=""
makedepends="$depends_dev automake autoconf libtool util-linux-dev"
install=""
subpackages="$pkgname-doc"
#source="http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/f2fs-tools-$pkgver.tar.gz"
source="http://dev.alpinelinux.org/archive/f2fs-tools/f2fs-tools-$pkgver.tar.gz
	"
disturl="dev.alpinelinux.org:/archive/$pkgname/"
giturl=git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git

_builddir="$srcdir"/f2fs-tools-$pkgver
snapshot() {
	local _format="tar.gz"
	mkdir -p "$srcdir" && cd "$srcdir"
	# clone git repo and archive
	local _tag=v$pkgver
	msg "Creating git snapshot: $pkgname-$pkgver"
	git clone --branch $_tag --depth=1 \
		--bare $giturl ${pkgname}.git || return 1
	git --git-dir ${pkgname}.git archive \
		--format=$_format \
		-o $pkgname-$pkgver.$_format \
		--prefix=$pkgname-$pkgver/ $_tag \
		|| return 1
	# upload to defined distfiles url
	scp $pkgname-$pkgver.$_format $disturl || return 1
}

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	libtoolize --force && aclocal && autoheader && autoconf \
		&& automake --add-missing
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make install DESTDIR="$pkgdir" || return 1
	rm "$pkgdir"/usr/lib/*.la
}

md5sums="be9bfdddf3e5fd5e701a88d0b388dc26  f2fs-tools-1.4.0.tar.gz"
sha256sums="0c543027f393264ccd9a2d8cef60f7bcde28a42bcaac5c7ecedbccc25dc6a0ce  f2fs-tools-1.4.0.tar.gz"
sha512sums="fd461e9fb3baafd55c9c2fda9c42411a85c77c9d60fb483511ea6989d2924bd2d906af18fad97a05f8f1a91c98c30e9eff26e3e8488793fbb8afa4acd68c56db  f2fs-tools-1.4.0.tar.gz"