From 86285d128130e52a03d1edc11783e6ed82b5a35d Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 26 Dec 2012 23:01:47 -0500 Subject: mv libre/debhelper pcr; split, update libre/dpkg --- libre/debhelper/PKGBUILD | 29 ------- libre/dpkg/PKGBUILD | 142 +++++++++++++++++++++++++++-------- libre/dpkg/compare | 26 +++++++ libre/dpkg/compare.mk | 8 ++ libre/dpkg/dpkg-arch.patch | 17 ----- libre/dpkg/dpkg-gzip-rsyncable.patch | 11 +++ libre/dpkg/dpkg-rsyncable.patch | 12 --- pcr/debhelper/PKGBUILD | 29 +++++++ 8 files changed, 183 insertions(+), 91 deletions(-) delete mode 100644 libre/debhelper/PKGBUILD create mode 100755 libre/dpkg/compare create mode 100644 libre/dpkg/compare.mk delete mode 100644 libre/dpkg/dpkg-arch.patch create mode 100644 libre/dpkg/dpkg-gzip-rsyncable.patch delete mode 100644 libre/dpkg/dpkg-rsyncable.patch create mode 100644 pcr/debhelper/PKGBUILD diff --git a/libre/debhelper/PKGBUILD b/libre/debhelper/PKGBUILD deleted file mode 100644 index 60ff8f267..000000000 --- a/libre/debhelper/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# Maintainer (AUR): Antoine Lubineau -# Contributor (AUR): Andrei "Garoth" Thorp -# Contributor (Parabola): Luke Shumaker - -_debrepo=http://ftp.debian.org/debian/pool/main/ # Debian Sid -debfile() { echo -n "$_debrepo"; echo -n "$@"|sed -r 's@(.).*@\1/&@'; } - -pkgname=debhelper -pkgver=9.20120322 -pkgrel=1 -pkgdesc="A collection of programs that can be used in a debian/rules file to automate common tasks" -arch=('any') -url="http://packages.debian.org/${pkgname}" -license='GPL3' -depends=('binutils' 'dpkg' 'file' 'html2text' 'man-db' 'perl') -makedepends=('po4a') -source=(`debfile ${pkgname}`/${pkgname}_$pkgver.tar.gz) - -build() { - cd "$srcdir/$pkgname" - make -} - -package() { - cd "$srcdir/$pkgname" - make DESTDIR="$pkgdir" install -} - -md5sums=('9ea56782e6396a59ec49f45f9c4a603f') diff --git a/libre/dpkg/PKGBUILD b/libre/dpkg/PKGBUILD index 175b80610..aa82d36e6 100644 --- a/libre/dpkg/PKGBUILD +++ b/libre/dpkg/PKGBUILD @@ -1,49 +1,125 @@ +# Maintainer: Luke Shumaker # Maintainer (AUR): Jochen Schalanda +# Contributor (AUR): Pierre Carrier # Contributor (AUR): Thomas Dziedzic # Contributor (AUR): Chris Giles # Contributor (AUR): seblu # Contributor (AUR): squiddo -# Contributor (Parabola): Luke Shumaker - -_debrepo=http://ftp.debian.org/debian/pool/main/ # Debian Sid -debfile() { echo -n "$_debrepo"; echo -n "$@"|sed -r 's@(.).*@\1/&@'; } - -# TODO: split into (dpkg dpkg-devtools dselect dpkg-perl) -pkgname=dpkg -pkgver=1.16.2 -pkgrel=1 -pkgdesc="The Debian Package Manager and utilities. Don't use it instead of 'pacman'." -arch=('i686' 'x86_64') -url="http://packages.debian.org/${pkgname}" + +pkgbase=dpkg +#pkgname=(dpkg dpkg-devtools dselect libdpkg perl-dpkg) +pkgname=(dpkg-devtools perl-dpkg) +pkgdesc="Debian Package manager and utilities" license=('GPL2') -depends=('bzip2' 'perl-timedate') -makedepends=('gcc' 'make' 'patch') -optdepends=('fakeroot') -replaces=(dpkg-ubuntu) -conflits=(dpkg-ubuntu) -source=(`debfile ${pkgname}`/${pkgname}_${pkgver}.tar.bz2 - dpkg-rsyncable.patch dpkg-arch.patch) + +pkgver=1.16.9 +url="http://packages.debian.org/source/sid/dpkg" +_debrepo=http://ftp.debian.org/debian/pool/main # Debian Sid + +pkgrel=1.1 +debfile() { echo "${_debrepo}/${1:0:1}/${1}/${1}_${2}"; } +arch=('i686' 'x86_64' 'mips64el') +depends=('bzip2' 'xz' 'zlib' 'ncurses') +checkdepends=('perl-test-pod') +makedepends=('perl-io-string' 'perl-timedate') +source=("$(debfile ${pkgbase} ${pkgver}).tar.xz" + dpkg-gzip-rsyncable.patch) + +###################################################################### + +# This is really gross. +# It uses the debian control files to help us split the package. +# Shame on the dpkg developers for not putting that logic into the build system. +_destdir="$srcdir/$pkgbase-$pkgver/debian/pkg-makepkg" +_debhelper_install() { + local debname=$1 + cd "$_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 +} + +###################################################################### build() { - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/${pkgbase}-${pkgver}" - patch -p1 -i "${srcdir}/dpkg-rsyncable.patch" - patch -p1 -i "${srcdir}/dpkg-arch.patch" # Architecture detection + patch -p0 -i "${srcdir}/dpkg-gzip-rsyncable.patch" - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --without-start-stop-daemon + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-zlib --with-bz2 --with-liblzma make + make DESTDIR="$_destdir" install +} + +check() { + cd "${srcdir}/${pkgbase}-${pkgver}" + make check +} + +package_dpkg() { + pkgdesc="Debian Package manager" + provides+=(start-stop-daemon) + conflicts+=(start-stop-daemon) + _debhelper_install dpkg } -package() { - cd "${srcdir}/${pkgname}-${pkgver}" - make DESTDIR="${pkgdir}" install +package_dpkg-devtools() { + 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 +} + +package_libdpkg() { + pkgdesc="Debian Package manager library (static)" + _debhelper_install libdpkg-dev +} - # Variables - install -d "${pkgdir}/var/${pkgname}/updates/" - touch "${pkgdir}/var/lib/${pkgname}/{status,available}" +package_perl-dpkg() { + pkgdesc="Debian Package perl modules" + arch=(any) + _debhelper_install libdpkg-perl } -md5sums=('629ba7ee2024e6a5c0ff807aa2db02f8' - 'bc36609f6191c5b509fae58c21966c95' - '24ab12e79989a2e7f31653fb1dd3cdf9') +md5sums=('4df9319b2d17e19cdb6fe94dacee44da' + '5ab63758999e9bb10f84bce79a0307b2') diff --git a/libre/dpkg/compare b/libre/dpkg/compare new file mode 100755 index 000000000..4556440a5 --- /dev/null +++ b/libre/dpkg/compare @@ -0,0 +1,26 @@ +#!/bin/bash +# compare the packages extracted in pkg/ to the packages from debian + +_check() { + local pacpkg=$1 + local debpkg=$2 + + libremessages msg "dpkg:$debpkg -> pacman:$pacpkg" + + make -f compare.mk tmp/$pacpkg.pacman.filelist tmp/$debpkg.debian.filelist &>/dev/null + + echo -e 'pacman\tdpkg' + comm -3 \ + <(sed -e 's|\.gz$||' tmp/$pacpkg.pacman.filelist|sort) \ + <(sed -e 's|\.gz$||' -e '/^usr\/share\/man\/..\/man.\//d' -e 's|usr/share/perl5/|&vendor_perl/|' -e "s|$debpkg|$pacpkg|g" tmp/$debpkg.debian.filelist|sort) +} + +mkdir -p tmp + +_check dpkg dpkg +_check dpkg-devtools dpkg-dev +_check dselect dselect +_check libdpkg libdpkg-dev +_check perl-dpkg libdpkg-perl + +rm -rf tmp diff --git a/libre/dpkg/compare.mk b/libre/dpkg/compare.mk new file mode 100644 index 000000000..88219f283 --- /dev/null +++ b/libre/dpkg/compare.mk @@ -0,0 +1,8 @@ +#!/usr/bin/make -f +# Assist file for ./compare + +tmp/%.debian.filelist: + curl http://packages.debian.org/sid/all/$*/filelist|sed -n "/
/,/<\/pre>/{ s|.*
||; s|
.*||; /./p }"|sed 's|/||'|sort > $@ + +tmp/%.pacman.filelist: + ( cd pkg/$* && find * -not -type d; ) | sort > $@ diff --git a/libre/dpkg/dpkg-arch.patch b/libre/dpkg/dpkg-arch.patch deleted file mode 100644 index 66e7a2ef2..000000000 --- a/libre/dpkg/dpkg-arch.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -ru dpkg-1.16.2.orig/scripts/Dpkg/Arch.pm dpkg-1.16.2/scripts/Dpkg/Arch.pm ---- dpkg-1.16.2.orig/scripts/Dpkg/Arch.pm 2012-03-19 02:40:08.000000000 -0400 -+++ dpkg-1.16.2/scripts/Dpkg/Arch.pm 2012-04-02 16:14:55.000000000 -0400 -@@ -49,12 +49,7 @@ - { - return $build_arch if defined $build_arch; - -- # Note: We *always* require an installed dpkg when inferring the -- # build architecture. The bootstrapping case is handled by -- # dpkg-architecture itself, by avoiding computing the DEB_BUILD_ -- # variables when they are not requested. -- -- my $build_arch = `dpkg --print-architecture`; -+ my $build_arch = `uname -m`; - syserr("dpkg --print-architecture failed") if $? >> 8; - - chomp $build_arch; diff --git a/libre/dpkg/dpkg-gzip-rsyncable.patch b/libre/dpkg/dpkg-gzip-rsyncable.patch new file mode 100644 index 000000000..3daf6d76e --- /dev/null +++ b/libre/dpkg/dpkg-gzip-rsyncable.patch @@ -0,0 +1,11 @@ +--- ./scripts/Dpkg/Compression.pm.orig 2012-04-27 04:49:02.000000000 +0200 ++++ ./scripts/Dpkg/Compression.pm 2012-05-27 22:23:18.530628795 +0200 +@@ -52,7 +52,7 @@ + my $COMP = { + "gzip" => { + "file_ext" => "gz", +- "comp_prog" => [ "gzip", "--no-name", "--rsyncable" ], ++ "comp_prog" => [ "gzip", "--no-name" ], + "decomp_prog" => [ "gunzip" ], + "default_level" => 9, + }, diff --git a/libre/dpkg/dpkg-rsyncable.patch b/libre/dpkg/dpkg-rsyncable.patch deleted file mode 100644 index e7e58dfdf..000000000 --- a/libre/dpkg/dpkg-rsyncable.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru dpkg-1.16.2.orig/scripts/Dpkg/Compression.pm dpkg-1.16.2/scripts/Dpkg/Compression.pm ---- dpkg-1.16.2.orig/scripts/Dpkg/Compression.pm 2012-03-19 02:40:08.000000000 -0400 -+++ dpkg-1.16.2/scripts/Dpkg/Compression.pm 2012-04-02 16:26:27.000000000 -0400 -@@ -52,7 +52,7 @@ - my $COMP = { - "gzip" => { - "file_ext" => "gz", -- "comp_prog" => [ "gzip", "--no-name", "--rsyncable" ], -+ "comp_prog" => [ "gzip", "--no-name"], - "decomp_prog" => [ "gunzip" ], - "default_level" => 9, - }, diff --git a/pcr/debhelper/PKGBUILD b/pcr/debhelper/PKGBUILD new file mode 100644 index 000000000..60ff8f267 --- /dev/null +++ b/pcr/debhelper/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer (AUR): Antoine Lubineau +# Contributor (AUR): Andrei "Garoth" Thorp +# Contributor (Parabola): Luke Shumaker + +_debrepo=http://ftp.debian.org/debian/pool/main/ # Debian Sid +debfile() { echo -n "$_debrepo"; echo -n "$@"|sed -r 's@(.).*@\1/&@'; } + +pkgname=debhelper +pkgver=9.20120322 +pkgrel=1 +pkgdesc="A collection of programs that can be used in a debian/rules file to automate common tasks" +arch=('any') +url="http://packages.debian.org/${pkgname}" +license='GPL3' +depends=('binutils' 'dpkg' 'file' 'html2text' 'man-db' 'perl') +makedepends=('po4a') +source=(`debfile ${pkgname}`/${pkgname}_$pkgver.tar.gz) + +build() { + cd "$srcdir/$pkgname" + make +} + +package() { + cd "$srcdir/$pkgname" + make DESTDIR="$pkgdir" install +} + +md5sums=('9ea56782e6396a59ec49f45f9c4a603f') -- cgit v1.1-4-g5e80