PKGBUILDs/core/pacman/PKGBUILD

139 lines
5.4 KiB
Bash
Raw Normal View History

2022-11-05 02:24:21 +00:00
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
2010-07-10 01:32:36 +00:00
2012-01-17 22:38:54 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2024-03-16 00:14:20 +00:00
# - arch/host/flags for armv7h, and aarch64
# - pacman.conf: architecture=armv7h/aarch64, added our aur and alarm repos
# - makepkg.conf: adjusted C/CXX/LDFLAGS
2014-04-23 00:34:32 +00:00
# - patch to sync filesystem after install/remove
2016-03-12 03:16:56 +00:00
# - reverts to allow scriplet input on stdin
2019-05-21 01:01:49 +00:00
# - patch to fix application/gzip change in file 5.37
2011-02-06 20:16:05 +00:00
pkgname=pacman
2024-03-16 00:14:20 +00:00
pkgver=6.1.0
pkgrel=3
pkgdesc="A library-based package manager with dependency support"
2018-05-03 12:33:23 +00:00
arch=('x86_64')
2019-03-01 03:38:38 +00:00
url="https://www.archlinux.org/pacman/"
2024-02-08 00:31:02 +00:00
license=('GPL-2.0-or-later')
2022-07-27 12:41:44 +00:00
depends=('bash' 'glibc' 'libarchive' 'curl' 'gpgme' 'pacman-mirrorlist'
'gettext' 'gawk' 'coreutils' 'gnupg' 'grep')
2021-06-01 18:57:01 +00:00
makedepends=('meson' 'asciidoc' 'doxygen')
2019-10-23 12:52:21 +00:00
checkdepends=('python' 'fakechroot')
optdepends=('perl-locale-gettext: translation support in makepkg-template')
provides=('libalpm.so')
2019-01-10 13:32:21 +00:00
backup=(etc/pacman.conf
etc/makepkg.conf)
2023-03-18 23:19:58 +00:00
options=('strip')
2017-06-16 01:07:31 +00:00
validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org>
'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
2024-03-16 00:14:20 +00:00
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
"$pkgname-fix-msg-unknown-key.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/6bb95c8856437513ee0ab19226bc090d6fd0fb06.patch"
"$pkgname-man-gitlab.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/95f148c2222db608a0d72d5c5577d0c71e7fa199.patch"
"$pkgname-make-aligned-titles.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/5e0496260b7d3f9c9fcf2b1c4899e4dbcc20ff03.patch"
"$pkgname-repo-add-parseopts.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/0571ee82bff0edbd5ffac2228d4e6ac510b9008e.patch"
"$pkgname-drop-result-warn.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/111eed0251238a9d3f90e76d62f2ac01aeccce48.patch"
"$pkgname-fix-debugedit.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/bae9594ac1806ce30f2af1de27c49bb101a00d44.patch"
2014-04-23 00:34:32 +00:00
0001-Sychronize-filesystem.patch
2016-02-01 13:19:58 +00:00
0002-Revert-close-stdin-before-running-install-scripts.patch
2016-03-12 03:16:56 +00:00
0003-Revert-alpm_run_chroot-always-connect-parent2child-p.patch
pacman.conf
2021-06-01 18:57:01 +00:00
makepkg.conf)
2024-03-16 00:14:20 +00:00
sha256sums=('5a60ac6e6bf995ba6140c7d038c34448df1f3daa4ae7141d2cad88eeb5f1f9d9'
2017-06-16 01:07:31 +00:00
'SKIP'
2024-03-16 00:14:20 +00:00
'b3bce9d662e189e8e49013b818f255d08494a57e13fc264625f852f087d3def2'
'94c987046c2ff232fa0d395cddc11644840d767806711e04ef34f876a9baf217'
'0774d7035e34661f74b673d4b0a94be877bdc0158a555b873ec6bd4e2c936377'
'7bb64910265ce2590f593cdfd302076e49f67a68f8cc792a9aaac572d36fc842'
'2bbfe40539513ff5775aaf900644c8985ef618f5df9af856b9d571e2501365b0'
'160515b741aadc876a67f213029f5f62a51ff072ea4aaeb687bbe614035bf72f'
'1f4e4cc54332e60c9da2bdabf9a80dc11db466535f1a0be298cbf654f0723721'
'98b500555072c84fb5c55a860685adf99eb3bdf674bf11855a9e9920746363fb'
'64e56e6f66f935029bb7c81382b98b71a39a69c13b1e4f80455fdbb1718e051e'
'd344075eb0d5a0aefb1aed27eb337be78221080808f9f516215d675bcdd27ca2'
2023-06-03 18:00:12 +00:00
'6456e1ad704565d1e401b2b94fcfd1c75be290aa92ac9437343625209e7793ab'
2024-03-16 00:14:20 +00:00
'72969c7f4ce130e3424f28f3b300abea62d07450cd83b107f2f66c3c66330c00')
2014-04-23 00:34:32 +00:00
prepare() {
2018-05-29 00:53:59 +00:00
cd "$pkgname-$pkgver"
2024-03-16 00:14:20 +00:00
# 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
2014-04-23 00:34:32 +00:00
}
2010-04-27 01:52:11 +00:00
build() {
2014-05-09 01:55:26 +00:00
cd "$pkgname-$pkgver"
2011-08-14 16:34:13 +00:00
2021-06-01 18:57:01 +00:00
meson --prefix=/usr \
--buildtype=plain \
-Ddoc=enabled \
-Ddoxygen=enabled \
-Dscriptlet-shell=/usr/bin/bash \
-Dldconfig=/usr/bin/ldconfig \
build
meson compile -C build
2009-12-07 20:25:36 +00:00
}
2012-02-14 14:35:38 +00:00
check() {
2021-06-01 18:57:01 +00:00
cd "$pkgname-$pkgver"
meson test -C build
2012-02-14 14:35:38 +00:00
}
2009-12-07 20:25:36 +00:00
package() {
2014-05-09 01:55:26 +00:00
cd "$pkgname-$pkgver"
2021-06-01 18:57:01 +00:00
DESTDIR="$pkgdir" meson install -C build
2009-12-07 20:25:36 +00:00
# install Arch specific stuff
2014-05-09 01:55:26 +00:00
install -dm755 "$pkgdir/etc"
2018-05-29 00:53:59 +00:00
install -m644 "$srcdir/pacman.conf" "$pkgdir/etc"
2014-05-09 01:55:26 +00:00
case $CARCH in
2011-06-22 00:48:50 +00:00
armv7h)
mycarch="armv7h"
2012-07-08 17:41:39 +00:00
mychost="armv7l-unknown-linux-gnueabihf"
2022-02-07 03:10:09 +00:00
myflags="-march=armv7-a -mfloat-abi=hard -mfpu=neon "
2011-05-02 02:46:30 +00:00
;;
2015-07-05 01:43:31 +00:00
aarch64)
mycarch="aarch64"
mychost="aarch64-unknown-linux-gnu"
myflags="-march=armv8-a "
;;
2011-05-02 02:46:30 +00:00
esac
2014-05-09 01:55:26 +00:00
install -m644 "$srcdir/makepkg.conf" "$pkgdir/etc"
sed -i "$pkgdir/etc/makepkg.conf" \
2011-02-06 20:13:24 +00:00
-e "s|@CARCH[@]|$mycarch|g" \
-e "s|@CHOST[@]|$mychost|g" \
-e "s|@CARCHFLAGS[@]|$myflags|g"
2012-01-17 22:38:54 +00:00
sed -i $pkgdir/etc/pacman.conf -e "s|@CARCH[@]|$mycarch|g"
2024-02-08 00:31:02 +00:00
local wantsdir="$pkgdir/usr/lib/systemd/system/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
}
2023-09-26 23:20:59 +00:00
# vim: set ts=2 sw=2 et: