[go: up one dir, main page]

File: APKBUILD

package info (click to toggle)
acmetool 0.0.58-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 784 kB
  • ctags: 791
  • sloc: sh: 200; makefile: 83
file content (51 lines) | stat: -rw-r--r-- 1,534 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Contributor: Hugo Landau <hlandau@devever.net>
# Maintainer: Hugo Landau <hlandau@devever.net>
#
# This is a build script for the Alpine Linux build system.
# Please do not submit it to Alpine Linux at this time.
#
# To build, put this file in an empty directory and run abuild.
# You may need to setup abuild signing keys first; see Alpine documentation.
#
if [ "$(find version -mmin -30 2>/dev/null | wc -l)" == "0" ]; then
  curl -s -H 'Accept: application/vnd.github.v3+json' \
  'https://api.github.com/repos/hlandau/acme/releases/latest' | \
  sed 's/^.*"tag_name": *"v\([^"]*\)".*$/\1/;tx;d;:x' > version.tmp || exit 1
  mv version.tmp version
fi

pkgname=acmetool
pkgver="$(cat version)"
pkgrel=0
pkgdesc="ACME/Let's Encrypt client"
url="https://github.com/hlandau/acme"
arch="all"
license="MIT"
depends="libcap"
makedepends="libcap-dev go bash git curl"
install=""
subpackages="$pkgname-doc"
options="!strip"
source=""

prepare() {
  cd "$srcdir"
  git clone -b "v$pkgver" https://github.com/hlandau/acme || return 1
}

build() {
  cd "$srcdir/acme" || return 1
  make USE_BUILDINFO=1 || return 1

  # For some reason this is necessary in order for the buildinfo to get
  # included properly.
  rm "$srcdir/acme/bin/$pkgname" || return 1
  make USE_BUILDINFO=1 || return 1
}

package() {
  install -Dm0755 "$srcdir/acme/bin/$pkgname" "$pkgdir"/usr/bin/$pkgname || return 1
	mkdir -p "$pkgdir"/usr/share/man/man8
	"$pkgdir"/usr/bin/$pkgname --help-man | gzip > \
		"$pkgdir"/usr/share/man/man8/acmetool.man.gz || return 1
}