void-packages/srcpkgs/tup/template
2018-11-22 15:42:52 -02:00

37 lines
1.1 KiB
Bash

# Template file for 'tup'
pkgname=tup
version=0.7.8
revision=1
hostmakedepends="fuse-devel pkg-config"
makedepends="fuse-devel pcre-devel sqlite-devel"
short_desc="File-based build system"
maintainer="Julien Dehos <dehos@lisic.univ-littoral.fr>"
license="GPL-2.0-only"
homepage="http://gittup.org/tup/index.html"
distfiles="https://github.com/gittup/${pkgname}/archive/v${version}.tar.gz"
checksum=37baed2d12ef6ce66ce186dc5aa9bcf23098c35d3aee2dc25cb3177eee224b60
do_configure() {
sed -i "s/git describe/echo ${version}/" src/tup/link.sh
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 init
# 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
}