summaryrefslogtreecommitdiff
path: root/community/libsodium/PKGBUILD
blob: 804ee42d8fd42ff2a0611447a09cf744b4d4cacd (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
# $Id: PKGBUILD 115754 2014-07-16 03:16:08Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: namelessjon <jonathan.stott@gmail.com>
# Contributor: Alessio Sergi <asergi at archlinux dot us>

pkgname=libsodium
pkgver=0.6.1
pkgrel=1
pkgdesc="P(ortable|ackageable) NaCl-based crypto library"
arch=('i686' 'x86_64')
url="https://github.com/jedisct1/libsodium"
license=('custom:ISC')
depends=('glibc')
makedepends=('clang')
source=("http://download.dnscrypt.org/$pkgname/releases/$pkgname-${pkgver}.tar.gz")
sha512sums=('80524d4017ccd98f5aa96d7df1d4450c890f5c1aaee9c2bfc277fab98f4fb01ac2a3f11850e4f6610feea0279d707e1dede70991d252beeaf80bde3b6eff8ff3')

build() {
  cd "$pkgname-$pkgver"
  export CC=clang
  CFLAGS=${CFLAGS/-fstack-protector-strong/}

  ./configure --prefix=/usr
  make
}

check() {
  cd "$pkgname-$pkgver"
  make check
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install

  # install license
  install -d -m 755 "$pkgdir/usr/share/licenses/$pkgname"
  install -m 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: