summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d6262d167b5d723e48795de69267dfe8c89d17fc (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
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=findnewest-git
pkgver=0.3.12.be44060
pkgrel=1
pkgdesc='Recursively find newest file in a hierarchy and print its timestamp'
url='https://github.com/0-wiz-0/findnewest'
arch=('i686' 'x86_64')
license=('BSD')
depends=('glibc')
makedepends=('git')
provides=('findnewest')
conflicts=('findnewest')
source=(${pkgname}::git+https://github.com/0-wiz-0/findnewest)
sha512sums=('SKIP')

pkgver() {
  cd ${pkgname}
  printf "%s.%s.%s" "$(git describe --tags --abbrev=0|sed -r 's|(findnewest-)?(.+)|\2|')" \
    "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd ${pkgname}
  autoreconf -fiv
}

build() {
  cd ${pkgname}
  ./configure --prefix=/usr
  make
}

package() {
  cd ${pkgname}
  make DESTDIR="${pkgdir}" install
  install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

# vim: ts=2 sw=2 et: