summaryrefslogtreecommitdiff
path: root/repo/system/libressl.xibuild
blob: 72834f3a9db475cfc6a85a9816805edfac8095d2 (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
#!/bin/sh

MAKEDEPS="make "
DEPS="musl"

PKG_VER=3.4.2
SOURCE=https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-$PKG_VER.tar.gz
DESC="The open source management tools and libraries for cryptography"

prepare () {
    autoreconf -vif
    case $(uname -m) in
     x86_64)  export EXTRACONFIG=""
              export TRUPLE="x86_64-linux-musl"
             ;;
     i686)    export EXTRACONFIG="--disable-hardening"
              export TRUPLE="i686-linux-musl"
             ;;
     armv7l)  export TRUPLE="armv7l-linux-musleabihf"
             ;;
     armv6l)  export TRUPLE="armv6l-linux-musleabihf"
             ;;
     aarch64) export TRUPLE="aarch64-linux-musleabihf"
             ;;
    esac
}

build () {
    CFLAGS="-L/usr/lib $CFLAGS" \
    ./configure \
               --build=$TRUPLE \
               --host=$TRUPLE \
               --prefix=/usr \
               --sysconfdir=/etc \
               --mandir=/usr/share/man \
               --localstatedir=/var $EXTRACONFIG
    unset EXTRACONFIG TRUPLE
    make
}

package () {
    make MANSUFFIX=ssl DESTDIR=$PKG_DEST install 
}