From 49ed3e03ded4c8e0c642e6651a84648b5e4d766a Mon Sep 17 00:00:00 2001 From: idk Date: Sat, 1 Jul 2023 15:51:25 -0400 Subject: [PATCH] Add launchpad scripts --- dput.cf | 11 ++++++----- env.sh | 60 +++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 54 insertions(+), 17 deletions(-) diff --git a/dput.cf b/dput.cf index 2a2857d..d628e27 100644 --- a/dput.cf +++ b/dput.cf @@ -1,6 +1,7 @@ + [i2p-community] -fqdn = ppa.launchpad.net -method = ftp -incoming = ~i2p-community/i2p-community/ubuntu/ -login = anonymous -allow_unsigned_uploads = 0 +fqdn = ppa.launchpad.net +method = ftp +incoming = ~i2p-community/ppa +login = anonymous +allow_unsigned_uploads = 0 diff --git a/env.sh b/env.sh index 5a45c8b..357c248 100755 --- a/env.sh +++ b/env.sh @@ -381,47 +381,83 @@ git_tag() { home } +debian_orig() { + export TZ=UTC + if [ ! -d "$I2P_REPOSITORY_DIR".bionic ]; then + git clone "$I2P_REPOSITORY_DIR" "$I2P_REPOSITORY_DIR".bionic + cd "$I2P_REPOSITORY_DIR".bionic + cp -rv "debian-alt/$DISTRO/"* debian/ + fi + if [ -f "i2p_$I2P_VERSION.orig.tar.bz2" ]; then + ant debian-release-tarball + fi + home +} + debian_bionic() { export TZ=UTC - git clone "$I2P_REPOSITORY_DIR" "$I2P_REPOSITORY_DIR".bionic - cd "$I2P_REPOSITORY_DIR".bionic - cp -rv debian-alt/bionic/* debian/ - ant debian-release-tarball - home + export DISTRO=bionic + cp -rv "$I2P_REPOSITORY_DIR".bionic/debian-alt/$DISTRO/* "i2p-$I2P_VERSION-"*/debian/ cd "i2p-$I2P_VERSION-"* || return - cp -rv "$I2P_REPOSITORY_DIR".bionic/debian-alt/bionic/* debian/ + # update the files in orig.tar.bz2 + tar -jcvf "$WORK_HOME/i2p_$I2P_VERSION.orig.tar.bz2" . debuild -S -sa -k"$PRIVKEY_SU3_ID" home } debian_focal() { export TZ=UTC + export DISTRO=focal + cp -rv "$I2P_REPOSITORY_DIR".bionic/debian-alt/$$DISTRO/* "i2p-$I2P_VERSION-"*/debian/ cd "i2p-$I2P_VERSION-"* || return - cp -rv "$I2P_REPOSITORY_DIR".bionic/debian-alt/focal/* debian/ - debuild -S -sa -k"$PRIVKEY_SU3_ID" + tar -jcvf "$WORK_HOME/i2p_$I2P_VERSION.orig.tar.bz2" . + debuild -S -sd -k"$PRIVKEY_SU3_ID" home } debian_lunar() { export TZ=UTC + export DISTRO=lunar + cp -rv "$I2P_REPOSITORY_DIR".bionic/debian-alt/$DISTRO/* "i2p-$I2P_VERSION-"*/debian/ cd "i2p-$I2P_VERSION-"* || return - cp -rv "$I2P_REPOSITORY_DIR".bionic/debian-alt/lunar/* debian/ - debuild -S -sa -k"$PRIVKEY_SU3_ID" + tar -jcvf "$WORK_HOME/i2p_$I2P_VERSION.orig.tar.bz2" . + debuild -S -sd -k"$PRIVKEY_SU3_ID" home } -debian_all() { +bionic() { debian_bionic debian_dput +} + +focal() { debian_focal debian_dput +} + +lunar() { debian_lunar debian_dput +} + +debian_all() { + bionic + focal + lunar home } debian_dput() { - dput -c dput.cf "$LAUNCHPAD_ID" "i2p_$I2P_VERSION-1ubuntu1_source.changes" + if [ -z "$DISTRO" ]; then + DISTRO=ubuntu + fi + rm -f "i2p_$I2P_VERSION-1ubuntu1_source.i2p-community.upload" + dput -c dput.cf "$LAUNCHPAD_ID" "i2p_$I2P_VERSION"*"$DISTRO"*"_source.changes" +} + +debian_clean() { + mkdir debian-bak + mv i2p_* debian-bak } run_all() {