Add instructions to make a deb package

This commit is contained in:
Alexey Avramov 2020-04-12 18:35:20 +09:00
parent 806be760e3
commit 17ae2a9996
5 changed files with 35 additions and 2 deletions

4
.gitignore vendored
View File

@ -102,7 +102,9 @@ venv.bak/
# mypy
.mypy_cache/
# Kate
.kate-swp
# deb
/deb/package/
/deb/package.deb

View File

@ -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

3
deb/DEBIAN/conffiles Normal file
View File

@ -0,0 +1,3 @@
/etc/nohang/nohang.conf
/etc/nohang/nohang-desktop.conf
/etc/logrotate.d/nohang

10
deb/DEBIAN/control Normal file
View File

@ -0,0 +1,10 @@
Package: nohang
Version: 0.1
Section: admin
Architecture: all
Maintainer: Alexey Avramov <hakavlad@gmail.com>
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.

2
deb/DEBIAN/postinst Executable file
View File

@ -0,0 +1,2 @@
systemctl daemon-reload
echo "nohang package installed; now you can edit config and enable/start the service"