jobcore/pacman/PKGBUILD

115 lines
3.8 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=pacman
pkgver=6.1.0
pkgrel=01
pkgdesc="A library-based package manager with dependency support modified for joborun from arch"
url="https://www.archlinux.org/pacman/"
groups=(base jobbot)
depends=('bash' 'glibc' 'libarchive' 'curl' 'gpgme' 'pacman-mirrorlist'
'jobo-mirror' 'gawk' 'coreutils' 'gnupg' 'grep' 'archlinux-keyring'
'obarun-keyring' 'joborun-keyring' 'lzip')
# NOTE: Joborun linux is switching default pkg compression to lzip at level -5
# which matches current xz compression ratio but at a fraction of RAM use
# and relatively even speed. So lzip becomes a standard system dependency
# as it will also be used by pacman during installation. Gradually all
# pkgs will be offered as *.pkg.tar.lz For a while there will be mixed.
makedepends=('meson' 'asciidoc' 'doxygen' 'gettext')
checkdepends=('python' 'fakechroot')
optdepends=('perl-locale-gettext: translation support in makepkg-template')
provides=('libalpm.so')
backup=(etc/pacman.conf
etc/makepkg.conf)
#options=('strip' 'debug')
options=('strip')
source=(https://gitlab.archlinux.org/pacman/pacman/-/releases/v$pkgver/downloads/pacman-$pkgver.tar.xz{,.sig}
revertme-makepkg-remove-libdepends-and-libprovides.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/354a300cd26bb1c7e6551473596be5ecced921de.patch
pacman.conf
makepkg.conf)
## install="pacman.install"
prepare() {
cd "$pkgname-$pkgver"
# handle patches
local -a patches
patches=($(printf '%s\n' "${source[@]}" | grep '.patch'))
patches=("${patches[@]%%::*}")
patches=("${patches[@]##*/}")
if (( ${#patches[@]} != 0 )); then
for patch in "${patches[@]}"; do
if [[ $patch =~ revertme-* ]]; then
msg2 "Reverting patch $patch..."
patch -RNp1 < "../$patch"
else
msg2 "Applying patch $patch..."
patch -Np1 < "../$patch"
fi
done
fi
}
build() {
cd "$pkgname-$pkgver"
meson --prefix=/usr \
--buildtype=plain \
-Ddoc=enabled \
-Ddoxygen=enabled \
-Dscriptlet-shell=/usr/bin/bash \
-Dldconfig=/usr/bin/ldconfig \
build
meson compile -C build
}
check() {
cd "$pkgname-$pkgver"
meson test -C build
}
package() {
cd "$pkgname-$pkgver"
DESTDIR="$pkgdir" meson install -C build
# install Arch specific stuff
install -dm755 "$pkgdir/etc"
install -m644 "$srcdir/pacman.conf" "$pkgdir/etc"
install -m644 "$srcdir/makepkg.conf" "$pkgdir/etc"
# local wantsdir="$pkgdir/usr/lib/systemd/system/sockets.target.wants"
local wantsdir="$pkgdir/usr/lib/pacman/sockets.target.wants"
install -dm755 "$wantsdir"
local unit
for unit in dirmngr gpg-agent gpg-agent-{browser,extra,ssh} keyboxd; do
ln -s "../${unit}@.socket" "$wantsdir/${unit}@etc-pacman.d-gnupg.socket"
done
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL-2.0-or-later')
validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org>
'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
sha256sums=(5a60ac6e6bf995ba6140c7d038c34448df1f3daa4ae7141d2cad88eeb5f1f9d9 # pacman-6.1.0.tar.xz
d12ce27098e2426f8e482b4334e9d3dbe7f57524a536a289990f8b99e5e3a8aa # pacman-6.1.0.tar.xz.sig
b3bce9d662e189e8e49013b818f255d08494a57e13fc264625f852f087d3def2 # revertme-makepkg-remove-libdepends-and-libprovides.patch
56afa185068a3941e5ff49836d69b1e5d8191521cc7e54b01feb0edac6d8e736 # pacman.conf
3e5a8edab365c52b2e957681b8a567b9600afd1c24d037f538369c4935b52d5b) # makepkg.conf
## 4cba0a76e6ad69dfd23fa1cf65a488aa3426da11e1567f887e4e23ade733a27f pacman-6.1.0-01-x86_64.pkg.tar.lz