files for making packages

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-06 22:01:18 -05:00
parent 99f38da618
commit fface98131
5 changed files with 45 additions and 0 deletions

4
Caddyfile.go.wit.com Normal file
View File

@ -0,0 +1,4 @@
go.wit.com {
encode zstd gzip
reverse_proxy localhost:3000
}

View File

@ -1,4 +1,8 @@
all:
@echo "make run # will build and run the daemon here"
@echo "make debian # will build a debian package"
run:
git pull
echo "build it!"
GO111MODULE=off go build -v -x
@ -13,3 +17,6 @@ redomod:
GO111MODULE= go mod init
GO111MODULE= go mod tidy
# makes a .deb package
debian:
go-deb --no-gui --repo go.wit.com/apps/go.wit.com

10
build Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash -x
# this is the systemd control file
mkdir -p files/lib/systemd/system/
cp gowebd.service files/lib/systemd/system/
# caddy file. propose this as the dir structure caddy should use
mkdir -p files/etc/gowebd/
cp Caddyfile.go.wit.com files/etc/gowebd/
cp resources/repomap files/etc/gowebd/

11
control Normal file
View File

@ -0,0 +1,11 @@
Source: go.wit.com
Build-Depends: golang
Package: go.wit.com
Maintainer: Jeff Carr <jcarr@wit.com>
Architecture: amd64
Depends: caddy
URL: https://go.wit.com/apps/go.wit.com
Description: the go.wit.com website integration with pkg.go.dev
generates a simple website for integration with golang's
packaging system at http://pkg.go.dev/
TODO: generalize this so other people can use it

13
gowebd.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=go.wit.com
[Service]
User=root
Type=simple
ExecStart=/usr/bin/go.wit.com
ExecStop=killall go.wit.com
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target