summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2018-05-14 14:37:17 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2018-05-14 14:37:17 +0000
commitcc12569d673579f7610622e36a62e4a892246b0c (patch)
treeae5756a682ec2cc5d629caad5ae164c92fc4be5a
parent64e5893f142c75912beafe39715da53647dd2ee4 (diff)
downloadmidipix_build-cc12569d673579f7610622e36a62e4a892246b0c.tar.bz2
midipix_build-cc12569d673579f7610622e36a62e4a892246b0c.tar.xz
subr/pkg_install.subr: only build RPM when rpmbuild(8) is available.
-rw-r--r--subr/pkg_install.subr3
1 files changed, 2 insertions, 1 deletions
diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr
index 17b4d04b..c9273cbc 100644
--- a/subr/pkg_install.subr
+++ b/subr/pkg_install.subr
@@ -17,7 +17,8 @@ pkg_install() {
tar -C "${PKG_DESTDIR}" -cpf - . |\
gzip -c -9 - > "${PKG_BASE_DIR}/${PKG_NAME}.tgz"
fi;
- if [ "${ARG_RPM:-0}" -eq 1 ]; then
+ if [ "${ARG_RPM:-0}" -eq 1 ]\
+ && [ -x "$(which rpmbuild 2>/dev/null)" ]; then
cat > "${PKG_BASE_DIR}/${PKG_NAME}.spec" <<EOF
Name: ${PKG_NAME}
Version: ${PKG_VERSION}