summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1d9b8736e57d9f05dad3d33f7872eaf087624bce (plain)
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
# Maintainer: dreieck

_pkgname=dropbear-openrc
pkgname="${_pkgname}-latest"
_pkgver="latest"
pkgver=2017.75.r1
pkgrel=1
pkgdesc='OpenRC init script and conf.d file for dropbear.'
url='http://pkgs.alpinelinux.org/package/edge/main/x86/dropbear-openrc'
license=('MIT')
arch=('any')
depends=('dropbear')
makedepends=(s)
provides=("${_pkgname}=${pkgver}")
replaces=("${_pkgname}<=${pkgver}")
conflicts=("${_pkgname}")
backup=('etc/conf.d/dropbear')
options=('!emptydirs')
source=(
  "dropbear.initd::https://git.alpinelinux.org/cgit/aports/plain/main/dropbear/dropbear.initd"
  "dropbear.confd::https://git.alpinelinux.org/cgit/aports/plain/main/dropbear/dropbear.confd"
)
sha256sums=(
  'SKIP'
  'SKIP'
)

pkgver() {
  curl -s -L "${url}" | sed -E -n 's|^.*'"${_pkgname}"'-(.*)\.log.*$|\1|p' | tr '-' '.'
}

package() {
  install -D -v -m755 "${srcdir}/dropbear.initd" "${pkgdir}/etc/init.d/dropbear"
  install -D -v -m644 "${srcdir}/dropbear.confd" "${pkgdir}/etc/conf.d/dropbear"
}