summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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;
};