void-packages/srcpkgs/leveldb/template

45 lines
1.1 KiB
Bash

# Template file for 'leveldb'
pkgname=leveldb
version=1.20
revision=2
short_desc="A fast and lightweight key/value database library by Google"
maintainer="Juan RP <xtraeme@voidlinux.org>"
license="BSD"
homepage="https://github.com/google/leveldb"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=f5abe8b5b209c2f36560b75f32ce61412f39a2922f7045ae764a2c23335b6664
CFLAGS="-I. -I./include"
do_build() {
make ${makejobs} CC="$CC" CXX="$CXX" \
OPT="$CFLAGS" PLATFORM_LIBS="$LDFLAGS"
}
do_install() {
vmkdir usr/lib
vmkdir usr/include/leveldb
vmkdir usr/share/doc/leveldb
# libraries
vinstall out-shared/libleveldb.so.${version} 755 usr/lib
cp -P out-shared/libleveldb.so{,.1} ${DESTDIR}/usr/lib
# headers
install -m644 include/leveldb/* ${DESTDIR}/usr/include/leveldb
# documentation
cp -r doc/* ${DESTDIR}/usr/share/doc/${pkgname}
# license
vlicense LICENSE
}
leveldb-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/share/doc
vmove usr/lib/*.so
}
}