void-packages/srcpkgs/tup/template

37 lines
1.0 KiB
Bash
Raw Normal View History

# Template file for 'tup'
pkgname="tup"
version="0.7.5"
revision=1
hostmakedepends="fuse-devel pkg-config"
makedepends="fuse-devel sqlite-devel"
short_desc="File-based build system"
maintainer="Julien Dehos <dehos@lisic.univ-littoral.fr>"
homepage="http://gittup.org/tup/index.html"
license="GPL-2"
distfiles="https://github.com/gittup/${pkgname}/archive/v${version}.tar.gz"
checksum="361b3e069308ce1d9505d1cb927999ac448811a3425c724123e0c48602a9d1e4"
do_configure() {
sed -i "s/git describe/echo v${version}/" Tupfile
sed -i "s/CC = gcc/CC = ${CC}/" Tuprules.tup
sed -i "1iCFLAGS=${CFLAGS}" Tuprules.tup
sed -i "1iLDFLAGS=${LDFLAGS}" Tuprules.tup
echo "CONFIG_TUP_USE_SYSTEM_SQLITE=y" > tup.config
}
do_build() {
# build tup for host arch using a script
CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" LDFLAGS="$BUILD_LDFLAGS" \
./build.sh
# build tup for target arch using the previous build (boostrapping)
./build/tup generate script.sh
sed -i 's#../lua/lua #../../build/lua #' script.sh
./script.sh
}
do_install() {
vbin tup
vman tup.1
}