aboutsummaryrefslogtreecommitdiffstats
path: root/main/attr/APKBUILD
blob: cf1dd6a6f812deecbdaa9481798640a4d3305b69 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=attr
pkgver=2.4.47
pkgrel=4
pkgdesc="Utilities for managing filesystem extended attributes"
url="http://acl.bestbits.at/"
arch="all"
license="GPL2+ LGPL2+"
depends=""
makedepends="libtool autoconf automake bash gzip"
subpackages="$pkgname-dev $pkgname-doc libattr"
source="http://download.savannah.gnu.org/releases-noredirect/attr/attr-$pkgver.src.tar.gz
	fix-headers.patch
	"

prepare() {
	cd "$srcdir"/attr-$pkgver
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	sed -i -e '/HAVE_ZIPPED_MANPAGES/s:=.*:=false:' \
		include/builddefs.in
}

build() {
	cd "$srcdir"/attr-$pkgver

	unset PLATFORM #184564
	export OPTIMIZER="${CFLAGS}"
	export DEBUG=-DNDEBUG
	export INSTALL_USER=root
	export INSTALL_GROUP=root
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/ \
		--exec-prefix=/ \
		--sbindir=/bin \
		--bindir=/usr/bin \
		--libdir=/lib \
		--libexecdir=/usr/lib \
		--enable-lib64=yes \
		--includedir=/usr/include \
		--mandir=/usr/share/man \
		--datadir=/usr/share \
		--disable-gettext \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir"/attr-$pkgver
	make -j1 DESTDIR="$pkgdir" \
		install install-lib install-dev || return 1

	# provided by man-pages
	rm -r "$pkgdir"/usr/share/man/man2 \
		"$pkgdir"/usr/share/man/man5/attr.5 \
		"$pkgdir"/lib/libattr.la || return 1
}

libattr() {
	pkgdesc="Dynamic library for extended attribute support"
	replaces="attr"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/lib*.so.* "$subpkgdir"/lib/
}

md5sums="84f58dec00b60f2dc8fd1c9709291cc7  attr-2.4.47.src.tar.gz
25d1b2496593f5bc67afd576b7d1457a  fix-headers.patch"
sha256sums="25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859  attr-2.4.47.src.tar.gz
53b669f9fb365961aa393a8528c1d671c76a2687c6d7f3b171335bd902feca3e  fix-headers.patch"
sha512sums="2a333f63655758298650cf8f89c175efdc0112dcc4013e8d023e2a9a69f177e4bcb1f1d10b6666d6f2027dca4dec0833d54749952ab153d28367e1a72e6e2831  attr-2.4.47.src.tar.gz
7e8186f643b5c891111c927f5026f35dee550c5520e65c61d5121921865d3bbf05e42c3b218be171802a790aca5c0498d8516970625cb5cd369e63075cb80737  fix-headers.patch"