### this file is sourced not run
# source: step

# Build [1] master commit or [2] official release

repo=libfaketime
pkgname=$repo # for SLACKDESC

# [1] Master commit
hash=ceac4c703611005b2d96779eec44f01c8dcdde35 # 0.9.7_2019.02.05
MD5SUM=c2c3adc8774f318c9dfb037a22bccb9b       # 0.9.7_2019.02.05

hash7=${hash#???????}; hash7=${hash%$hash7}
PKGVER=0.9.7_2019.02.05_$hash7
TARBALL=$repo-$hash.tar.gz
SRC_URL=https://github.com/wolfcw/$repo/archive/$hash.tar.gz

# [2] Official release

# MD5SUM=
# PKGVER=1.6
# TARBALL=$repo-$PKGVER.tar.gz
# SRC_URL=https://github.com/wolfcw/$repo/archive/$TARBALL

# --- common ---

PKGARCH=x86_64
PKGBUILD=1
BUNDLE=

SLACKREQ=''
SLACKSUG=''
SLACKDESC="$pkgname: $pkgname $PKGVER (modify system time)  
$pkgname: libfaketime modifies the system time for a single application by
$pkgname: intercepting various system calls that programs use to retrieve the
$pkgname: current date and time. The included command line wrapper, faketime,
$pkgname: makes it easier to use the library, but does not expose all of its
$pkgname: functionality, which is described in the project page on GitHub.
$pkgname: 
$pkgname: License: GNU GPL
$pkgname: 
$pkgname: https://github.com/wolfcw/libfaketime
$pkgname: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/$repo-* &&
	: patches go here...
}

### default pkg_package
### build
pkg_build() {
	cd tmp/$repo-* &&

	export CFLAGS="$CFLAGS -DMULTI_ARCH"
	export PREFIX=/usr LIBDIRNAME=/lib64/faketime
	make &&
	make install &&
	pkg_build_slackdesc &&

	# CBLFS multilib patch
	mv -v /usr/bin/faketime{,-64} &&
	ln -sfv multiarch_wrapper /usr/bin/faketime
}

# vim: fdm=marker ft=sh:

