summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2018-05-14 15:12:28 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2018-05-14 15:14:06 +0000
commit61bb4ffab7df15f1997e165290501b081f0abc7e (patch)
tree96c1e176961f8add5c57248050a127e29790e25b
parent444f7d055e554af146cf9ac4fa9a224c85a895f3 (diff)
downloadmidipix_build-61bb4ffab7df15f1997e165290501b081f0abc7e.tar.bz2
midipix_build-61bb4ffab7df15f1997e165290501b081f0abc7e.tar.xz
subr/pkg_install.subr: additionally install rpmbuild(8) spec files.
-rw-r--r--subr/pkg_install.subr5
1 files changed, 3 insertions, 2 deletions
diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr
index df68ba19..5518e03a 100644
--- a/subr/pkg_install.subr
+++ b/subr/pkg_install.subr
@@ -19,7 +19,7 @@ pkg_install() {
fi;
if [ "${ARG_RPM:-0}" -eq 1 ]\
&& [ -x "$(which rpmbuild 2>/dev/null)" ]; then
- cat > "${PKG_BASE_DIR}/${PKG_NAME}.spec" <<EOF
+ cat > "${PKG_BASE_DIR}/${PKG_NAME}-${PKG_VERSION:-Unknown}.spec" <<EOF
Name: ${PKG_NAME}
Version: ${PKG_VERSION:-Unknown}
Release: 1
@@ -46,9 +46,10 @@ cp -pPr "${PKG_DESTDIR}/." "\${RPM_BUILD_ROOT}"
%changelog
EOF
- rpmbuild -bb --define="_topdir ${PREFIX_RPM}/${PKG_NAME}-${PKG_VERSION:-Unknown}" --nodeps "${PKG_BASE_DIR}/${PKG_NAME}.spec";
+ rpmbuild -bb --define="_topdir ${PREFIX_RPM}/${PKG_NAME}-${PKG_VERSION:-Unknown}" --nodeps "${PKG_BASE_DIR}/${PKG_NAME}-${PKG_VERSION:-Unknown}.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}";
+ ex_rtl_fileop cp "${PKG_BASE_DIR}/${PKG_NAME}-${PKG_VERSION:-Unknown}.spec" "${PREFIX_RPM}/";
fi;
};