Update Cargo.toml and Cargo.lock, add create_deb prototype for source package
This commit is contained in:
parent
7a1d95dfa0
commit
6cc481327c
3 changed files with 61 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -349,7 +349,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "ffsend"
|
||||
version = "0.0.3"
|
||||
version = "0.0.5"
|
||||
dependencies = [
|
||||
"chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -23,7 +23,7 @@ exclude = [
|
|||
]
|
||||
|
||||
[package.metadata.deb]
|
||||
section = "utils"
|
||||
section = "utility"
|
||||
extended-description = """\
|
||||
Easily and securely share files and directories from the command line through
|
||||
a safe, private and encrypted link using a single simple command. \
|
||||
|
|
59
pkg/create_deb
Executable file
59
pkg/create_deb
Executable file
|
@ -0,0 +1,59 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# Ensure the version tag is valid
|
||||
if [[ ! $TRAVIS_TAG =~ ^v([0-9]+\.)*[0-9]+$ ]]; then
|
||||
echo "Error: invalid Git tag in \$TRAVIS_TAG, must be in 'v0.0.0' format"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure the debian architecture is set
|
||||
if [[ -z "$DEB_ARCH" ]]; then
|
||||
echo "Error: debian architecture not configured in \$DEB_ARCH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Define some useful variables
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
VERSION=${TRAVIS_TAG:1}
|
||||
|
||||
# Ensure the binary file exists
|
||||
if [[ ! -f "$DIR/../ffsend" ]]; then
|
||||
echo "Error: missing 'ffsend' binary in repository root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create an application directory, copy the binary into it
|
||||
mkdir -p $DIR/ffsend-$VERSION
|
||||
cp $DIR/../ffsend $DIR/ffsend-$VERSION/ffsend
|
||||
|
||||
# Create an application tarbal
|
||||
cd $DIR/..
|
||||
git archive --format tar.gz -o $DIR/ffsend-$VERSION/ffsend-$VERSION.tar.gz $TRAVIS_TAG
|
||||
|
||||
# Change into the app directory
|
||||
cd $DIR/ffsend-$VERSION
|
||||
|
||||
# Build the debian package
|
||||
# TODO: define GPG?
|
||||
dh_make -e "timvisee@gmail.com" -c gpl3 -f ffsend-$VERSION.tar.gz -s -y
|
||||
rm *.ex README.Debian README.source
|
||||
|
||||
# Remove the project tar ball, we're not using it anymore
|
||||
rm $DIR/ffsend-$VERSION/ffsend-$VERSION.tar.gz
|
||||
|
||||
# TODO: configure the debian/control file
|
||||
# TODO: configure copyright file
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# # Update version and architecture in the control file
|
||||
# sed -i "/Version:\.*/c\\Version: $VERSION" $DIR/deb/DEBIAN/control
|
||||
# sed -i "/Architecture:\.*/c\\Architecture: $DEB_ARCH" $DIR/deb/DEBIAN/control
|
||||
|
||||
# # Build the debian package
|
||||
# echo "Building debian package..."
|
||||
# dpkg-deb --verbose --build $DIR/deb .
|
Loading…
Reference in a new issue