summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: be2eed3e5fa70161a9d29aed9584311a6b827e3a (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
# Maintainer: Aaron Bishop < erroneous at gmail >

pkgname=date-git
_pkgname=date
pkgver=3.0.1.r35.gcc4685a
pkgrel=1
pkgdesc='A header-only library which builds upon <chrono>'
arch=('any')
url="https://github.com/HowardHinnant/date"
license=('MIT')
depends=()
makedepends=('cmake' 'git')
source=("git+https://github.com/HowardHinnant/date.git")
sha256sums=('SKIP')
conflicts=('date')
provides=('date')

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

prepare() {
  rm -Rf build
  mkdir build
  cd build
  #Not building tz because it would clobber tzdata's /usr/lib/libtz.a
  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    "../$_pkgname"
}

build() {
  cd build
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir/" install

  mkdir -p "${pkgdir}/usr/share/licenses/$pkgname"
  install -Dm644 "${srcdir}/$_pkgname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}