summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 87b4059b85574636f0d0a4b1f6888c6f406de893 (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
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: T. Witt
pkgname=plasma5-applets-analog24hclock
pkgver=99999999
pkgrel=1
pkgdesc="Analog 24h clock"
arch=('i686' 'x86_64')
url="https://github.com/sleepywitti/analog24hclock-plasmoid/"
license=('GPL3')
depends=(
  plasma-framework
  plasma-workspace
  kconfigwidgets
  kxmlgui
)
makedepends=(git)
source=("${pkgname}::git+https://github.com/sleepywitti/analog24hclock-plasmoid.git")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname}"

  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

prepare() {
  cd "$srcdir/${pkgname%-git}"

  mkdir -p build
}

build() {
  cd "$srcdir/${pkgname%-git}"

  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
  make
}

package() {
  cd "$srcdir/${pkgname}"
  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE

  cd build
  make DESTDIR="$pkgdir/" install
}
# vim:set ts=2 sw=2 et: