Use mkdir -p instead of mkdir so that the package does not fail if the dir exists.
39 lines
911 B
Bash
39 lines
911 B
Bash
# Maintainer: Martell Malone <martellmalone@gmail.com>
|
|
|
|
pkgname="jsoncpp"
|
|
pkgver=1.7.2
|
|
pkgrel=3
|
|
pkgdesc="A C++ library for interacting with JSON"
|
|
arch=('any')
|
|
url="https://github.com/open-source-parsers/jsoncpp"
|
|
license=('MIT')
|
|
makedepends=("gcc"
|
|
"cmake"
|
|
"python2"
|
|
)
|
|
options=('staticlibs' '!strip' '!buildflags')
|
|
source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/open-source-parsers/jsoncpp/archive/${pkgver}.tar.gz")
|
|
sha256sums=('2179a7df19c1c6dc87e02c65b847efc914625a9b87df3e443d9610fc70c0f557')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
}
|
|
|
|
build() {
|
|
mkdir -p "${srcdir}/build-${CARCH}"
|
|
cd "${srcdir}/build-${CARCH}"
|
|
|
|
cmake \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DJSONCPP_WITH_CMAKE_PACKAGE=ON \
|
|
../${pkgname}-${pkgver}
|
|
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/build-${CARCH}"
|
|
make DESTDIR=${pkgdir} install
|
|
}
|