aboutsummaryrefslogtreecommitdiffstats
path: root/main/gzip/APKBUILD
blob: bdc22c5763c5784e9b6f76acaf9098aa3735701d (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
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gzip
pkgver=1.8
pkgrel=0
pkgdesc="A popular data compression program"
subpackages="$pkgname-doc"
url="http://www.gnu.org/software/gzip/"
arch="all"
license="GPL2"
depends=
makedepends=
install=
source="http://ftp.gnu.org/gnu/gzip/gzip-$pkgver.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$_builddir"

	# avoid text relocation
	export DEFS="NO_ASM"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR=$pkgdir install

	rm -rf "$pkgdir"/usr/lib/charset.alias
	rmdir -p "$pkgdir"/usr/lib 2>/dev/null

	mkdir -p "$pkgdir"/bin
	mv "$pkgdir"/usr/bin/gzip "$pkgdir"/usr/bin/gunzip "$pkgdir"/bin/
	ln -s /bin/gzip "$pkgdir"/usr/bin/gzip
	ln -s /bin/gunzip "$pkgdir"/usr/bin/gunzip

	# http://bugs.alpinelinux.org/issues/4011
	ln -sf /bin/gunzip "$pkgdir"/usr/bin/uncompress
}
md5sums="732553152814b22dc35aa0267df5286c  gzip-1.8.tar.gz"
sha256sums="1ff7aedb3d66a0d73f442f6261e4b3860df6fd6c94025c2cb31a202c9c60fe0e  gzip-1.8.tar.gz"
sha512sums="cedac265cfd243a6c9cc5ef824a91c489d875447aeed12ef020b7e05fec571525a6a440c7b5b9713a7e23bb76202106785158bd20e6522a227eb3571f13d7948  gzip-1.8.tar.gz"