2023-04-04 00:19:11 +02:00
|
|
|
#! /bin/bash
|
|
|
|
|
2024-07-23 23:14:47 +02:00
|
|
|
set -e
|
|
|
|
|
|
|
|
VERSION="1.0"
|
|
|
|
|
2024-07-22 22:23:58 +02:00
|
|
|
export DEBIAN_FRONTEND="noninteractive"
|
|
|
|
export DEB_BUILD_MAINT_OPTIONS="optimize=+lto -march=x86-64-v3 -O3 -flto -fuse-linker-plugin -falign-functions=32"
|
|
|
|
export DEB_CFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto -fuse-linker-plugin -falign-functions=32"
|
|
|
|
export DEB_CPPFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto -fuse-linker-plugin -falign-functions=32"
|
|
|
|
export DEB_CXXFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto -fuse-linker-plugin -falign-functions=32"
|
|
|
|
export DEB_LDFLAGS_MAINT_APPEND="-march=x86-64-v3 -O3 -flto -fuse-linker-plugin -falign-functions=32"
|
|
|
|
export DEB_BUILD_OPTIONS="nocheck notest terse"
|
|
|
|
export DPKG_GENSYMBOLS_CHECK_LEVEL=0
|
2023-04-04 00:19:11 +02:00
|
|
|
|
|
|
|
# Clone Upstream
|
2023-05-11 17:57:32 +02:00
|
|
|
mkdir -p ./src-pkg-name
|
|
|
|
cp -rvf ./debian ./src-pkg-name/
|
|
|
|
cd ./src-pkg-name/
|
2023-04-04 00:19:11 +02:00
|
|
|
|
|
|
|
# Get build deps
|
2024-07-23 23:14:47 +02:00
|
|
|
LOGNAME=root dh_make --createorig -y -l -p src-pkg-name_"$VERSION" || echo "dh-make: Ignoring Last Error"
|
2023-04-04 00:19:11 +02:00
|
|
|
apt-get build-dep ./ -y
|
|
|
|
|
|
|
|
# Build package
|
|
|
|
dpkg-buildpackage --no-sign
|
|
|
|
|
|
|
|
# Move the debs to output
|
|
|
|
cd ../
|
|
|
|
mkdir -p ./output
|
|
|
|
mv ./*.deb ./output/
|