void-packages/srcpkgs/ytnef/template
Enno Boland f40cd77686 srcpkgs: remove pullmoll from maintainers field. 😢
Set them to Orphaned for now.

If you'd like to pick up a package, feel free.
2021-04-10 16:34:44 +02:00

50 lines
1.3 KiB
Bash

# Template file for 'ytnef'
pkgname=ytnef
version=1.9.3
revision=1
build_style=gnu-configure
hostmakedepends="automake libtool"
short_desc="Yerase's TNEF Stream Reader"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://github.com/Yeraze/ytnef"
distfiles="https://github.com/Yeraze/ytnef/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=41a0033bde33c86a7e4aa4e14bb822dd03084098638e7d6557263e47e80b4f4f
pre_configure() {
./autogen.sh
}
do_build() {
if [ "$CROSS_BUILD" ]; then
configure_args+=" --host=${XBPS_TARGET_MACHINE}"
export ac_cv_func_malloc_0_nonnull=yes
fi
cd ${wrksrc}/lib
make ${makejobs} DESTDIR="${DESTDIR}" install
mv "${DESTDIR}/usr/lib${XBPS_TARGET_WORDSIZE}" "${DESTDIR}/usr/lib"
export CFLAGS+=" -I${DESTDIR}/usr/include"
export LDFLAGS+=" -L${DESTDIR}/usr/lib"
cd ${wrksrc}
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/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}