summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: db6c1c75019a0db4e12d06cc3fed14c3429db056 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=dpkg-git
pkgver=1.21.20.r208.gb118d11f7
pkgrel=1
pkgdesc="Debian package management system"
arch=('i686' 'x86_64')
url="https://tracker.debian.org/pkg/dpkg"
license=('GPL')
depends=('gcc-libs' 'glibc' 'bzip2' 'libmd' 'perl' 'xz' 'zlib' 'zstd')
makedepends=('git' 'perl-io-string' 'perl-timedate')
provides=("dpkg=$pkgver")
conflicts=('dpkg')
options=('staticlibs')
source=("git+https://git.dpkg.org/git/dpkg/dpkg.git"
        "origin.archlinux::https://gitlab.archlinux.org/archlinux/packaging/packages/dpkg/-/raw/main/origin.archlinux")
sha256sums=('SKIP'
            'SKIP')


pkgver() {
  cd "dpkg"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "dpkg"

  ./autogen
  ./configure \
    --prefix="/usr" \
    --sbindir="/usr/bin" \
    --sysconfdir="/etc" \
    --libexecdir="/usr/lib" \
    --localstatedir="/var" \
    --disable-start-stop-daemon
  make
}

package() {
  cd "dpkg"

  make DESTDIR="$pkgdir" install

  install -Dm644 "$srcdir/origin.archlinux" "$pkgdir/etc/dpkg/origins/archlinux"
  ln -sf "archlinux" "$pkgdir/etc/dpkg/origins/default"

  install -d "$pkgdir/var/lib/dpkg/updates"
  touch "$pkgdir/var/lib/dpkg"/{status,available}
}