void-packages/srcpkgs/execline/template
Érico Rolim 7b29471bd8 srcpkgs: don't append CFLAGS outside of funtions.
Package templates are sourced multiple times during the build process,
which can lead to issues when defining variables like CFLAGS using
`CFLAGS+=`, since the contents will be added multiple times. This can
lead to a build command with `-static -static`, for example. Adding to
CFLAGS inside functions is safe, since functions are run only once.
2020-08-22 04:33:45 +00:00

52 lines
1.3 KiB
Bash

# Template file for 'execline'
pkgname=execline
version=2.6.1.0
revision=1
build_style=configure
configure_args="--libdir=/usr/lib --bindir=/usr/bin
--with-sysdeps=${XBPS_CROSS_BASE}/usr/lib/skalibs/sysdeps
--with-lib=${XBPS_CROSS_BASE}/usr/lib"
makedepends="skalibs-devel"
short_desc="Non-interactive scripting language"
maintainer="bougyman <bougyman@voidlinux.org>"
license="ISC"
homepage="https://skarnet.org/software/execline/"
changelog="https://skarnet.org/software/execline/upgrade.html"
distfiles="https://skarnet.org/software/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=a24c76f097ff44fe50b63b89bcde5d6ba9a481aecddbe88ee01b0e5a7b314556
CFLAGS="-fPIC"
build_options="static"
if [ "$build_option_static" ]; then
CFLAGS="-static"
LDFLAGS="-static"
fi
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" nsss-devel" configure_args+=" --enable-nsss" ;;
esac
post_install() {
vlicense COPYING
vdoc README
vcopy "doc/*" usr/share/doc/${pkgname}
}
execline-doc_package() {
archs=noarch
short_desc+=" - Documentation"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/share/doc
}
}
execline-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib
}
}