Add Debian packaging

This commit is contained in:
jordi fita mas 2023-06-14 21:51:47 +02:00
parent 2eeb3e87a5
commit 13c5968333
9 changed files with 124 additions and 0 deletions

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
tlstunnel (0.2.0-1) bullseye; urgency=medium
* Add Debian packaging
-- jordi fita mas <jordi@tandem.blog> Wed, 14 Jun 2023 20:40:39 +0000

37
debian/control vendored Normal file
View File

@ -0,0 +1,37 @@
Source: tlstunnel
Section: net
Priority: optional
Maintainer: jordi fita mas <jordi@tandem.blog>
Build-Depends:
debhelper-compat (= 13),
dh-golang,
golang-any,
golang-sourcehut-emersion-go-scfg-dev,
golang-github-caddyserver-certmagic-dev,
golang-github-klauspost-cpuid-dev,
golang-github-libdns-libdns-dev,
golang-github-pires-go-proxyproto-dev,
golang-github-pkg-errors-dev,
golang-go.uber-atomic-dev,
golang-go.uber-multierr-dev,
golang-go.uber-zap-dev,
golang-golang-x-crypto-dev,
golang-golang-x-tools-dev,
scdoc
Standards-Version: 4.6.0
Vcs-Browser: https://git.sr.ht/~emersion/tlstunnel/tree
Vcs-Git: https://git.sr.ht/~emersion/tlstunnel
Homepage: https://git.sr.ht/~emersion/tlstunnel
Rules-Requires-Root: no
XS-Go-Import-Path: git.sr.ht/~emersion/tlstunnel
Package: tlstunnel
Architecture: any
Depends:
${shlibs:Depends},
${misc:Depends}
Built-Using: ${misc:Built-Using}
description: TLS reverse proxy
.
It features: Automatic TLS with Let's Encrypt, routing incoming connections to
backends using Server Name Indication, and support for the PROXY protocol.

31
debian/copyright vendored Normal file
View File

@ -0,0 +1,31 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://git.sr.ht/~emersion/tlstunnel
Upstream-Name: tlstunnel
Upstream-Contact: ~emersion/public-inbox@lists.sr.ht
Files: *
Copyright: 20202023 Simon Ser
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Files: debian/*
Copyright: 2023 jordi fita mas
License: MIT
This debian package is distributed under the same license as the source
package.

1
debian/manpages vendored Normal file
View File

@ -0,0 +1 @@
tlstunnel.1

40
debian/postinst vendored Normal file
View File

@ -0,0 +1,40 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
case "$1" in
configure)
# Create tlstunnel user and group
if ! getent group tlstunnel >/dev/null; then
addgroup --system --quiet tlstunnel
fi
if ! getent passwd tlstunnel >/dev/null; then
adduser --quiet \
--system \
--disabled-login \
--no-create-home \
--shell /bin/bash \
--ingroup tlstunnel \
--home /var/lib/tlstunnel \
--gecos "tlstunnel daemon" \
tlstunnel
fi
# Make sure lib directory has correct permissions set
dpkg-statoverride --list "/var/lib/tlstunnel" >/dev/null || \
dpkg-statoverride --add --force --quiet --update tlstunnel adm 0750 /var/lib/tlstunnel
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

7
debian/rules vendored Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/make -f
%:
dh $@ --builddirectory=_build --buildsystem=golang --with=golang
execute_before_dh_auto_build:
make tlstunnel.1

1
debian/source/format vendored Normal file
View File

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

1
debian/tlstunnel.service vendored Symbolic link
View File

@ -0,0 +1 @@
../contrib/systemd/tlstunnel.service

1
debian/tlstunnel.tmpfiles vendored Symbolic link
View File

@ -0,0 +1 @@
../contrib/systemd/tlstunnel.tmpfiles