diff --git a/.gitignore b/.gitignore index 080d699..cc038a3 100644 --- a/.gitignore +++ b/.gitignore @@ -102,7 +102,9 @@ venv.bak/ # mypy .mypy_cache/ - # Kate .kate-swp +# deb +/deb/package/ +/deb/package.deb diff --git a/README.md b/README.md index c4a7352..5111484 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,23 @@ $ yay -S nohang-git $ sudo systemctl enable --now nohang ``` -#### To install on Debian and Ubuntu please make a deb package. +#### To install on Debian and Ubuntu-based systems please make a deb package with latest git snapshot and install it: + +```bash +$ git clone https://github.com/hakavlad/nohang.git +$ cd nohang +$ cp -r deb/DEBIAN deb/package/ +$ make install DESTDIR=deb/package BINDIR=/usr/bin SYSTEMDUNITDIR=/lib/systemd/system +$ cd deb +$ fakeroot dpkg-deb --build package +$ sudo dpkg -i package.deb +``` + +`make`, `fakeroot` and `gettext` requies to build a package. Start and enable `nohang.service` or `nohang-desktop.service` after installing the package: +``` +$ sudo systemctl enable nohang-desktop +$ sudo systemctl start nohang-desktop +``` #### To install the latest version on any distro: ```bash diff --git a/deb/DEBIAN/conffiles b/deb/DEBIAN/conffiles new file mode 100644 index 0000000..4b9b6c1 --- /dev/null +++ b/deb/DEBIAN/conffiles @@ -0,0 +1,3 @@ +/etc/nohang/nohang.conf +/etc/nohang/nohang-desktop.conf +/etc/logrotate.d/nohang diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control new file mode 100644 index 0000000..2bcdfe6 --- /dev/null +++ b/deb/DEBIAN/control @@ -0,0 +1,10 @@ +Package: nohang +Version: 0.1 +Section: admin +Architecture: all +Maintainer: Alexey Avramov +Priority: optional +Homepage: https://github.com/hakavlad/nohang +Description: Sophisticated low memory handler + A highly configurable daemon for Linux which is able to correctly prevent out + of memory (OOM) and keep system responsiveness in low memory conditions. diff --git a/deb/DEBIAN/postinst b/deb/DEBIAN/postinst new file mode 100755 index 0000000..ee10735 --- /dev/null +++ b/deb/DEBIAN/postinst @@ -0,0 +1,2 @@ +systemctl daemon-reload +echo "nohang package installed; now you can edit config and enable/start the service"