summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f4299b4b09d777d595c0eeb443f0a109f78b9fd1 (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
53
54
55
56
57
# Maintainer: Alexandre Demers <alexandre.f.demers@gmail.com>

_gitname=libgcrypt
pkgname=libgcrypt15-git
pkgver=1.5.4.r3.g35cd81f
pkgrel=2
pkgdesc="General purpose cryptographic library based on the code from GnuPG. Latest commit from 1.5 branch - API version 11."
arch=('i686'
      'x86_64')
url="http://www.gnupg.org"
license=('GPL2')
depends=('libgpg-error')
makedepends=('git'
             'transfig'
             'automake'
             'ghostscript')
provides=("libgcrypt=${pkgver}"
		  "libgcrypt15=${pkgver}")
conflicts=("libgcrypt15"
           "libgcrypt11")

source=(git://git.gnupg.org/libgcrypt.git#branch=LIBGCRYPT-1-5-BRANCH)
sha1sums=('SKIP')

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

build() {
  _cpucount=$(grep -c processor /proc/cpuinfo 2>/dev/null)
  _jc=$((${_cpucount:-1}))

  echo "$srcdir/$_gitname"
  cd "$srcdir/$_gitname"
  ./autogen.sh --force
  automake --add-missing

  ./configure --enable-maintainer-mode \
              --prefix=/usr \
              --disable-static \
              --disable-padlock-support
  make -j $_jc
}

# check() {
  # cd ${_pkgname}-${pkgver}
  # make check
# }

package() {
  cd "$srcdir/$_gitname"
  make DESTDIR="${pkgdir}" install

  rm -rf "$pkgdir"/usr/{bin,include,share}
  rm -rf "$pkgdir"/usr/lib/libgcrypt.so
}