summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f705e962e5891551e8c8224888389ae5f96ca67d (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
36
37
38
# maintainer: anton \ät semjonov.de

pkgname=updiprog-git
_pkgname="${pkgname%-git}"
pkgdesc="utility for programming AVR devices with UPDI interface using standard TTL serial port"

pkgver=0.5.r2.99df4f8
pkgrel=1

arch=('x86_64')
url="https://github.com/Polarisru/${_pkgname}"
license=('BSD')

depends=()
makedepends=('cmake' 'make' 'git')

provides=(${_pkgname}=${pkgver})
conflicts=(${_pkgname})
source=("$pkgname::git+$url.git")
sha256sums=("SKIP")

pkgver() {
  git -C "${pkgname}/" describe --tags --long | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
}

build() {
  cmake -B build/ -S "${pkgname}/" \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -Wno-dev
  cmake --build build/
}

package() {
  install -Dm755 "build/${_pkgname}"  "${pkgdir}/usr/bin/${_pkgname}"
  install -Dm644 "${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}