summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d26d6619a166379f27ea19d9f1584130a940b725 (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
58
59
60
61
62
63
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=gmssl-git
pkgver=r705.gf0dc2dce
pkgrel=1
pkgdesc="Chinese national cryptographic algorithms and protocols"
arch=('i686' 'x86_64')
url="http://gmssl.org/"
license=('custom')
depends=('perl')
makedepends=('git')
provides=('gmssl')
conflicts=('gmssl' 'openssl')
options=('staticlibs')
source=("git+https://github.com/guanzhi/GmSSL.git"
        "ca-dir.patch::https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/openssl/trunk/ca-dir.patch")
sha256sums=('SKIP'
            'SKIP')


prepare() {
  cd "GmSSL"

  patch -Np0 -i "$srcdir/ca-dir.patch"
  sed -i "s#'File::Glob' => qw/glob/;#'File::Glob' => qw/:glob/;#g" "Configure"
  sed -i "s#'File::Glob' => qw/glob/;#'File::Glob' => qw/:glob/;#g" "test/build.info"
}

pkgver() {
  cd "GmSSL"

  _rev=$(git rev-list --count --all)
  _hash=$(git rev-parse --short HEAD)
  printf "r%s.g%s" "$_rev" "$_hash"
}

build() {
  cd "GmSSL"

  ./config \
    --prefix="/usr" \
    --openssldir="/etc/ssl" \
    --libdir="lib"
  make
}

check() {
  cd "GmSSL"

  #make test
}

package() {
  cd "GmSSL"

  make \
    DESTDIR="$pkgdir" \
    MANSUFFIX="ssl" \
    install_sw \
    install_ssldirs \
    install_man_docs
  install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/gmssl"
}