makepkg/makepkg

97 lines
2.8 KiB
Plaintext
Raw Permalink Normal View History

2020-06-22 11:59:36 +02:00
#!/bin/bash
GITPACKAGE=~/git/eole/git-package/git-package
export EDITOR=/bin/true
2022-01-17 11:17:37 +01:00
MASTER_INSTABLE=2.9
MASTER=$MASTER_INSTABLE.0
2022-12-02 12:35:27 +01:00
MASTER_DEV=false
2020-06-22 11:59:36 +02:00
INSTABLE_27=2.7.3
CURRENT_REF=$(git symbolic-ref -q HEAD)
CURRENT_BRANCH=$(echo "$CURRENT_REF" | awk -F'/' '{ print $3 }')
CURRENT_SUBBR=$(echo "$CURRENT_REF" | awk -F'/' '{ print $4 }')
echo $CURRENT_BRANCH
if [ "$CURRENT_BRANCH" = "master" ]; then
VERSION=$MASTER
2021-07-16 09:20:06 +02:00
ORI_BR=master
2020-06-22 11:59:36 +02:00
else
VERSION=$CURRENT_BRANCH
if [ ! "$CURRENT_SUBBR" = 'master' ]; then
echo "impossible de déterminer la branche"
exit 1
2020-06-22 11:59:36 +02:00
fi
2021-07-16 09:20:06 +02:00
ORI_BR=$VERSION/master
2020-06-22 11:59:36 +02:00
fi
set -e
2021-07-16 09:20:06 +02:00
if [ $MASTER_DEV = true ] && [ $VERSION = $MASTER ]; then
2020-06-22 11:59:36 +02:00
DEPOT=eole-$MASTER_INSTABLE/unstable
elif [ $VERSION = $INSTABLE_27 ]; then
ORI_BR=$VERSION/master
DEPOT=eole-2.7/unstable
else
DEPOT=eole-$VERSION/proposed-updates
fi
2021-07-16 09:20:06 +02:00
echo "attention version $VERSION ($DEPOT)"
2020-06-22 11:59:36 +02:00
DIST_BR=dist/eole/$VERSION/master
git push
git checkout $DIST_BR
if [ $CURRENT_BRANCH = 'master' ]; then
2022-02-14 14:05:24 +01:00
if grep -q Zgzip debian/rules; then
echo "compilable en 2.9"
else
echo "NON COMPILABLE EN 2.9"
2022-02-16 16:18:45 +01:00
echo "Voir des exemples de modifications ici : https://dev-eole.ac-dijon.fr/issues/33643#note-6 (notamment la partie dh_builddeb)"
git checkout $ORI_BR > /dev/null 2>&1
git branch -d $DIST_BR > /dev/null 2>&1
exit 1
fi
if grep -q dh_systemd_enable debian/rules; then
echo "NON COMPILABLE EN 2.9"
echo "Voir des exemples de modifications ici : https://dev-eole.ac-dijon.fr/issues/33643#note-6 (notamment la partie systemd)"
git checkout $ORI_BR > /dev/null 2>&1
git branch -d $DIST_BR > /dev/null 2>&1
exit 1
else
echo "systemd ok"
fi
if [ -f debian/compat ]; then
if grep -q 1 debian/compat; then
echo "bonne version compat"
else
echo "NON COMPILABLE EN 2.9"
echo "Il doit y avoir au moins 10 (idéalement 13) dans debian/compat !!!"
git checkout $ORI_BR > /dev/null 2>&1
git branch -d $DIST_BR > /dev/null 2>&1
exit 1
fi
fi
2022-03-01 15:26:48 +01:00
if grep -q "with systemd" debian/control; then
echo "NON COMPILABLE EN 2.9"
echo "Supprimer --with systemd dans debian/control !!!"
git checkout $ORI_BR > /dev/null 2>&1
git branch -d $DIST_BR > /dev/null 2>&1
exit 1
else
echo "pas de with systemd"
2022-03-01 15:26:48 +01:00
fi
2022-03-01 12:28:15 +01:00
if grep -q dh-systemd debian/control; then
echo "NON COMPILABLE EN 2.9"
echo "Dépendance à dh-systemd dans debian/control !!!"
git checkout $ORI_BR > /dev/null 2>&1
git branch -d $DIST_BR > /dev/null 2>&1
exit 1
else
echo "pas de dh-systemd"
fi
fi
2020-06-22 11:59:36 +02:00
git pull --rebase
git merge $ORI_BR
git push
yes | $GITPACKAGE -b -d $DEPOT
git checkout $ORI_BR
git branch -d $DIST_BR