2023-11-19 08:48:58 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -xeuo pipefail
|
|
|
|
|
|
|
|
if [[ -v MIRROR && -n $MIRROR ]]
|
|
|
|
then
|
|
|
|
echo Server = "http://$MIRROR/archlinux/\$repo/os/\$arch" >/etc/pacman.d/mirrorlist
|
|
|
|
fi
|
|
|
|
|
|
|
|
pacman -Syu --noconfirm --needed base-devel git
|
|
|
|
|
|
|
|
useradd -m builduser
|
|
|
|
echo 'builduser ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/builduser
|
|
|
|
echo "MAKEFLAGS=-j$(($(nproc)+1))" >>/etc/makepkg.conf
|
|
|
|
|
2024-04-27 10:22:53 +08:00
|
|
|
su builduser -c "git config --global --add safe.directory $PWD"
|
2023-11-19 08:48:58 +08:00
|
|
|
su builduser -c ./packages/archlinux/buildpkg.sh
|
|
|
|
|
2024-04-27 10:22:53 +08:00
|
|
|
mkdir -p dist
|
|
|
|
cp /tmp/redpanda-cpp-git/redpanda-cpp-git-*.pkg.tar.zst dist/
|