diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2013-01-12 13:04:54 +0100 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2013-01-12 13:04:54 +0100 |
commit | 24633b6f6af8dc77ca77224448d226d8e99c9ce1 (patch) | |
tree | 0e862445be6a105957104f94f7e4f2668e1fdbba /libre/dpkg/PKGBUILD | |
parent | d28ed89b1e41f7e71045a5c2e898aa3b369eda47 (diff) | |
parent | 8c2563c3c13cb7a279544f6926cbdd2eb902cc9a (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
community/cdemu-daemon/PKGBUILD
community/chmsee/PKGBUILD
community/fceux/PKGBUILD
community/ginac/PKGBUILD
community/gstreamermm/PKGBUILD
community/gtksourceviewmm/PKGBUILD
community/lgi/PKGBUILD
community/libmirage/PKGBUILD
core/gawk/PKGBUILD
core/gettext/PKGBUILD
extra/enca/PKGBUILD
extra/gnutls/PKGBUILD
extra/hdf5/PKGBUILD
extra/kdebase/PKGBUILD
extra/libass/PKGBUILD
extra/libdiscid/PKGBUILD
extra/libxcomposite/PKGBUILD
extra/libxdamage/PKGBUILD
extra/maxima/PKGBUILD
extra/nx/PKGBUILD
extra/opencv/PKGBUILD
extra/pidgin/PKGBUILD
extra/redland/PKGBUILD
extra/sharutils/PKGBUILD
extra/soundtouch/PKGBUILD
extra/sqlite/PKGBUILD
extra/twisted/PKGBUILD
libre/dpkg/PKGBUILD
Diffstat (limited to 'libre/dpkg/PKGBUILD')
-rw-r--r-- | libre/dpkg/PKGBUILD | 144 |
1 files changed, 107 insertions, 37 deletions
diff --git a/libre/dpkg/PKGBUILD b/libre/dpkg/PKGBUILD index a55d219e0..aa82d36e6 100644 --- a/libre/dpkg/PKGBUILD +++ b/libre/dpkg/PKGBUILD @@ -1,55 +1,125 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> # Maintainer (AUR): Jochen Schalanda <jochen+aur@schalanda.name> +# Contributor (AUR): Pierre Carrier <pierre@spotify.com> # Contributor (AUR): Thomas Dziedzic <gostrc@gmail> # Contributor (AUR): Chris Giles <Chris.G.27@gmail.com> # Contributor (AUR): seblu <seblu+arch@seblu.net> # Contributor (AUR): squiddo <squiddo@intheocean.net> -# Contributor (Parabola): Luke Shumaker <lukeshu@sbcglobal.net> -_debrepo=http://ftp.debian.org/debian/pool/main/ # Debian Sid -debfile() { echo -n "$_debrepo"; echo -n "$@"|sed -r 's@(.).*@\1/&@'; } +pkgbase=dpkg +#pkgname=(dpkg dpkg-devtools dselect libdpkg perl-dpkg) +pkgname=(dpkg-devtools perl-dpkg) +pkgdesc="Debian Package manager and utilities" +license=('GPL2') + +pkgver=1.16.9 +url="http://packages.debian.org/source/sid/dpkg" +_debrepo=http://ftp.debian.org/debian/pool/main # Debian Sid -# TODO: split into (dpkg dpkg-devtools dselect dpkg-perl) -pkgname=dpkg -pkgver=1.16.4.3 -pkgrel=1 -pkgdesc="The Debian Package Manager and utilities. Don't use it instead of 'pacman'." +pkgrel=1.1 +debfile() { echo "${_debrepo}/${1:0:1}/${1}/${1}_${2}"; } arch=('i686' 'x86_64' 'mips64el') -url="http://packages.debian.org/${pkgname}" -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) +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=('39c74a948c6fe4c02ed9f15556fe179d' - 'bc36609f6191c5b509fae58c21966c95' - '24ab12e79989a2e7f31653fb1dd3cdf9') -md5sums=('39c74a948c6fe4c02ed9f15556fe179d' - 'bc36609f6191c5b509fae58c21966c95' - '24ab12e79989a2e7f31653fb1dd3cdf9') +md5sums=('4df9319b2d17e19cdb6fe94dacee44da' + '5ab63758999e9bb10f84bce79a0307b2') |