Use makepkg's options instead of moving stuff around
This commit is contained in:
parent
d9d6b0f886
commit
2a1ed4b054
1 changed files with 8 additions and 6 deletions
14
makepkg.sh
14
makepkg.sh
|
@ -4,11 +4,14 @@ set -e
|
||||||
|
|
||||||
echo "Building on: $DRONE_STAGE_MACHINE"
|
echo "Building on: $DRONE_STAGE_MACHINE"
|
||||||
|
|
||||||
sudo chown -R builder:builder "$DRONE_WORKSPACE_BASE"
|
|
||||||
|
|
||||||
AUR_URL="https://aur.archlinux.org"
|
AUR_URL="https://aur.archlinux.org"
|
||||||
OUTDIR="$DRONE_WORKSPACE_BASE/out"
|
OUTDIR="$DRONE_WORKSPACE_BASE/out"
|
||||||
mkdir -p "$OUTDIR"
|
mkdir -p "$OUTDIR"
|
||||||
|
sudo chown -R builder:builder "$OUTDIR"
|
||||||
|
|
||||||
|
export PKGDEST="$OUTDIR"
|
||||||
|
export SRCDEST="$HOME"
|
||||||
|
export BUILDDIR="$HOME"
|
||||||
|
|
||||||
if [ "$PLUGIN_AUTO_MAKEFLAGS" != "no" ]; then
|
if [ "$PLUGIN_AUTO_MAKEFLAGS" != "no" ]; then
|
||||||
echo "MAKEFLAGS='-j$(nproc)'" | sudo tee -a /etc/makepkg.conf
|
echo "MAKEFLAGS='-j$(nproc)'" | sudo tee -a /etc/makepkg.conf
|
||||||
|
@ -27,10 +30,12 @@ fi
|
||||||
# Clone package repo
|
# Clone package repo
|
||||||
if [ "$PLUGIN_AUR" != "" ]; then
|
if [ "$PLUGIN_AUR" != "" ]; then
|
||||||
echo "Building AUR package: $PLUGIN_AUR"
|
echo "Building AUR package: $PLUGIN_AUR"
|
||||||
|
cd ~
|
||||||
git clone "$AUR_URL/$PLUGIN_AUR.git" package
|
git clone "$AUR_URL/$PLUGIN_AUR.git" package
|
||||||
cd package
|
cd package
|
||||||
elif [ "$PLUGIN_REPO" != "" ]; then
|
elif [ "$PLUGIN_REPO" != "" ]; then
|
||||||
echo "Building package from git repository: $PLUGIN_REPO"
|
echo "Building package from git repository: $PLUGIN_REPO"
|
||||||
|
cd ~
|
||||||
git clone "$PLUGIN_REPO" package
|
git clone "$PLUGIN_REPO" package
|
||||||
cd package
|
cd package
|
||||||
else
|
else
|
||||||
|
@ -46,7 +51,4 @@ fi
|
||||||
echo "Running build"
|
echo "Running build"
|
||||||
makepkg -sAc --skippgpcheck --noconfirm --noprogressbar "$PKGBUILD"
|
makepkg -sAc --skippgpcheck --noconfirm --noprogressbar "$PKGBUILD"
|
||||||
|
|
||||||
echo "Moving packages to output directory: $OUTDIR"
|
sudo chown -R root:root "$OUTDIR"
|
||||||
mv *.pkg.* "$OUTDIR/"
|
|
||||||
|
|
||||||
sudo chown -R root:root "$DRONE_WORKSPACE_BASE"
|
|
||||||
|
|
Loading…
Reference in a new issue