Browse Source

Tightened build script

dh_python
B.J. Dweck 1 year ago
parent
commit
16bbe738a7
2 changed files with 13 additions and 20 deletions
  1. +13
    -20
      build-deb.sh
  2. BIN
      example/torch-agent_0.0.1-1_all.deb

+ 13
- 20
build-deb.sh View File

@ -1,40 +1,33 @@
#!/bin/bash
TORCH_VERSION=$(git describe --tags --abbrev=0)
PROJECT=torch-agent-$TORCH_VERSION
if [[ -z "${DEBEMAIL}" ]]; then
DEBEMAIL="$1"
fi
if [[ -z "${DEBEMAIL}" ]]; then
echo "E-mail address required for packaging signing with gpg key!"
echo "Usage: ./make-pkg.sh EMAIL"
echo "Usage: ./build-deb.sh EMAIL"
exit 1
fi
BUILD_DIR=build_deb
TORCH_VERSION=$(git describe --tags --abbrev=0)
DEBIAN_PKG=torch-agent-$TORCH_VERSION
rm -rf $BUILD_DIR
rm -rf dist
BUILD_DIR=dist
DEB_DIR=$BUILD_DIR/$PROJECT
mkdir $BUILD_DIR
rm -rf $BUILD_DIR/*
python3 setup.py clean
python3 setup.py sdist
cp dist/$DEBIAN_PKG.tar.gz $BUILD_DIR/
cd $BUILD_DIR
tar -xzmf $DEBIAN_PKG.tar.gz
cd ..
PKG_ROOT=$BUILD_DIR/$DEBIAN_PKG
mkdir -p $PKG_ROOT/src/etc/torch
mkdir -p $DEB_DIR/src/etc/torch
cp -r debian $DEB_DIR/
cp torch.conf $DEB_DIR/src/etc/torch/
cp -r debian $PKG_ROOT/
cp torch.conf $PKG_ROOT/src/etc/torch/
cd $PKG_ROOT
cd $BUILD_DIR
tar -xzmf $PROJECT.tar.gz
cd $PROJECT
export USER=`whoami`
dh_make --createorig -e $DEBEMAIL -s -y
dpkg-buildpackage -k$DEBEMAIL

BIN
example/torch-agent_0.0.1-1_all.deb View File


Loading…
Cancel
Save