summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 30e1df4ab280bbd4505f5658f90ac760a33e56ab (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
# Maintainer: Sebastian Lau <lauseb644 _at_ gmail _dot_ com>

pkgname="liblogcpp"
pkgver=1.9.4
pkgrel=1
pkgdesc="An intuitive and highly customizable LGPL library for logging with C++."
arch=('x86_64' 'i686' 'armv6h' 'armv7h')
url="https://git.0ptr.de/nullptr_t/liblogcpp.git"
license=('LGPL3')
replaces=('liblogcpp-qt')
provides=('liblogcpp')
conflicts=('liglogcpp-git')
depends=()
makedepends=('cmake')
source=("liblogcpp-v${pkgver}.tar.gz::https://git.0ptr.de/nullptr_t/${pkgname}/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
sha256sums=('74152f35813444e3abd4d244f4bcdd10e432690a6d010ba01679d2c75734fa06')



prepare() {
    [[ -e "$srcdir/build" ]] && rm -r "$srcdir/build"
    mkdir "$srcdir/build"
    [[ -e "$srcdir/build-static" ]] && rm -r "$srcdir/build-static"
    mkdir "$srcdir/build-static"
}

build() {
    cd "$srcdir/build"

    cmake -DCMAKE_INSTALL_PREFIX:PATH="/usr" \
        -DCMAKE_BUILD_TYPE=Release \
   	-DLOGCPP_SHARED=1 \
	-DLOGCPP_INSTALL_LIBS=ON \
	"../liblogcpp-v$pkgver"

    make

    cd "$srcdir/build-static"

    cmake -DCMAKE_INSTALL_PREFIX:PATH="/usr" \
        -DCMAKE_BUILD_TYPE=Release \
	"../liblogcpp-v$pkgver"

    make
}

package() {
    cd "$srcdir/build"
    make DESTDIR="${pkgdir}" install

    cd "$srcdir/build-static"
    install "$srcdir/build-static/liblogcpp.a" "$pkgdir/usr/lib/liblogcpp.a"
}