From 8c4fb9eb959e0c1377ed495687c2cac2e330bf2b Mon Sep 17 00:00:00 2001 From: Mattia Mascarello Date: Mon, 6 May 2024 12:15:26 +0200 Subject: [PATCH] Added debian package --- .gitignore | 2 ++ CHANGELOG | 1 + COPYRIGHT | 2 ++ Makefile | 27 +++++++++++++++++++++++++++ README.md | 10 ++++++++++ deb/DEBIAN/control | 10 ++++++++++ 6 files changed, 52 insertions(+) create mode 100644 .gitignore create mode 100644 CHANGELOG create mode 100644 COPYRIGHT create mode 100755 Makefile create mode 100755 deb/DEBIAN/control diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..34b2885 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.deb +deb/usr \ No newline at end of file diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..d3cfb33 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1 @@ +0.1 First Release \ No newline at end of file diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..ffd2103 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,2 @@ +Copyright: 2024 Mattia Mascarello +License: MIT diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..edd3396 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +all: sleepuntil.0.1-1_all.deb + +sleepuntil.0.1-1_all.deb: deb/usr/share/man/man1/sleepuntil.1.gz deb/usr/bin/sleepuntil deb/DEBIAN/control deb/usr/share/doc/sleepuntil/copyright deb/usr/share/doc/sleepuntil/changelog.gz + dpkg-deb --root-owner-group --build deb sleepuntil.0.1-1_all.deb + lintian sleepuntil.0.1-1_all.deb + +deb/usr/share/man/man1/sleepuntil.1.gz: sleepuntil.1 + mkdir -p deb/usr/share/man/man1 + gzip -n -9 -k sleepuntil.1 + mv sleepuntil.1.gz deb/usr/share/man/man1/sleepuntil.1.gz + +deb/usr/bin/sleepuntil: sleepuntil + mkdir -p deb/usr/bin/ + cp sleepuntil deb/usr/bin/sleepuntil + +deb/usr/share/doc/sleepuntil/copyright: COPYRIGHT + mkdir -p deb/usr/share/doc/sleepuntil + cp COPYRIGHT deb/usr/share/doc/sleepuntil/copyright + +deb/usr/share/doc/sleepuntil/changelog.gz: CHANGELOG + mkdir -p deb/usr/share/doc/sleepuntil + gzip -n -9 -k CHANGELOG + mv CHANGELOG.gz deb/usr/share/doc/sleepuntil/changelog.gz + +clean: + rm -rf deb/usr + diff --git a/README.md b/README.md index 3cc20d2..247a70e 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,16 @@ Sleep Until is a Bash script that allows you to suspend execution until a specif ## Installation +### Debian-based systems + +Grab the latest release from the [releases page](https://github.com/MatMasIt/sleepuntil/releases) and install it with: + +```bash +sudo dpkg -i sleepuntil*.deb +``` + +### Manual installation + 1. Clone this repository 2. `chmod +x install.sh` (make it executable) 3. Run `./install.sh`. This will install the script system-wide diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control new file mode 100755 index 0000000..76e8534 --- /dev/null +++ b/deb/DEBIAN/control @@ -0,0 +1,10 @@ +Package: sleepuntil +Version: 0.1 +Section: utils +Priority: optional +Architecture: all +Maintainer: Mattia Mascarello +Description: sleeps until a specified datetime + sleepuntil is a simple utility to sleep until the specified datetime + without having to compute manually the sleep time +Depends: bash (>= 2.04)