summaryrefslogtreecommitdiff
path: root/extra/crypto++/PKGBUILD
blob: 7bcececdc4360b4cf3d18b4b907fd8f36cadce0e (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
# $Id: PKGBUILD 179501 2013-03-05 17:32:57Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Kritoke <kritoke@gamebox.net>
# Contributor: jlvsimoes <jlvsimoes@oninet.pt>

pkgname=crypto++
pkgver=5.6.2
_srcver=562
pkgrel=1
pkgdesc="A free C++ class library of cryptographic schemes"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.cryptopp.com/"
license=('custom')
depends=('gcc-libs')
makedepends=('unzip')
source=("http://www.cryptopp.com/cryptopp${_srcver}.zip"
        'libcrypto++.pc'
        'GNUmakefile.parabola')
md5sums=('7ed022585698df48e65ce9218f6c6a67'
         '46de3847c59ad16456fa863eb33e73b2'
         'c95b2134a8c0a35b173ede32001870d2')

build() {
  cd ${srcdir}

  # The upstream build system expects this file to be modified
  # to e.g. use system CFLAGS or use features of modern linkers.
  cp "${srcdir}/GNUmakefile.parabola" GNUmakefile
  make -f GNUmakefile

  sed -i -e 's/^CXXFLAGS/#CXXFLAGS/' GNUmakefile
  export CXXFLAGS="${CXXFLAGS} -DNDEBUG -fPIC"
  make -f GNUmakefile  
  make libcryptopp.so
}

package() {
  cd ${srcdir}

  install -d ${pkgdir}/usr/{lib/pkgconfig,include/cryptopp}
  install -m644 *.h ${pkgdir}/usr/include/cryptopp/
  install -m644 libcryptopp.a "${pkgdir}/usr/lib/libcryptopp.a"
  install -m644 libcryptopp.so "${pkgdir}/usr/lib/libcryptopp.so"
  install -m644 ${srcdir}/libcrypto++.pc "${pkgdir}/usr/lib/pkgconfig/libcrypto++.pc"
  install -D -m644 License.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}