Commit 1118e7c0 authored by ale's avatar ale

Update Debian packaging to support Buster

parent 42be2b91
liber
*.debhelper
*.debhelper.log
*.substvars
files
liber (0.2p1) unstable; urgency=medium
* Packaging changes for Debian buster.
-- ale <ale@incal.net> Wed, 31 Jul 2019 16:28:44 +0100
liber (0.2) unstable; urgency=medium
* Migrated to new on-disk database format.
......
......@@ -2,8 +2,8 @@ Source: liber
Section: net
Priority: extra
Maintainer: ale <ale@incal.net>
Build-Depends: debhelper (>= 8.0.0), dh-systemd (>= 1.5), golang-go (>= 1.5)
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), golang-any, dh-golang
Standards-Version: 3.9.6
Homepage: https://git.autistici.org/ale/liber
Package: liber
......
......@@ -8,7 +8,15 @@ EnvironmentFile=/etc/default/liber
ExecStart=/usr/bin/liber $BOOK_DIR $LIBER_OPTIONS server $ADDR
Restart=always
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=full
ProtectHome=yes
ReadOnlyDirectories=/
ReadWriteDirectories=-/var/lib/liber
SystemCallFilter=~@mount
[Install]
WantedBy=multi-user.target
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
export DH_GOPKG = git.autistici.org/ale/liber
DEBDIR = $(CURDIR)/debian
PKGDIR = $(DEBDIR)/liber
export DH_GOPKG := git.autistici.org/ale/liber
export DH_GOLANG_EXCLUDES := vendor
export DH_GOLANG_INSTALL_ALL := 1
%:
dh $@ --with systemd
dh $@ --with systemd --with golang --buildsystem golang
override_dh_install:
install -m 755 -o root -g root -d $(PKGDIR)/usr/bin
install -m 755 -o root -g root -d $(PKGDIR)/usr/share/liber
-mkdir build
(export GOPATH=$(CURDIR)/build ; mkdir -p build/src/$(shell dirname $(DH_GOPKG)) ; ln -s $(CURDIR) build/src/$(DH_GOPKG) ; cd build/src/$(DH_GOPKG) && go install -v ./...)
(for f in liber ; do \
install -m 755 -o root -g root build/bin/$$f $(PKGDIR)/usr/bin/$$f ; done)
(umask 022; cp -R --preserve=timestamps htdocs $(PKGDIR)/usr/share/liber/htdocs)
override_dh_auto_install:
dh_auto_install
$(RM) -r debian/liber/usr/share/gocode
install -m 755 -o root -g root -d debian/liber/usr/share/liber
(umask 022; cp -R --preserve=timestamps htdocs debian/liber/usr/share/liber/htdocs)
override_dh_clean:
-rm -fr build
dh_clean
# Do not enable the liber HTTP server by default.
# Do not enable or start the liber server by default.
override_dh_systemd_enable:
dh_systemd_enable --no-enable
override_dh_systemd_start:
dh_systemd_start --no-start
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment