generate_package.sh 630 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#!/bin/bash

if [ $# -lt 3 ] ; then
  echo "Usage: generate_package.sh root-dir amdis-version bin-dir"
  exit 1
fi

ROOT="$1"
VERSION="$2"
BIN="$3"
CHANGES_FILE="${ROOT}/../amdis_${VERSION}_source.changes"

cd $ROOT
debuild -uc -us -S -sa

# export GNUPGHOME=/srv/amdis-deploy/gnupg

# build debian source package and sign it using gpg
echo "${AMDIS_PGP_PASSPHRASE}" >> /tmp/amdis_passphrase
debsign -p"$BIN/gpg_pass.sh /tmp/amdis_passphrase" -S -k99F411D7 ${CHANGES_FILE} #3B1E713A

$BIN/ssh_add_pass.sh /amdis/id_rsa /tmp/amdis_passphrase

# upload the package
dput ppa:math-iwr/ppa ${CHANGES_FILE}

rm -f /tmp/amdis_passphrase