summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3a53d326639d2a11e449f8ebc04dcefd0d086782 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=whois-git
pkgver=5.5.9.r0.g8aabb41
pkgrel=2
pkgdesc="The whois client by Marco d'Itri"
arch=('i686' 'x86_64')
url="https://github.com/rfc1036/whois"
license=('GPL2')
depends=('glibc' 'libidn2' 'libxcrypt')
makedepends=('git' 'perl')
provides=('whois')
conflicts=('whois')
backup=('etc/whois.conf')
source=("git+https://github.com/rfc1036/whois.git#branch=next")
sha256sums=('SKIP')


pkgver() {
  cd "whois"

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

build() {
  cd "whois"

  make \
    CFLAGS="$CFLAGS $CPPFLAGS" \
    prefix="/usr" \
    CONFIG_FILE="/etc/whois.conf" \
    LOCALEDIR=1 \
    HAVE_ICONV=1
}

package() {
  cd "whois"

  make \
    BASEDIR="$pkgdir" \
    prefix="/usr" \
    install-whois \
    install-pos
  install -Dm644 "whois.conf" -t "$pkgdir/etc"
}