aboutsummaryrefslogtreecommitdiffstats
path: root/main/e2fsprogs/APKBUILD
blob: 87c586e11ee6078655f7803075ef24c921b17cbb (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=e2fsprogs
pkgver=1.42.13
pkgrel=2
pkgdesc="Standard Ext2/3/4 filesystem utilities"
url="http://e2fsprogs.sourceforge.net"
arch="all"
license="GPL LGPL MIT"
depends=
install=
depends_dev="util-linux-dev"
makedepends="$depends_dev linux-headers"
subpackages="$pkgname-dev $pkgname-doc libcom_err $pkgname-libs $pkgname-extra"
source="http://downloads.sourceforge.net/sourceforge/e2fsprogs/e2fsprogs-$pkgver.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver

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
}

build () {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--mandir=/usr/share/man \
		--enable-elf-shlibs \
		--enable-symlink-install \
		--disable-fsck \
		--disable-uuidd \
		--disable-libuuid \
		--disable-libblkid \
		--disable-tls \
		--disable-nls \
		|| return 1

	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 LDCONFIG=: DESTDIR="$pkgdir" install install-libs || return 1
	mv "$pkgdir"/sbin/* "$pkgdir"/usr/sbin/
	for i in e2fsck mke2fs mkfs.* fsck.*; do
		mv "$pkgdir"/usr/sbin/$i "$pkgdir"/sbin/
	done
}

dev() {
	default_dev
	mkdir -p "$subpkgdir"/usr/bin
	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/bin/compile_et "$pkgdir"/usr/bin/mk_cmds \
		"$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/share/et "$pkgdir"/usr/share/ss \
		"$subpkgdir"/usr/share
}

libcom_err() {
	pkgdesc="Common error description library"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/libcom_err* "$subpkgdir"/lib/
}

extra() {
	depends="$pkgname"
	pkgdesc="Ext2/3/4 filesystem extra utilities"
	mkdir -p "$subpkgdir"
	rmdir "$pkgdir"/lib || return 1
	mv "$pkgdir"/etc "$pkgdir"/usr "$subpkgdir"/
}

md5sums="bc759fc62666786f5436e2075beb3265  e2fsprogs-1.42.13.tar.gz"
sha256sums="59993ff3a44f82e504561e0ebf95e8c8fa9f9f5746eb6a7182239605d2a4e2d4  e2fsprogs-1.42.13.tar.gz"
sha512sums="d341790f55c3bff34425369063757280b9ba6ac08f405e14f94f299345ae76c0dc6e90871b746cc98c73467448d888fe5bc029688b5eed5fd22c3c37bf285cd0  e2fsprogs-1.42.13.tar.gz"