summaryrefslogtreecommitdiff
path: root/git/build.sh
blob: 7016f180a7bed59cce124146fccb3a98a1f2ab5e (plain) (blame)
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
#!/bin/bash
name=git
version=2.24.0
revision=0
sources=(
    "https://github.com/${name}/${name}/archive/v${version}.tar.gz"
)
build_depends=(
    "autoconf"
    "automake"
    "libtool"
    "pkgconf"
)
depends=(
    "curl"
    "gettext"
    "libiconv"
    "openssl"
    "pcre"
    "perl"
    "python"
    "tk"
    "zlib"
)

function prepare() {
    tar xf v${version}.tar.gz
    cd ${name}-${version}

    if [[ $(uname -s) == Darwin ]]; then
        LDFLAGS="-L${_runtime}/lib"
    fi
}

function build() {
    make configure
    ./configure --prefix=${_prefix} \
        --libdir=${_prefix}/lib \
        --with-curl \
        --with-expat \
        --with-tcltk \
        --with-python=${_runtime} \
        --with-perl=${_runtime} \
        --with-zlib=${_runtime}
    make -j${_maxjobs}
}

function package() {
    make install DESTDIR="${_pkgdir}"
}