pacman/PKGBUILD

98 lines
3.1 KiB
Bash
Raw Normal View History

2024-05-06 20:56:28 +08:00
# 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
2024-11-01 22:29:56 +08:00
pkgver=7.0.0.r3.g7736133
_git_tag=7.0.0
_git_patch_level_commit=77361331ae3864c6ea880e715c5864d59336f275
pkgrel=1
2024-05-06 20:56:28 +08:00
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')
2024-11-01 22:29:56 +08:00
depends=(
'bash'
'coreutils'
'curl'
'gawk'
'gettext'
'glibc'
'gnupg'
'gpgme'
'grep'
'libarchive'
'systemd'
'zstd')
makedepends=('doxygen' 'git' 'meson' 'python-asciidoc')
2024-05-06 20:56:28 +08:00
backup=(etc/pacman.conf
2024-10-17 17:54:42 +08:00
etc/makepkg.conf
etc/makepkg.conf.d/future-build.conf
etc/makepkg.conf.d/rust.conf
etc/pacman.d/mirrorlist)
2024-11-01 22:29:56 +08:00
source=(git+https://gitlab.archlinux.org/pacman/pacman.git#tag=v${_git_tag}
revertme-makepkg-remove-libdepends-and-libprovides.patch::https://gitlab.archlinux.org/pacman/pacman/-/commit/354a300cd26bb1c7e6551473596be5ecced921de.patch
2024-10-17 17:54:42 +08:00
future-build.conf
makepkg.conf
pacman.conf
rust.conf
mirrorlist)
2024-11-01 22:29:56 +08:00
sha256sums=(SKIP
2024-10-17 17:54:42 +08:00
b3bce9d662e189e8e49013b818f255d08494a57e13fc264625f852f087d3def2
2024-10-25 01:38:13 +08:00
58ad3c7e09e86a6f493a00235a34d09adc9bdedcab2f4731463074ed7bbe992b
2024-10-17 18:25:15 +08:00
128c4737dedd58e0b0ffec306feaf1752260591b1222bdcb32c22bcaf8a8a44a
2024-10-17 17:54:42 +08:00
f6faafd6691a2b11e98996ff09500803ade4d0e943e7bff08c59e4e42b171da5
851385788fcef9eba37c7b9403d0010ccc94800b3279bc60ab5fcabc6ee8d321
6c5163c174d451fb42f86670f99343782d736db1c3304f4e043452dc0eec3125)
2024-05-06 20:56:28 +08:00
2024-11-01 22:29:56 +08:00
pkgver() {
cd ${pkgname}
git describe --abbrev=7 --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
2024-05-06 20:56:28 +08:00
prepare() {
2024-11-01 22:29:56 +08:00
cd ${pkgname}
# apply patch level commits on top of annotated tag
if [[ -n ${_git_patch_level_commit} ]]; then
if [[ v${_git_tag} != $(git describe --tags --abbrev=0 "${_git_patch_level_commit}") ]] then
error "patch level commit ${_git_patch_level_commit} is not a descendant of v${_git_tag}"
exit 1
fi
git rebase "${_git_patch_level_commit}"
fi
2024-05-06 20:56:28 +08:00
2024-10-17 17:54:42 +08:00
patch -RNp1 < ${srcdir}/revertme-makepkg-remove-libdepends-and-libprovides.patch
2024-05-06 20:56:28 +08:00
}
build() {
2024-11-01 22:29:56 +08:00
cd ${pkgname}
2024-05-06 20:56:28 +08:00
2024-10-25 01:38:13 +08:00
${FUTURE_MESON} \
2024-10-17 17:54:42 +08:00
-Dpkg-ext=".pkg.tar.zst" \
-Dsrc-ext=".src.tar.zst" \
-Dcrypto=openssl \
-Ddoc=enabled \
-Dscriptlet-shell=/usr/bin/bash \
-Dldconfig=/usr/sbin/ldconfig
2024-05-06 20:56:28 +08:00
2024-10-17 17:54:42 +08:00
meson compile -C build
2024-05-06 20:56:28 +08:00
}
package() {
2024-11-01 22:29:56 +08:00
cd ${pkgname}
2024-05-06 20:56:28 +08:00
2024-10-17 17:54:42 +08:00
meson install -C build --destdir ${pkgdir}
2024-05-06 20:56:28 +08:00
2024-10-17 17:54:42 +08:00
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
2024-05-06 20:56:28 +08:00
}