add patch and reversion system
Some checks failed
PikaOS Upstream Package Build & Release (amd64-v3 + LTO) / build (push) Failing after 13s

This commit is contained in:
Ward from fusion-voyager-3 2024-07-27 23:28:56 +03:00
parent 6f1d93fe74
commit 575bae4af2
4 changed files with 32 additions and 7 deletions

34
main.sh
View File

@ -10,22 +10,46 @@ echo "$PIKA_BUILD_ARCH" > pika-build-arch
apt-get source "$PIKA_PACKAGE_NAME=$VERSION" -y
if [ "$PIKA_REBUILD" = true ] ; then
if [ "$PIKA_REBUILD" = true ]
then
VERSION="$VERSION+$PIKA_REBUILD_VERSION"
fi
#TODO - DO PATCHING
#TODO - DO REVERSIONING FOR REBUILD
# Get build deps
#LOGNAME=root dh_make --createorig -y -l -p src-pkg-name_"$VERSION" || echo "dh-make: Ignoring Last Error"
# Get build deps
apt-get build-dep "$PIKA_PACKAGE_NAME=$VERSION" -y
# Enter build dir
cd $(find ./ -maxdepth 1 -name "$PIKA_PACKAGE_NAME*" -type d | head -1)
dpkg-buildpackage --no-sign
# DO PATCHING
if [ "$PIKA_PACKAGE_PATCH" = true ]
then
if cat ./debian/source/format | grep 'quilt'
then
cp -vf ../patches ./debian/
cat ../series >> ./debian/patches/series
else
for i in $(cat ../series)
do
echo "Applying Patch: $i"
patch -Np1 -i ../patches/$i || bash -c "echo "Applying Patch $i Failed!" && exit 2"
done
fi
fi
# Reversion changelog
if [ "$PIKA_REBUILD" = true ]
then
CHANGELOG_DATE=$(date '+%a, %d %b %Y %H:%M:%S %z')
CHANGELOG_APPEND="$PIKA_PACKAGE_NAME ($VERSION) pika; urgency=medium\n\n * PikaOS 4 Rebuild.\n\n -- Ward Nakchbandi <hotrod.master@hotmail.com> $CHANGELOG_DATE\n"
sed -i "1s/^/$CHANGELOG_APPEND\n/" changelog
fi
# Build Binary Packages
dpkg-buildpackage --no-sign
# Move the debs to output
cd ../

0
patches/.keep Normal file → Executable file
View File

View File

@ -1,6 +1,6 @@
export PIKA_PACKAGE_VERSION="1:3.6.1-dmo1"
export PIKA_PACKAGE_NAME="audacity-dmo"
export PIKA_PACKAGE_PATCH=false
export PIKA_REBUILD=false
export PIKA_REBUILD=true
export PIKA_REBUILD_VERSION="b2"
export PIKA_BUILD_ATTEMPT="1"

View File

@ -1,3 +1,4 @@
exit 0
# send debs to server
rsync -azP --include './' --include '*.deb' --exclude '*' ./output/ ferreo@direct.pika-os.com:/srv/www/canary-incoming/