aboutsummaryrefslogtreecommitdiffstats
path: root/main/dpkg/APKBUILD
blob: 3fb3311fbf484fbcde088e4afd8dc2a3a471c3d7 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dpkg
pkgver=1.18.10
pkgrel=0
pkgdesc="The Debian Package Manager"
url="http://packages.debian.org/dpkg"
arch="all"
license="GPL"
depends="xz"
makedepends="bzip2-dev zlib-dev perl linux-headers"
subpackages="$pkgname-doc $pkgname-dev"
source="http://ftp.de.debian.org/debian/pool/main/d/$pkgname/${pkgname}_$pkgver.tar.xz
	add-muslgnueabihf.patch
	"

builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$builddir"
	default_prepare || return 1

	sed -i "s|<ncursesw/curses.h>|<curses.h>|g" dselect/dselect.h \
		dselect/Makefile.in || return 1
	sed -i "s|<ncursesw/term.h>|<term.h>|g" dselect/main.cc || return 1
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-libz \
		--with-libbz2 \
		--disable-dselect \
		--disable-start-stop-daemon \
		--disable-nls \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

dev() {
	default_dev
	pkgdesc="Debian package development tools"
	depends="perl"
	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share \
		"$subpkgdir"/usr/lib/dpkg

	mv "$pkgdir"/usr/bin/dpkg-architecture \
		"$pkgdir"/usr/bin/dpkg-buildpackage \
		"$pkgdir"/usr/bin/dpkg-checkbuilddeps \
		"$pkgdir"/usr/bin/dpkg-distaddfile \
		"$pkgdir"/usr/bin/dpkg-genchanges \
		"$pkgdir"/usr/bin/dpkg-gencontrol \
		"$pkgdir"/usr/bin/dpkg-gensymbols \
		"$pkgdir"/usr/bin/dpkg-name \
		"$pkgdir"/usr/bin/dpkg-scanpackages \
		"$pkgdir"/usr/bin/dpkg-scansources \
		"$pkgdir"/usr/bin/dpkg-shlibdeps \
		"$pkgdir"/usr/bin/dpkg-source \
		"$pkgdir"/usr/bin/dpkg-vendor \
		"$subpkgdir"/usr/bin/ || return 1

	mv "$pkgdir"/usr/share/perl* "$subpkgdir"/usr/share/
}

md5sums="ccff17730c0964428fc186ded2f2f401  dpkg_1.18.10.tar.xz
360155cfe9e989a9ee12b56a579dfa75  add-muslgnueabihf.patch"
sha256sums="025524da41ba18b183ff11e388eb8686f7cc58ee835ed7d48bd159c46a8b6dc5  dpkg_1.18.10.tar.xz
63d331e297e2e5765bf919485cc87f6ce307344f38921015a5564f94b37af6e1  add-muslgnueabihf.patch"
sha512sums="83188277a703b57fa3b5570765db849f9b20f592237fa9a9f3a7e0b24c292c8cfc5528a049f6ecd85f2598c89521727599b406cd3924b2b8c56f9295b560e279  dpkg_1.18.10.tar.xz
5f83bce6a1d724f690ba8eded74c87dbd3b4c8a7850a53d5c68ad7cfc9712662a50a8a00a02329b2be64f3246cff1d6d7037950a81d4732aba2498ac1da114ac  add-muslgnueabihf.patch"