diff options
author | Christian Breunig <christian@breunig.cc> | 2023-11-06 21:34:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-06 21:34:45 +0100 |
commit | aeda9f37f569e4b9b19cf17748a502fa70d70e77 (patch) | |
tree | 933612a23f040a86fb2ba4af3a8788f955dbcd5a /packages/ddclient/build.sh | |
parent | 74b06c308bb6316704d58a5a4386c8dda3c363f2 (diff) | |
parent | f3cc9f58b60a8b9d69fe741e6e6811d06bd82a15 (diff) | |
download | vyos-build-aeda9f37f569e4b9b19cf17748a502fa70d70e77.tar.gz vyos-build-aeda9f37f569e4b9b19cf17748a502fa70d70e77.zip |
Merge pull request #453 from indrajitr/ddclient-bump-311
ddclient: T5708: Upgrade to ddclient 3.11.1
Diffstat (limited to 'packages/ddclient/build.sh')
-rwxr-xr-x | packages/ddclient/build.sh | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/packages/ddclient/build.sh b/packages/ddclient/build.sh index 76a03815..82e9b899 100755 --- a/packages/ddclient/build.sh +++ b/packages/ddclient/build.sh @@ -1,26 +1,49 @@ -#!/bin/sh +#!/bin/bash CWD=$(pwd) set -e -SRC=ddclient -if [ ! -d ${SRC} ]; then - echo "Source directory does not exists, please 'git clone'" +SRC_DEBIAN=ddclient-debian +SRC_GITHUB=ddclient-github + +if [ ! -d ${SRC_DEBIAN} ]; then + echo "${SRC_DEBIAN} directory does not exists, please 'git clone'" + exit 1 +fi + +if [ ! -d ${SRC_GITHUB} ]; then + echo "${SRC_GITHUB} directory does not exists, please 'git clone'" exit 1 fi +echo "I: Copy Debian build instructions" +cp -a ${SRC_DEBIAN}/debian ${SRC_GITHUB} +# Preserve some of the Debian's default patches +cat > ${SRC_GITHUB}/debian/patches/series << EOF +maxinterval.diff +news.diff +EOF +# Remove vestigial documentation +sed -i '/README\.ssl/d' ${SRC_GITHUB}/debian/docs + PATCH_DIR=${CWD}/patches -if [ -d $PATCH_DIR ]; then +if [ -d ${PATCH_DIR} ]; then for patch in $(ls ${PATCH_DIR}) do echo "I: Apply patch: ${patch} to main repository" - cp ${PATCH_DIR}/${patch} ${SRC}/debian/patches/ - echo ${patch} >> ${SRC}/debian/patches/series + cp ${PATCH_DIR}/${patch} ${SRC_GITHUB}/debian/patches/ + echo ${patch} >> ${SRC_GITHUB}/debian/patches/series done fi -cd ${SRC} -echo "I: bump version" -dch -v "3.10.0-3+vyos0" "Patchset for miscellaneous fixes" +cd ${SRC_GITHUB} + +echo "I: Ensure Debian build dependencies are met" +sudo mk-build-deps --install --tool "apt-get --yes --no-install-recommends" + +echo "I: Bump Debian Package version" +version="$(git describe --tags)" +dch -v "${version:1}+vyos0" "Patchset for miscellaneous fixes" +dch -a "Forward port to upstream version ${version:1}" echo "I: Build Debian Package" dpkg-buildpackage -uc -us -tc -b |