Blame subr.pkg/pkg_install_rpm.subr

e9fa07
#
8d7a8a
# Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 LucĂ­a Andrea Illanes Albornoz <lucia@luciaillanes.de>
e9fa07
# set +o errexit -o noglob -o nounset is assumed.
e9fa07
#
e9fa07
e9fa07
pkg_install_rpm() {
e9fa07
	local	_pir_group_name="${1}" _pir_pkg_name="${2}" _pir_restart_at="${3}"	\
938c5c
		_pir_rc=0 _pir_url="" _pir_version="" _pir_version_rpm="";
e9fa07
e9fa07
	if rtl_lmatch \$ARG_DIST "rpm" ","\
e9fa07
	&& [ "${PKG_RPM_DISABLE:-0}" -eq 0 ]\
e9fa07
	&& command which rpmbuild >/dev/null 2>&1;
e9fa07
	then
938c5c
		ex_rtl_expand_rpm_version						\
938c5c
			\$_pir_url \$_pir_version \$_pir_version_rpm			\
938c5c
			"${PKG_BASE_DIR}/${PKG_SUBDIR}"					\
938c5c
			"${PKG_URL:-}" "${DEFAULT_GITROOT_HEAD}" "${PKG_URLS_GIT:-}"	\
938c5c
			"${PKG_VERSION:-}" || return 1;
938c5c
		ex_rtl_build_rpm							\
938c5c
			"${PKG_DESTDIR}"						\
938c5c
			"${PKG_NAME}"							\
938c5c
			"${PREFIX_RPM}"							\
938c5c
			"${MIDIPIX_BUILD_PWD}/etc/package.spec"				\
938c5c
			"${PKG_BASE_DIR}/${PKG_NAME}-${_pir_version_rpm}.spec"		\
938c5c
			"${BUILD_WORKDIR}"						\
938c5c
			"${PREFIX_RPM}/${PKG_NAME}-${_pir_version_rpm}"			\
938c5c
			"${_pir_url}"							\
938c5c
			"${_pir_version}" "${_pir_version_rpm}" || return 1;
e9fa07
	fi;
e9fa07
e9fa07
	return 0;
e9fa07
};
e9fa07
64844b
# vim:filetype=sh textwidth=0