summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2018-05-14 14:45:18 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2018-05-14 14:45:18 +0000
commite6f54ef06b5652e842acae8a9bd2684807bad8ad (patch)
treeff0cf4c3aad8d78987fdd15df9022e12d4846e8f
parent6291f9b9ce4e3795986e37bc166cb901854baca8 (diff)
downloadmidipix_build-e6f54ef06b5652e842acae8a9bd2684807bad8ad.tar.bz2
midipix_build-e6f54ef06b5652e842acae8a9bd2684807bad8ad.tar.xz
subr/pkg_install.subr: default to `Unknown' if ${PKG_VERSION} is unset or empty.
-rw-r--r--subr/pkg_install.subr12
1 files changed, 6 insertions, 6 deletions
diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr
index c9273cbc..2071764b 100644
--- a/subr/pkg_install.subr
+++ b/subr/pkg_install.subr
@@ -21,15 +21,15 @@ pkg_install() {
&& [ -x "$(which rpmbuild 2>/dev/null)" ]; then
cat > "${PKG_BASE_DIR}/${PKG_NAME}.spec" <<EOF
Name: ${PKG_NAME}
-Version: ${PKG_VERSION}
+Version: ${PKG_VERSION:-Unknown}
Release: 1
-Summary: ${PKG_NAME} ${PKG_VERSION}
+Summary: ${PKG_NAME} ${PKG_VERSION:-Unknown}
License: Unknown
Group: Applications
Url: ${PKG_URL}
%description
-${PKG_NAME} ${PKG_VERSION}
+${PKG_NAME} ${PKG_VERSION:-Unknown}
%prep
%build
@@ -42,9 +42,9 @@ cp -pPr ${PKG_DESTDIR}/. .
%changelog
EOF
- rpmbuild -bb --define="_topdir ${PREFIX_RPM}/${PKG_NAME}-${PKG_VERSION}" --nodeps "${PKG_BASE_DIR}/${PKG_NAME}.spec";
- find "${PREFIX_RPM}/${PKG_NAME}-${PKG_VERSION}/RPMS" -iname \*.rpm -exec cp -pP {} "${PREFIX_RPM}/" \;;
- ex_rtl_fileop rm "${PREFIX_RPM}/${PKG_NAME}-${PKG_VERSION}";
+ rpmbuild -bb --define="_topdir ${PREFIX_RPM}/${PKG_NAME}-${PKG_VERSION:-Unknown}" --nodeps "${PKG_BASE_DIR}/${PKG_NAME}.spec";
+ find "${PREFIX_RPM}/${PKG_NAME}-${PKG_VERSION:-Unknown}/RPMS" -iname \*.rpm -exec cp -pP {} "${PREFIX_RPM}/" \;;
+ ex_rtl_fileop rm "${PREFIX_RPM}/${PKG_NAME}-${PKG_VERSION:-Unknown}";
fi;
};