archrelease: copy trunk to extra-x86_64
[arch-packages.git] / pacman / trunk / PKGBUILD
blob7e7cf3fdf75d31d5b7456f34abc77cc97000359e
1 # vim: set ts=2 sw=2 et:
2 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 # Maintainer: Morten Linderud <foxboron@archlinux.org>
5 pkgname=pacman
6 pkgver=6.0.2
7 pkgrel=6
8 pkgdesc="A library-based package manager with dependency support"
9 arch=('x86_64')
10 url="https://www.archlinux.org/pacman/"
11 license=('GPL')
12 depends=('bash' 'glibc' 'libarchive' 'curl' 'gpgme' 'pacman-mirrorlist'
13          'gettext' 'gawk' 'coreutils' 'gnupg' 'grep')
14 makedepends=('meson' 'asciidoc' 'doxygen')
15 checkdepends=('python' 'fakechroot')
16 optdepends=('perl-locale-gettext: translation support in makepkg-template')
17 provides=('libalpm.so')
18 backup=(etc/pacman.conf
19         etc/makepkg.conf)
20 options=('strip')
21 validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD'  # Allan McRae <allan@archlinux.org>
22               'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
23 source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.xz{,.sig}
24         pacman-always-create-directories-from-debugedit.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/efd0c24c07b86be014a4edb5a8ece021b87e3900.patch
25         pacman-always-create-directories-from-debugedit-fixup.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/86981383a2f4380bda26311831be94cdc743649b.patch
26         pacman-fix-unique-source-paths.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/478af273dfe24ded197ec54ae977ddc3719d74a0.patch
27         pacman-strip-include-o-files-similar-to-kernel-modules.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/de11824527ec4e2561e161ac40a5714ec943543c.patch
28         pacman.conf
29         makepkg.conf)
30 sha256sums=('7d8e3e8c5121aec0965df71f59bedf46052c6cf14f96365c4411ec3de0a4c1a5'
31             'SKIP'
32             '6fed94326b9ecfbb438ab17a4576b5e9d52ecc0f4574f29d46adfde3886dee03'
33             'd2bc104788290e3de829a232590b66ad745cf5b4762a01acc1191ebf70fef114'
34             'f3d4f39ef24e312f610cbb3439fb02bc6b8829e37bcf1a50ae50cd0a69bde5d0'
35             'd87d0c9957c613fda272553bee58140349d151ae399f346ddaf6d75ee5916312'
36             '606e55f06c297d2b508bc4438890b229a1abaa68b0374a2d7f94c8e7be6792d7'
37             '072020e34f2c55b94a9a486829a7eadab0a830ddb4d8e759b0c4e6cf1bde73a6')
39 prepare() {
40   cd "${pkgname}-${pkgver}"
41   # we backport way too often in pacman
42   # lets at least make it more convenient
43   local src
44   for src in "${source[@]}"; do
45     src="${src%%::*}"
46     src="${src##*/}"
47     [[ $src = *.patch ]] || continue
48     msg2 "Applying patch $src..."
49     patch -Np1 < "../$src"
50   done
53 build() {
54   cd "$pkgname-$pkgver"
56   meson --prefix=/usr \
57         --buildtype=plain \
58         -Ddoc=enabled \
59         -Ddoxygen=enabled \
60         -Dscriptlet-shell=/usr/bin/bash \
61         -Dldconfig=/usr/bin/ldconfig \
62         build
64   meson compile -C build
67 check() {
68   cd "$pkgname-$pkgver"
70   meson test -C build
73 package() {
74   cd "$pkgname-$pkgver"
76   DESTDIR="$pkgdir" meson install -C build
78   # install Arch specific stuff
79   install -dm755 "$pkgdir/etc"
80   install -m644 "$srcdir/pacman.conf" "$pkgdir/etc"
81   install -m644 "$srcdir/makepkg.conf" "$pkgdir/etc"