blob: 602b31dde2def3053d08e4b57232d6e4066dd6a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/usr/bin/env bash
set -euo pipefail
container_image_prefix=$1
distro=$2
app_name=$3
arch=$4
channel=$5
version=`just version`
staging="$(mktemp -d)"
just dist
cp _build/meson-dist/map-${version}.tar.xz "${staging}/"
cp build-aux/arch/PKGBUILD "${staging}/"
podman run --rm -v "${staging}:/build:Z" \
${container_image_prefix}:${distro} \
bash -c "
mkdir -p /tmp/pkg
cp /build/*.tar.xz /tmp/pkg
cp /build/PKGBUILD /tmp/pkg
chown -R builder:builder /tmp/pkg
su builder -c 'cd /tmp/pkg && PKGEXT=.pkg.tar.gz makepkg -f'
mkdir -p /build/out
cp /tmp/pkg/map-${version}-1-${arch}.pkg.tar.gz /build/out/
"
mkdir -p dist
cp ${staging}/out/*.pkg.tar.gz "dist/${app_name}-${arch}-${channel}-${distro}.pkg.tar.gz"
rm -rf "${staging}"
|