22 lines
591 B
Bash
Executable File
22 lines
591 B
Bash
Executable File
#!/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
|
|
|
|
cd $SOURCE_DIR
|
|
su builduser -c "git config --global --add safe.directory $SOURCE_DIR"
|
|
su builduser -c ./packages/archlinux/buildpkg.sh
|
|
|
|
mkdir -p $SOURCE_DIR/dist
|
|
cp /tmp/redpanda-cpp-git/redpanda-cpp-git-*.pkg.tar.zst $SOURCE_DIR/dist/
|