aboutsummaryrefslogtreecommitdiffstats
path: root/main/attr/APKBUILD
blob: a3804b08cee671caf20aff7e1b50231eb52bc5a6 (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=attr
pkgver=2.4.47
pkgrel=7
pkgdesc="Utilities for managing filesystem extended attributes"
url="https://savannah.nongnu.org/projects/attr"
arch="all"
license="GPL-2.0-or-later LGPL-2.0-or-later"
depends=""
makedepends="libtool autoconf automake bash"
subpackages="$pkgname-dev $pkgname-doc libattr"
source="http://download.savannah.nongnu.org/releases/attr/attr-$pkgver.src.tar.gz
	fix-decls.patch
	fix-throw.patch
	busybox-gzip.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

	OPTIMIZER="${CFLAGS}" DEBUG=-DNDEBUG INSTALL_USER=root INSTALL_GROUP=root ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/ \
		--exec-prefix=/ \
		--sbindir=/bin \
		--bindir=/usr/bin \
		--libdir=/lib \
		--libexecdir=/usr/lib \
		--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 \
		|| return 1
}

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

sha512sums="2a333f63655758298650cf8f89c175efdc0112dcc4013e8d023e2a9a69f177e4bcb1f1d10b6666d6f2027dca4dec0833d54749952ab153d28367e1a72e6e2831  attr-2.4.47.src.tar.gz
fa7925f63c611e39b28adbf8fa3838bd91c245e4694957c1a8e212cb8f289eb62e04f50806227f6c1947d432ddf7633a471c13dd08d513d1e2b8a9ac1906cb33  fix-decls.patch
d758b864bac9bdbc3360df2e7a3bc7d04e06789975cf539b8e2b98b1d874744b55c80f0502e283f7233d6ec41f8a39624fe07b512a7fdc6af8d19dd3af5f9f5a  fix-throw.patch
c04f3f38eafaa1afbafdf99751cdf1770e81182ebdc20f3cbea81d44638f7100c5c9963c42342c618286f25c435a82fcbcd3dea635725042edd36c6a3a02960c  busybox-gzip.patch"