void-packages/srcpkgs/ytnef/template

52 lines
1.3 KiB
Bash
Raw Normal View History

2016-12-14 13:29:53 +00:00
# Template file for 'ytnef'
pkgname=ytnef
2017-02-17 21:41:43 +00:00
version=1.9.1
2016-12-14 13:29:53 +00:00
revision=1
build_style=gnu-configure
hostmakedepends="automake libtool"
short_desc="Yerase's TNEF Stream Reader"
maintainer="Juergen Buchmueller <pullmoll@t-online.de>"
license="GPL-2"
homepage="https://github.com/Yeraze/ytnef"
distfiles="https://github.com/Yeraze/ytnef/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
2017-02-17 21:41:43 +00:00
checksum=281f718e0b00cabe95a1eeef6617e72ba592f321cfd354a5b198843a4d99dacf
2016-12-14 13:29:53 +00:00
2017-01-06 03:40:49 +00:00
pre_configure() {
./autogen.sh
2016-12-14 13:29:53 +00:00
}
do_build() {
if [ -n "$CROSS_BUILD" ]; then
configure_args+=" --host=${XBPS_TARGET_MACHINE}"
export ac_cv_func_malloc_0_nonnull=yes
fi
2017-01-06 03:40:49 +00:00
cd ${wrksrc}/lib
2016-12-14 13:29:53 +00:00
make ${makejobs} DESTDIR="${DESTDIR}" install
if [ -d "${DESTDIR}/usr/lib32" ]; then
mv "${DESTDIR}/usr/lib32" "${DESTDIR}/usr/lib"
fi
2017-01-06 03:40:49 +00:00
export CFLAGS+=" -I${DESTDIR}/usr/include"
export LDFLAGS+=" -L${DESTDIR}/usr/lib"
cd ${wrksrc}
2016-12-14 13:29:53 +00:00
make ${makejobs}
}
do_install() {
cd ${wrksrc}/ytnef
make DESTDIR="${DESTDIR}" install
# Cross compiling for some reason installs to /usr/local/bin
if [ -d "${DESTDIR}/usr/local/bin" ]; then
mv "${DESTDIR}/usr/local/bin" "${DESTDIR}/usr"
fi
}
ytnef-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
}
}