pacman/PKGBUILD
2024-10-25 01:38:13 +08:00

83 lines
2.9 KiB
Bash

# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=pacman
pkgver=7.0.0
pkgrel=2
pkgdesc="A library-based package manager with dependency support"
arch=('x86_64')
url="https://www.archlinux.org/pacman/"
license=('GPL-2.0-or-later')
groups=('base' 'base-devel')
depends=('bash' 'glibc' 'libarchive' 'curl' 'gpgme'
'gettext' 'gawk' 'coreutils' 'gnupg' 'grep' 'zstd')
makedepends=('meson' 'python-asciidoc' 'doxygen')
backup=(etc/pacman.conf
etc/makepkg.conf
etc/makepkg.conf.d/future-build.conf
etc/makepkg.conf.d/rust.conf
etc/pacman.d/mirrorlist)
source=(https://gitlab.archlinux.org/pacman/pacman/-/releases/v${pkgver}/downloads/${pkgname}-${pkgver}.tar.xz
revertme-makepkg-remove-libdepends-and-libprovides.patch
future-build.conf
makepkg.conf
pacman.conf
rust.conf
alpm.sysusers
mirrorlist)
sha256sums=(61cbd445d1381b4b184bc7c4e2791f07a79f0f2807b7c600399d0d08e8cd28cf
b3bce9d662e189e8e49013b818f255d08494a57e13fc264625f852f087d3def2
58ad3c7e09e86a6f493a00235a34d09adc9bdedcab2f4731463074ed7bbe992b
128c4737dedd58e0b0ffec306feaf1752260591b1222bdcb32c22bcaf8a8a44a
f6faafd6691a2b11e98996ff09500803ade4d0e943e7bff08c59e4e42b171da5
851385788fcef9eba37c7b9403d0010ccc94800b3279bc60ab5fcabc6ee8d321
c8760d7ebb6c9817d508c691c67084be251cd9c8811ee1ccf92c1278bad74c1c
6c5163c174d451fb42f86670f99343782d736db1c3304f4e043452dc0eec3125)
prepare() {
cd ${pkgname}-${pkgver}
patch -RNp1 < ${srcdir}/revertme-makepkg-remove-libdepends-and-libprovides.patch
}
build() {
cd ${pkgname}-${pkgver}
${FUTURE_MESON} \
-Dpkg-ext=".pkg.tar.zst" \
-Dsrc-ext=".src.tar.zst" \
-Dcrypto=openssl \
-Ddoc=enabled \
-Dscriptlet-shell=/usr/bin/bash \
-Dldconfig=/usr/sbin/ldconfig
meson compile -C build
}
package() {
cd ${pkgname}-${pkgver}
meson install -C build --destdir ${pkgdir}
install -m644 ${srcdir}/makepkg.conf ${pkgdir}/etc
install -m644 ${srcdir}/pacman.conf ${pkgdir}/etc
install -vm644 ${srcdir}/future-build.conf ${pkgdir}/etc/makepkg.conf.d
install -vm644 ${srcdir}/rust.conf ${pkgdir}/etc/makepkg.conf.d
install -vDm644 ${srcdir}/mirrorlist ${pkgdir}/etc/pacman.d/mirrorlist
install -D -m644 ${srcdir}/alpm.sysusers ${pkgdir}/usr/lib/sysusers.d/alpm.conf
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
}