Commit 0b69db2f authored by ale's avatar ale

simplify debian build rules a bit

parent d9d4c57b
......@@ -2,7 +2,7 @@ Source: liber
Section: net
Priority: extra
Maintainer: ale <ale@incal.net>
Build-Depends: debhelper (>= 8.0.0), dh-systemd (>= 1.5)
Build-Depends: debhelper (>= 8.0.0), dh-systemd (>= 1.5), golang-go (>= 1.5)
Standards-Version: 3.9.4
Homepage: https://git.autistici.org/ale/liber
......
......@@ -16,12 +16,10 @@ PKGDIR = $(DEBDIR)/liber
dh $@ --with systemd
override_dh_install:
# Build the sources using your locally-installed Go version.
# NB: This is not an acceptable way to build a proper Debian package.
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 PATH=$$PATH:/usr/local/go/bin ; 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 ./...)
(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 liberdbtool ; 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)
......
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