armor
armor copied to clipboard
Create Packages for Linux Distributions
According to Repology, packages only exist for Homebrew, Linuxbrew, and Scoop -- and one of those is outdated. The BlackArch package there is for an unrelated tool.
Can the developers please contribute some packages, at least for one or two ports-like systems like Arch and Alpine, which would greatly assist others in the creation of other more-involved package types?
I haven't used armor yet, so am not familiar with -- for example -- what configuration directories and files it expects to be present. But here is a jump start for an Arch PKGBUILD:
pkgname=armor
pkgver=0.4.13
pkgrel=1
pkgdesc="Uncomplicated, modern HTTP server"
arch=('i686' 'x86_64')
url="https://github.com/labstack/armor"
license=('MIT')
makedepends=(go)
source=(${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz)
sha256sums=('1e80b70c2fa245800594f3ef7b6bb14d2af4fda2a8622d3c8a0a28f9ef6c4629')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
go build -o bin/armor cmd/armor/main.go
}
package() {
cd ${srcdir}/${pkgname}-${pkgver}
install -D -m755 bin/armor ${pkgdir}/usr/bin/armor
}
This at least works for the basic no-config test case.
If someone is interested in building snap package to distribute armor. I got a snapcraft.yaml template working.
For simplicity, I just dump the deb package so no compilation is required. There are still some bits missing though:
- Not confined yet.
- Hardcoded source package.
name: armor
version: latest
summary: Armor.
description: |
This is armor snap
grade: devel
confinement: devmode
parts:
armor:
source: https://github.com/labstack/armor/releases/download/v0.4.12/armor_0.4.12_linux_64-bit.deb
plugin: dump
source-type: deb
apps:
armor:
command: /usr/local/bin/armor
And on a snapcraft enabled environment, run snapcraft will get all the bits together.