mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-16 04:44:55 +02:00
Build debian packages using specification files instead of shell script.
This commit is contained in:
parent
6f8a3db85e
commit
7043d67945
9 changed files with 79 additions and 39 deletions
11
Makefile
11
Makefile
|
|
@ -7,9 +7,12 @@ PROGRAM_NAME=eosio-api-healthcheck
|
|||
export GOOS = $(shell go env GOOS)
|
||||
export GOARCH = $(shell go env GOARCH)
|
||||
|
||||
DPKG_BUILDPACKAGE = dpkg-buildpackage
|
||||
DPKG_BUILDPACKAGE_FLAGS = -us -uc
|
||||
|
||||
SOURCES=src/main.go src/server.go src/parse_request.go
|
||||
|
||||
.PHONY: all build/$(PROGRAM_NAME) clean
|
||||
.PHONY: all build/$(PROGRAM_NAME) clean package_debian
|
||||
all: build
|
||||
build: build/$(PROGRAM_NAME)
|
||||
|
||||
|
|
@ -26,10 +29,8 @@ install: build
|
|||
package:
|
||||
PKGROOT=$(DESTDIR) BUILDDIR=$(realpath build) scripts/package.sh $(PKGTYPE)
|
||||
|
||||
package_debian: PKGTYPE = debian
|
||||
package_debian: GOOS = linux
|
||||
package_debian: DESTDIR = build/debroot
|
||||
package_debian: install package
|
||||
package_debian:
|
||||
$(DPKG_BUILDPACKAGE) $(DPKG_BUILDPACKAGE_FLAGS)
|
||||
|
||||
package_freebsd: PKGTYPE = freebsd
|
||||
package_freebsd: GOOS = freebsd
|
||||
|
|
|
|||
7
debian/.gitignore
vendored
Normal file
7
debian/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
.debhelper/*
|
||||
*.debhelper
|
||||
*.log
|
||||
*-stamp
|
||||
*.substvars
|
||||
files
|
||||
pkgroot/*
|
||||
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
eosio-api-healthcheck (1.2.3) unstable; urgency=medium
|
||||
|
||||
*
|
||||
|
||||
-- Henrik Hautakoski <henrik@eossweden.org> Fri, 19 Aug 2022 16:29:56 +0200
|
||||
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
10
|
||||
17
debian/control
vendored
Normal file
17
debian/control
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Source: eosio-api-healthcheck
|
||||
Section: introspection
|
||||
Build-Depends:
|
||||
debhelper (>= 11)
|
||||
Standards-Version: 4.0.0
|
||||
Vcs-Git: https://github.com/eosswedenorg/eos-api-healthcheck.git
|
||||
Vcs-Browser: https://github.com/eosswedenorg/eos-api-healthcheck
|
||||
Priority: optional
|
||||
Maintainer: Henrik Hautakoski <henrik@eossweden.org>
|
||||
|
||||
Package: eosio-api-healthcheck
|
||||
Section: introspection
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Homepage: https://github.com/eosswedenorg/eos-api-healthcheck
|
||||
Description: HAproxy healthcheck program for EOSIO API.
|
||||
27
debian/copyright
vendored
Normal file
27
debian/copyright
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: eosio-api-healthcheck
|
||||
Upstream-Contact: Henrik Hautakoski <henrik@eossweden.org>
|
||||
Source: https://github.com/eosswedenorg/eos-api-healthcheck.git
|
||||
|
||||
Files: *
|
||||
Copyright: 2020-2022 Sw/eden
|
||||
License: MIT
|
||||
|
||||
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.
|
||||
15
debian/rules
vendored
Executable file
15
debian/rules
vendored
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
include /usr/share/dpkg/default.mk
|
||||
|
||||
INSTALL_FLAGS := GOOS=linux
|
||||
|
||||
%:
|
||||
dh $@ -P debian/pkgroot
|
||||
|
||||
override_dh_auto_build:
|
||||
override_dh_auto_install:
|
||||
dh_auto_install --buildsystem=makefile -- $(INSTALL_FLAGS)
|
||||
|
||||
override_dh_usrlocal:
|
||||
override_dh_gconf:
|
||||
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ -f /etc/upstream-release/lsb-release ]]; then
|
||||
source /etc/upstream-release/lsb-release
|
||||
elif [[ -f /etc/lsb-release ]]; then
|
||||
source /etc/lsb-release
|
||||
else
|
||||
echo "ERROR: could not determine debian release."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DISTRIB_ID=$(echo $DISTRIB_ID | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# Default to 1 if no release is set.
|
||||
if [[ -z $RELEASE ]]; then
|
||||
RELEASE="1"
|
||||
fi
|
||||
|
||||
PACKAGE_FULLNAME="${PROGRAM_NAME}_${PROGRAM_VERSION}-${RELEASE}-${DISTRIB_ID}-${DISTRIB_RELEASE}_amd64"
|
||||
|
||||
# Create debian files.
|
||||
mkdir -p ${PKGROOT}/DEBIAN
|
||||
echo "Package: ${PROGRAM_NAME}
|
||||
Version: ${PROGRAM_VERSION}-${RELEASE}
|
||||
Section: introspection
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Homepage: https://github.com/eosswedenorg/eos-api-healthcheck
|
||||
Maintainer: Henrik Hautakoski <henrik@eossweden.org>
|
||||
Description: ${PROGRAM_DESCRIPTION}" &> ${PKGROOT}/DEBIAN/control
|
||||
|
||||
cat ${PKGROOT}/DEBIAN/control
|
||||
|
||||
fakeroot dpkg-deb --build ${PKGROOT} ${BUILDDIR}/${PACKAGE_FULLNAME}.deb
|
||||
Loading…
Add table
Add a link
Reference in a new issue