# Maintainer: Natanael Copa pkgname=dpkg pkgver=1.18.3 pkgrel=0 pkgdesc="The Debian Package Manager" url="http://packages.debian.org/dpkg" arch="all" license="GPL" makedepends="bzip2-dev zlib-dev perl" subpackages="$pkgname-doc $pkgname-dev" source="http://ftp.de.debian.org/debian/pool/main/d/$pkgname/${pkgname}_$pkgver.tar.xz" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" sed -i "s|||g" dselect/dselect.h \ dselect/Makefile.in || return 1 sed -i "s|||g" dselect/main.cc || return 1 } build() { cd "$_builddir" ./configure \ --prefix=/usr \ --localstatedir=/var \ --with-zlib \ --with-bzip2 \ --disable-dselect \ --disable-start-stop-daemon \ || 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-parsechangelog \ "$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/ mv "$pkgdir"/usr/share/perl* "$subpkgdir"/usr/share/ mv "$pkgdir"/usr/lib/dpkg/parsechangelog "$subpkgdir"/usr/lib/dpkg/ } md5sums="a5ca138121cc37c8fb0083462a3b4d47 dpkg_1.18.3.tar.xz" sha256sums="a40ffe38d7f36d858a752189a306433cfc52c7d15d7b98f61d9f9dd49e0e4807 dpkg_1.18.3.tar.xz" sha512sums="f9f06b7b629b88504a219d48f3d041e72fb41468bc9d7bba59a255660bf0d169b050ce816d4ddbee8da85ac3901e55cfc4301eadf94d42ab6038dcacde89f8fc dpkg_1.18.3.tar.xz"