xbps-src: added XBPS_ALLOW_RESTRICTED conf option for restricted pkgs.

Such packages should set the `restricted' var to allow building a binary package.
Note that such packages do not allow redistribution of sources and binaries,
so that it's up to the user if (s)he wants to pkg it locally.
This commit is contained in:
Juan RP 2015-07-26 10:22:35 +02:00
parent e2e65a8ea4
commit 279ead0999
3 changed files with 12 additions and 1 deletions

View file

@ -446,6 +446,11 @@ setup_pkg() {
exit 2
fi
if [ -n "$restricted" -a -z "$XBPS_ALLOW_RESTRICTED" ]; then
msg_red "$pkgver: does not allow redistribution of sources/binaries (restricted license).\n"
exit 2
fi
export XBPS_STATEDIR="${XBPS_BUILDDIR}/.xbps-${sourcepkg}"
export XBPS_WRAPPERDIR="${XBPS_STATEDIR}/wrappers"