fix debian package

* description
* dependencies
* section
This commit is contained in:
Abraham Toriz 2022-08-04 14:33:05 +08:00
parent 3093d944e6
commit 646f309026
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
1 changed files with 22 additions and 5 deletions

View File

@ -1,12 +1,28 @@
# Create a debian package for this project.
#
# This script is intended for use in a CI environment, however it can be run in
# your development machine if you pass these variables with the apropiate
# values:
#
# * CI_COMMIT_TAG=v1.2.3
#
# For example you can build and install this package in the very container it is
# done in CI using these commands:
#
# podman run -it --rm --volume=./:/src --env CI_COMMIT_TAG=v1.2.3 docker.io/categulario/rust-cli-image:latest
# cd src && cargo build --release && ./debpackage.sh
# apt install ./debian-package/tiempo_1.2.3_amd64.deb
# t --help
COPYRIGHT_YEARS="2018 - "$(date "+%Y")
DPKG_STAGING="debian-package"
DPKG_DIR="${DPKG_STAGING}/dpkg"
PROJECT_MANTAINER="Abraham Toriz Cruz"
PROJECT_HOMEPAGE="https://categulario.gitlab.io/tiempo/en"
PROJECT_HOMEPAGE="https://gitlab.com/categulario/tiempo-rs"
PROJECT_NAME=tiempo
PROJECT_VERSION=${CI_COMMIT_TAG:1}
PROJECT_BINARY=t
PROJECT_DESCRIPTION="A command line time tracking application"
mkdir -p "${DPKG_DIR}"
@ -15,6 +31,8 @@ DPKG_CONFLICTS=
DPKG_VERSION=${PROJECT_VERSION}
DPKG_ARCH=amd64
DPKG_NAME="${DPKG_BASENAME}_${DPKG_VERSION}_${DPKG_ARCH}.deb"
DPKG_DEPENDS=
DPKG_SECTION=utils
# Binary
install -Dm755 "target/release/$PROJECT_BINARY" "${DPKG_DIR}/usr/bin/$PROJECT_BINARY"
@ -41,16 +59,15 @@ mkdir -p "${DPKG_DIR}/DEBIAN"
cat > "${DPKG_DIR}/DEBIAN/control" <<EOF
Package: ${DPKG_BASENAME}
Version: ${DPKG_VERSION}
Section: graphics
Section: ${DPKG_SECTION}
Priority: optional
Maintainer: ${PROJECT_MANTAINER}
Homepage: ${PROJECT_HOMEPAGE}
Architecture: ${DPKG_ARCH}
Provides: ${PROJECT_NAME}
Depends: libgtk-3-0
Depends: ${DPKG_DEPENDS}
Conflicts: ${DPKG_CONFLICTS}
Description: A simple infinite-canvas free-hand vector drawing application
A simple infinite-canvas free-hand vector drawing application
Description: ${PROJECT_DESCRIPTION}
EOF
DPKG_PATH="${DPKG_STAGING}/${DPKG_NAME}"
# build dpkg