Skip to content

Commit

Permalink
Build a deb package for glvd-client (#6)
Browse files Browse the repository at this point in the history
Build a deb package for glvd-client

Related to gardenlinux/glvd#118
  • Loading branch information
fwilhe authored Sep 27, 2024
1 parent a31ef2a commit e51007b
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
build:
uses: gardenlinux/package-build/.github/workflows/build.yml@main
with:
release: ${{ github.ref == 'refs/heads/main' }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ go.work.sum

# env file
.env
.build
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
glvd (0.0.0) unstable; urgency=medium

* WIP glvd is in development

-- Garden Linux <[email protected]>
2 changes: 2 additions & 0 deletions debian/clean
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
debian/.go-build/
debian/.go-cache/
17 changes: 17 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Source: glvd
Section: misc
Priority: optional
Maintainer: Garden Linux <[email protected]>
Build-Depends:
debhelper-compat (= 13),
git,
golang,
Standards-Version: 4.6.0
Rules-Requires-Root: no

Package: glvd
Architecture: any
Depends:
${shlibs:Depends},
${misc:Depends},
Description: CLI for glvd
6 changes: 6 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/gardenlinux/glvd-client

Files: *
Copyright:
License: MIT
1 change: 1 addition & 0 deletions debian/glvd.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/.go-build/glvd usr/bin
26 changes: 26 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export GOARCH = $(DEB_HOST_ARCH_CPU)
export GOOS = $(DEB_HOST_ARCH_OS)
export GOCACHE = $(CURDIR)/debian/.go-cache
export CGO_ENABLED = 0
export GIT_COMMIT = $(shell git rev-parse HEAD)
export GIT_DIRTY = $(shell test -n "`git status --porcelain`" && echo "dirty" || echo "clean")

source:
:

%:
dh $@ --buildsystem=none

override_dh_auto_build:
go build -o debian/.go-build/glvd .

override_dh_auto_clean:
go clean

# Should be disabled by default and breaks (https://bugs.debian.org/1016563)
override_dh_dwz:
:
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0
2 changes: 2 additions & 0 deletions prepare_source
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version_suffix=.`date +%s`gl~dev
import_src .

0 comments on commit e51007b

Please sign in to comment.