aboutsummaryrefslogtreecommitdiffstats
path: root/main/f2fs-tools/APKBUILD
blob: d6409ca0fff19d86456af0e0e0ed11f2cc6f2f25 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=f2fs-tools
pkgver=1.3.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
	0001-fibmap.f2fs-compile-fix-for-musl-libc.patch
	"
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="1acfeb72439e36c3b7cafc9ea2299399  f2fs-tools-1.3.0.tar.gz
216a141c5d81fe1d31e90bc10a3892d2  0001-fibmap.f2fs-compile-fix-for-musl-libc.patch"
sha256sums="8f361a4e65b71000c786fa2de10d123a6c6dafeb2900bd6f311bf8a93f35e65f  f2fs-tools-1.3.0.tar.gz
b548b9c46812c9bea8db9bbf754a0063584196b1a926302586e5d9ecd2096503  0001-fibmap.f2fs-compile-fix-for-musl-libc.patch"
sha512sums="434a5f5d7af81a8f3722f0429e45f7609b3cd4cf026132c8eb86d283295e6e40d07150d0908864a86d5adc4a0f918f3daf80b9192a3b1b0767b2c705f1495b8c  f2fs-tools-1.3.0.tar.gz
e4b0bc2d610cb19044bf46c2a0ac282477502fc021e6ab93b89be12b1035ba19c146050fbdc8706dd41188c0c255f609cd7a9bb499a25b5b27df95bb3d84af29  0001-fibmap.f2fs-compile-fix-for-musl-libc.patch"