Add debian packaging control files

This commit is contained in:
wpetit 2020-07-16 21:09:29 +02:00
parent f47fbcf39a
commit 134c794a46
6 changed files with 73 additions and 0 deletions

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

14
debian/control vendored Normal file
View File

@ -0,0 +1,14 @@
Source: hydra-passwordless
Section: unknown
Priority: optional
Maintainer: William Petit <wpetit@cadoles.com>
Build-Depends: debhelper (>= 8.0.0), wget, ca-certificates, tar
Standards-Version: 3.9.4
Homepage: http://forge.cadoles.com/wpetit/hydra-passwordless
Vcs-Git: http://forge.cadoles.com/wpetit/hydra-passwordless.git
Vcs-Browser: http://forge.cadoles.com/wpetit/hydra-passwordless
Package: hydra-passwordless
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Hydra server passwordless login/consent app

1
debian/hydra-passwordless.dirs vendored Normal file
View File

@ -0,0 +1 @@
var/lib/gengitkan

11
debian/hydra-passwordless.service vendored Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=Hydra server passwordless login/consent app
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/hydra-passwordless -workdir /usr/share/hydra-passwordless -config /etc/hydra-passwordless/config.yml
Restart=on-failure
[Install]
WantedBy=multi-user.target

45
debian/rules vendored Normal file
View File

@ -0,0 +1,45 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
GO_VERSION := 1.13.5
OS := linux
ARCH := amd64
GOPATH=$(HOME)/go
ifeq (, $(shell which go 2>/dev/null))
override_dh_auto_build: install-go
endif
%:
dh $@ --with systemd
override_dh_auto_build: $(GOPATH)
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" go mod vendor
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" ARCH_TARGETS=$(ARCH) make release
$(GOPATH):
mkdir -p $(GOPATH)
install-go:
wget https://dl.google.com/go/go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
tar -C /usr/local -xzf go$(GO_VERSION).$(OS)-$(ARCH).tar.gz
override_dh_auto_install:
mkdir -p debian/hydra-passwordless/usr/share/hydra-passwordless
mkdir -p debian/hydra-passwordless/etc/hydra-passwordless
mkdir -p debian/hydra-passwordless/usr/bin
cp -r release/server-$(OS)-$(ARCH)/* debian/hydra-passwordless/usr/share/hydra-passwordless/
mv debian/hydra-passwordless/usr/share/hydra-passwordless/bin/server debian/hydra-passwordless/usr/bin/hydra-passwordless
mv debian/hydra-passwordless/usr/share/hydra-passwordless/server.yml debian/hydra-passwordless/etc/hydra-passwordless/config.yml
install -d debian/hydra-passwordless
override_dh_strip:
override_dh_auto_test:

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)