Commit 721c6d64 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm=repack-rpm: use eepm-rpmbuild if available

parent 48c6bc04
......@@ -113,15 +113,22 @@ __epm_repack_to_rpm()
# Note: install epm-repack for static (package based) dependencies
assure_exists alien || fatal
# TODO: check for all systems
case $PKGFORMAT in
rpm)
assure_exists /usr/bin/rpmbuild rpm-build || fatal
;;
deb)
assure_exists /usr/bin/rpmbuild rpm || fatal
;;
esac
RPMBUILD=/usr/bin/eepm-rpmbuild
if [ -x $RPMBUILD ] ; then
warning "will use eepm-rpmbuild for rpm packing"
else
RPMBUILD=/usr/bin/rpmbuild
# TODO: check for all systems
case $PKGFORMAT in
rpm)
assure_exists $RPMBUILD rpm-build || fatal
;;
deb)
assure_exists $RPMBUILD rpm || fatal
;;
esac
fi
umask 022
......@@ -199,11 +206,11 @@ __epm_repack_to_rpm()
TARGETARCH=$(epm print info -a | sed -e 's|^x86$|i586|')
showcmd rpmbuild --buildroot $buildroot --target $TARGETARCH -bb $spec
showcmd $RPMBUILD --buildroot $buildroot --target $TARGETARCH -bb $spec
if [ -n "$verbose" ] ; then
a='' rpmbuild --buildroot $buildroot --target $TARGETARCH -bb $spec || fatal
a='' $RPMBUILD --buildroot $buildroot --target $TARGETARCH -bb $spec || fatal
else
a='' rpmbuild --buildroot $buildroot --target $TARGETARCH -bb $spec >/dev/null || fatal
a='' $RPMBUILD --buildroot $buildroot --target $TARGETARCH -bb $spec >/dev/null || fatal
fi
# remove copy of source binary package (don't mix with generated)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment