summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 85ffc7f8f6c37b5768819e3582f6e51b2336864e (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
50
51
52
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=rng-tools-git
pkgver=6.3.1.r21.g4023c8f
pkgrel=1
pkgdesc="Random number generator daemon"
arch=('i686' 'x86_64')
url="https://github.com/nhorman/rng-tools"
license=('GPL3')
depends=('glibc' 'libgcrypt')
makedepends=('git')
provides=('rng-tools')
conflicts=('rng-tools')
backup=('etc/conf.d/rngd')
source=("git+https://github.com/nhorman/rng-tools.git"
        "rngd.conf::https://git.archlinux.org/svntogit/community.git/plain/trunk/rngd.conf?h=packages/rng-tools"
        "rngd.service::https://git.archlinux.org/svntogit/community.git/plain/trunk/rngd.service?h=packages/rng-tools")
sha256sums=('SKIP'
            'SKIP'
            'SKIP')


pkgver() {
  cd "rng-tools"

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

build() {
  cd "rng-tools"

  ./autogen.sh
  ./configure \
    --prefix="/usr" --sbindir="/usr/bin" \
    --without-nistbeacon
  make
}

check() {
  cd "rng-tools"

  make check
}

package() {
  cd "rng-tools"

  make DESTDIR="$pkgdir" install

  install -Dm644 "$srcdir/rngd.service" "$pkgdir/usr/lib/systemd/system/rngd.service"
	install -Dm644 "$srcdir/rngd.conf" "$pkgdir/etc/conf.d/rngd"
}