void-packages/srcpkgs/leveldb/template

46 lines
1.1 KiB
Bash

# Template file for 'leveldb'
pkgname=leveldb
version=1.19
revision=1
short_desc="A fast and lightweight key/value database library by Google"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="BSD"
homepage="https://github.com/google/leveldb"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=7d7a14ae825e66aabeb156c1c3fae9f9a76d640ef6b40ede74cc73da937e5202
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
}
}