diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-01-22 00:21:21 -0200 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2014-01-22 00:21:21 -0200 |
commit | 88ef0d1d758f53f11a845c8b3ca30e3eb1955208 (patch) | |
tree | 4d9f7f821dbfda289be53850b4338e561b1e26fb /libre/dpkg/PKGBUILD | |
parent | 16e1ba06c6d1f0ade84cc9afca0cc54238ade5fd (diff) | |
parent | ec9ee033ba2c22d6c1a6b119ba6fe0525810d9bc (diff) | |
download | abslibre-88ef0d1d758f53f11a845c8b3ca30e3eb1955208.tar.gz abslibre-88ef0d1d758f53f11a845c8b3ca30e3eb1955208.tar.bz2 abslibre-88ef0d1d758f53f11a845c8b3ca30e3eb1955208.zip |
Merge branch 'master' of ssh://projects.parabolagnulinux.org:1863/srv/git/abslibre
Diffstat (limited to 'libre/dpkg/PKGBUILD')
-rw-r--r-- | libre/dpkg/PKGBUILD | 185 |
1 files changed, 105 insertions, 80 deletions
diff --git a/libre/dpkg/PKGBUILD b/libre/dpkg/PKGBUILD index 806194577..99681df3e 100644 --- a/libre/dpkg/PKGBUILD +++ b/libre/dpkg/PKGBUILD @@ -12,20 +12,38 @@ pkgname=(dpkg-devtools perl-dpkg) pkgdesc="Debian Package manager and utilities" license=('GPL2') -pkgver=1.16.10 +pkgver=1.17.6 url="http://packages.debian.org/source/sid/dpkg" -_debrepo=http://ftp.debian.org/debian/pool/main - -pkgrel=1.3 -arch=('i686' 'x86_64' 'mips64el') -depends=('bzip2' 'xz' 'zlib' 'ncurses') -checkdepends=('perl-test-pod') -makedepends=('perl-io-string' 'perl-timedate') +pkgrel=1 +options=('staticlibs') + +if ! type in_array &>/dev/null; then + in_array() { + local i + for i in "${@:2}"; do [[ $i = "$1" ]] && return 0; done + return 1 + } +fi + +# The architecture dependent bits aren't packaged with the reduced pkgname +arch=('any') +for _pkg in dpkg dselect libdpkg; do + if in_array "$_pkg" "${pkgname[@]}"; then + arch=('i686' 'x86_64' 'mips64el') + fi +done +unset _pkg + +makedepends=('bzip2' 'xz' 'zlib' 'ncurses') +checkdepends=('gzip' 'perl-test-pod' 'perl-io-string' 'perl-timedate') -_debfile() { echo "${_debrepo}/${1:0:1}/${1}/${1}_${2}"; } -source=("$(_debfile ${pkgbase} ${pkgver}).tar.xz" +_debrepo=http://ftp.debian.org/debian/pool/main +_debfile() { echo "${_debrepo}/${1:0:1}/${1%_*}/${1}"; } +source=("$(_debfile ${pkgbase}_${pkgver}).tar.xz" dpkg-gzip-rsyncable.patch) +md5sums=('c87f2ae291d460015353e01d121bea85' + '9c77a553e3219dcd29b7ff44b89d718d') ###################################################################### @@ -34,97 +52,104 @@ source=("$(_debfile ${pkgbase} ${pkgver}).tar.xz" # Shame on the dpkg developers for not putting that logic into the build system. _destdir="$pkgbase-$pkgver/debian/pkg-makepkg" _debhelper_install() { - local debname=$1 - cd "$srcdir/$_destdir" - - # main files - sed -e '/^\s*$/d' -e 's|usr/share/perl5/|&vendor_perl/|g' ../$debname.install \ - | while read pattern dest; do - if [[ -z $dest ]]; then - for file in $pattern; do - install -d "$pkgdir/${file%/*}" - cp -a "$file" "$pkgdir/$file" || true - done - else - install -d "$pkgdir/$dest/" - cp -a "$pattern" "$pkgdir/$dest/" || true - fi - done - - # manpages - sed -e 's|^debian/tmp/||' -e '/^\s*$/d' ../$debname.manpages 2>/dev/null \ - | while read pattern; do - for file in $pattern; do - install -d "$pkgdir/${file%/*}" - cp -a "$file" "$pkgdir/$file" || true - done - done - - # other documentation - install -d "$pkgdir/usr/share/doc/$pkgname/" - sed '/^\s*$/d' ../$debname.docs 2>/dev/null \ - | while read file; do - gzip \ - < "$srcdir/$pkgbase-$pkgver/$file" \ - > "$pkgdir/usr/share/doc/$pkgname/${file##*/}.gz" - done - - # symlinks - sed '/^\s*$/d' ../$debname.links 2>/dev/null \ - | while read file link; do - ln -s "/$file" "$pkgdir/$link" - done + local debname=$1 + cd "$srcdir/$_destdir" + + # main files + sed -e '/^\s*$/d' -e 's|usr/share/perl5/|&vendor_perl/|g' ../$debname.install | + while read pattern dest; do + if [[ -z $dest ]]; then + for file in $pattern; do + install -d "$pkgdir/${file%/*}" + cp -a "$file" "$pkgdir/$file" || true + done + else + install -d "$pkgdir/$dest/" + cp -a "$pattern" "$pkgdir/$dest/" || true + fi + done + + # manpages + sed -e 's|^debian/tmp/||' -e '/^\s*$/d' ../$debname.manpages 2>/dev/null | + while read pattern; do + for file in $pattern; do + install -d "$pkgdir/${file%/*}" + cp -a "$file" "$pkgdir/$file" || true + done + done + + # other documentation + sed '/^\s*$/d' ../$debname.docs 2>/dev/null | + while read file; do + install -d "$pkgdir/usr/share/doc/$pkgname/" + gzip \ + < "$srcdir/$pkgbase-$pkgver/$file" \ + > "$pkgdir/usr/share/doc/$pkgname/${file##*/}.gz" + done + + # symlinks + sed '/^\s*$/d' ../$debname.links 2>/dev/null | + while read file link; do + ln -s "/$file" "$pkgdir/$link" + done } ###################################################################### -build() { - cd "${srcdir}/${pkgbase}-${pkgver}" - - patch -Np0 -i "${srcdir}/dpkg-gzip-rsyncable.patch" +prepare() { + cd "${srcdir}/${pkgbase}-${pkgver}" + # {Arch Linux,Parabola}'s gzip doesn't support --rsyncable + patch -Np1 -i "${srcdir}/dpkg-gzip-rsyncable.patch" +} - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-zlib --with-bz2 --with-liblzma - make - make DESTDIR="$srcdir/$_destdir" install +build() { + cd "${srcdir}/${pkgbase}-${pkgver}" + ./configure \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --sysconfdir=/etc \ + --sbindir=/sbin \ + --localstatedir=/var \ + --with-zlib \ + --with-liblzma \ + --with-bz2 + make + make DESTDIR="$srcdir/$_destdir" install } check() { - cd "${srcdir}/${pkgbase}-${pkgver}" - make check + cd "${srcdir}/${pkgbase}-${pkgver}" + make check } package_dpkg() { - pkgdesc="Debian Package manager" - provides+=(start-stop-daemon) - conflicts+=(start-stop-daemon) - _debhelper_install dpkg + pkgdesc="Debian Package manager" + depends=('zlib' 'xz' 'bzip2') + _debhelper_install dpkg } package_dpkg-devtools() { - pkgdesc="Debian Package development tools" - arch=(any) - depends+=(perl-dpkg) - _debhelper_install dpkg-dev + pkgdesc="Debian Package development tools" + arch=('any') + depends=('perl-dpkg') + _debhelper_install dpkg-dev } package_dselect() { - pkgdesc="Debian Package manager high-level interface" - _debhelper_install dselect + pkgdesc="Debian Package manager high-level interface" + depends=('dpkg' 'perl' 'ncurses') + _debhelper_install dselect } package_libdpkg() { - pkgdesc="Debian Package manager library (static)" - _debhelper_install libdpkg-dev + pkgdesc="Debian Package manager library (static)" + _debhelper_install libdpkg-dev } package_perl-dpkg() { - pkgdesc="Debian Package perl modules" - arch=(any) - _debhelper_install libdpkg-perl + pkgdesc="Debian Package Perl modules" + arch=('any') + depends=('perl-timedate' 'gzip' 'bzip2' 'xz') + _debhelper_install libdpkg-perl } - -md5sums=('4df9319b2d17e19cdb6fe94dacee44da' - '5ab63758999e9bb10f84bce79a0307b2' - '74b7ce3045690a8fc290104f10cf8d42') -md5sums=('a20a06a5272717274a8b009368f237da' - '5ab63758999e9bb10f84bce79a0307b2') |