generated from general-packages/pika-pkg-template
Renaud Lepage
3f4c80291a
All checks were successful
PikaOS Package Build Only (amd64-v3) / build (push) Successful in 1m34s
Reviewed-on: #2 Reviewed-by: ferreo <ferreo@noreply.pika> Co-authored-by: Renaud Lepage <root@cybikbase.com> Co-committed-by: Renaud Lepage <root@cybikbase.com>
45 lines
1.0 KiB
Bash
Executable File
45 lines
1.0 KiB
Bash
Executable File
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
. ./pika-build-config.sh
|
|
|
|
echo "$PIKA_BUILD_ARCH" > pika-build-arch
|
|
|
|
VERSION="0.16"
|
|
|
|
# Clone Upstream
|
|
UPSTREAM_NAME="sbctl"
|
|
|
|
# Checkout and munch
|
|
git clone https://github.com/Foxboron/sbctl.git "${UPSTREAM_NAME}" -b "${VERSION}"
|
|
cp -rvf ./debian ./${UPSTREAM_NAME}/
|
|
|
|
# easier than figuring out the right way to override the prefix in the makefile
|
|
sed -i "s/usr\/local/usr/" "${UPSTREAM_NAME}/Makefile"
|
|
sed -i "s/\$(PREFIX)\/bin/\$(PREFIX)\/sbin/" "${UPSTREAM_NAME}/Makefile"
|
|
|
|
# Get in there.
|
|
pushd "./${UPSTREAM_NAME}/" || exit 1
|
|
|
|
# Clever way to auto-add a .0 if the upstream version is not semver
|
|
VER_PER_COUNT="${VERSION//[^\.]}"
|
|
if (( ${#VER_PER_COUNT} < 2 )); then
|
|
TRUE_VERSION="${VERSION}.0"
|
|
else
|
|
TRUE_VERSION="${VERSION}"
|
|
fi
|
|
|
|
# Get build deps
|
|
LOGNAME=root dh_make --createorig -y -l -p "${UPSTREAM_NAME}_$TRUE_VERSION" || echo "dh-make: Ignoring Last Error"
|
|
apt-get build-dep ./ -y
|
|
|
|
# Build package
|
|
dpkg-buildpackage --no-sign
|
|
|
|
popd || exit 2
|
|
|
|
# Move the debs to output
|
|
mkdir -p ./output
|
|
mv ./*.deb ./output/
|