Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Packages for Linux Distributions #48

Open
AndydeCleyre opened this issue Mar 13, 2019 · 1 comment
Open

Create Packages for Linux Distributions #48

AndydeCleyre opened this issue Mar 13, 2019 · 1 comment

Comments

@AndydeCleyre
Copy link

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.

@extraymond
Copy link

extraymond commented Mar 26, 2019

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:

  1. Not confined yet.
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants