chore: add debian packaging recipe
This commit is contained in:
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
9
|
14
debian/control
vendored
Normal file
14
debian/control
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
Source: hydra-werther
|
||||
Section: unknown
|
||||
Priority: optional
|
||||
Maintainer: Cadoles <contact@cadoles.com>
|
||||
Build-Depends: debhelper (>= 8.0.0), wget, ca-certificates, tar
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: http://forge.cadoles.com/Cadoles/hydra-werther
|
||||
Vcs-Git: http://forge.cadoles.com/Cadoles/hydra-werther.git
|
||||
Vcs-Browser: http://forge.cadoles.com/Cadoles/hydra-werther
|
||||
|
||||
Package: hydra-werther
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ssl-cert
|
||||
Description: Hydra identity provider backed by LDAP compatible server
|
12
debian/hydra-werther.service
vendored
Normal file
12
debian/hydra-werther.service
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Run Hydra Werther login/consent/logout app
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=/etc/hydra-werther/hydra-werther.conf
|
||||
ExecStart=/usr/bin/hydra-werther
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
40
debian/rules
vendored
Normal file
40
debian/rules
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
|
||||
GO_VERSION := 1.17.1
|
||||
OS := linux
|
||||
ARCH := amd64
|
||||
GOPATH=$(HOME)/go
|
||||
|
||||
ifeq (, $(shell which go 2>/dev/null))
|
||||
override_dh_auto_build: install-go
|
||||
endif
|
||||
|
||||
%:
|
||||
dh $@ --with systemd
|
||||
|
||||
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_build: $(GOPATH)
|
||||
GOPATH=$(GOPATH) PATH="$(PATH):/usr/local/go/bin:$(GOPATH)/bin" DISTS=$(OS)/$(ARCH) make
|
||||
|
||||
$(GOPATH):
|
||||
mkdir -p $(GOPATH)
|
||||
|
||||
override_dh_auto_install:
|
||||
mkdir -p debian/hydra-werther/usr/bin
|
||||
mkdir -p debian/hydra-werther/etc/hydra-werther
|
||||
|
||||
cp bin/werther_$(OS)_$(ARCH) debian/hydra-werther/usr/bin/hydra-werther
|
||||
cp conf/hydra-werther.conf debian/hydra-werther/etc/hydra-werther
|
||||
|
||||
install -d debian/hydra-werther
|
||||
|
||||
override_dh_strip:
|
||||
|
||||
override_dh_auto_test:
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@ -0,0 +1 @@
|
||||
3.0 (native)
|
Reference in New Issue
Block a user