summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 371a39390ae329f5145d63b5670a4dc9921d1452 (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: Adrien Smith <adrien@panissupraomnia.dev>
# Contributor: a821 <a821 at mail de>
# Contributor: graysky <graysky AT archlinux DOT us>
# Contributor: David Manouchehri <manouchehri@riseup.net>

pkgname='fake-hwclock-git'
pkgver=0.1b.r21.g5b8105b
pkgrel=3
pkgdesc="Save/restore system clock on machines without working RTC hardware"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/xanmanning/alarm-${pkgname%-git}"
license=('LicenseRef-Coffeeware')
depends=('glibc')
makedepends=('git')
provides=("${pkgname%-git}=$pkgver")
conflicts=("${pkgname%-git}")
source=("${pkgname%-git}::git+${url}.git")
b2sums=('SKIP')

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

prepare() {
  cd "${pkgname%-git}"
  # shellcheck disable=SC2016
  sed -i 's/ $(LDFLAGS)/ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)/' Makefile
}

build() {
  make -C "${pkgname%-git}"
}

package() {
  make -C "${pkgname%-git}" DESTDIR="${pkgdir}" install
  install -Dm644 "${pkgname%-git}/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
}