Files
LFS-PKGBUILDs/dev-libs/libmpack-1.0.5.PKGBUILD
T

60 lines
1.5 KiB
Bash

pkgname=libmpack
pkgver=1.0.5
pkgdesc="Simple implementation of msgpack in C"
homepage="https://github.com/libmpack/libmpack"
license=("MIT")
_patches=("${pkgname}-1.0.5-libtool.patch")
_patch_sums=("dcb0029018df34aa5530ef6f9f0c8ffec7d33288e8854273db98c823f03663d260837c80846acf5571400dd0f78588f26fe62b20a2f9469c09f22189b0a65fff")
sources=("${pkgname}-${pkgver}.tar.gz"
"${_patches[@]}"
)
urls=("https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz"
"${_patches[@]}"
)
sha512sums=("6e30edafcacfb580b410bc6749ed7fe8f18b3be0cb98959339853e77bc3ec0cda6df08a0f1f22768cfc773458a2ea6bcef4f0421eea55cf56c58981d13711a04"
"${_patch_sums[@]}"
)
src_prepare() {
tar -xf ${distdir}/${sources[0]} --strip-components=1
for _patch in ${_patches[@]}; do
patch -p1 -i ${filedir}/${_patch}
done
# Respect users CFLAGS
sed -e 's/-ggdb//g' -i .config/debug.mk
sed -e 's/-O3//g' -i .config/release.mk
autoreconf -fiv
}
src_build() {
./configure --prefix=/usr --enable-shared --disable-static
local make_args=(
"VERBOSE=1"
"PREFIX=/usr"
"config=release"
"LIBDIR=/usr/lib"
"INCDIR=/usr/include"
)
make "${make_args[@]}" lib-bin
}
src_check() {
make VERBOSE=1 XLDFLAGS="-shared" test
}
src_install() {
local make_args=(
"VERBOSE=1"
"PREFIX=/usr"
"DESTDIR=${pkgdir}"
"config=release"
"LIBDIR=/usr/lib"
"INCDIR=/usr/include"
"XLDFLAGS=-shared"
)
make "${make_args[@]}" install
}
# vim:ft=sh syn=sh et sw=2: