122 lines
3.1 KiB
Plaintext
122 lines
3.1 KiB
Plaintext
# rpmbuild.at: test rpmbuild
|
|
#
|
|
# Copyright (C) 2007 Ralf Corsépius <corsepiu@fedoraproject.org>
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
# ------------------------------
|
|
# Check if rpmbuild -ba *.spec works
|
|
AT_SETUP([rpmbuild -ba *.spec])
|
|
AT_XFAIL_IF([test $RPM_XFAIL -gt 0])
|
|
AT_CHECK([
|
|
TOPDIR="${abs_builddir}"/testing/build
|
|
|
|
rm -rf ${TOPDIR}
|
|
AS_MKDIR_P(${TOPDIR}/SOURCES)
|
|
AS_MKDIR_P(${TOPDIR}/BUILD)
|
|
AS_MKDIR_P(${TOPDIR}/SPECS)
|
|
AS_MKDIR_P(${TOPDIR}/RPMS)
|
|
AS_MKDIR_P(${TOPDIR}/SRPMS)
|
|
|
|
cp "${abs_srcdir}"/data/SOURCES/hello-1.0.tar.gz ${TOPDIR}/SOURCES
|
|
|
|
rpmbuild \
|
|
--rcfile="${RPMRC}" \
|
|
--define "_topdir ${TOPDIR}" \
|
|
-ba "${abs_srcdir}"/data/SPECS/hello.spec
|
|
],
|
|
[0],
|
|
[ignore],
|
|
[ignore])
|
|
AT_CLEANUP
|
|
|
|
# ------------------------------
|
|
# Check if rpmbuild -ba *.spec
|
|
# honours a relative topdir with --root
|
|
AT_SETUP([rpmbuild --root=... -ba *.spec])
|
|
AT_XFAIL_IF([test $RPM_XFAIL -gt 0])
|
|
AT_CHECK([
|
|
TOPDIR="${abs_builddir}"/testing/build
|
|
|
|
rm -rf ${TOPDIR}
|
|
AS_MKDIR_P(${TOPDIR}/SOURCES)
|
|
AS_MKDIR_P(${TOPDIR}/BUILD)
|
|
AS_MKDIR_P(${TOPDIR}/SPECS)
|
|
AS_MKDIR_P(${TOPDIR}/RPMS)
|
|
AS_MKDIR_P(${TOPDIR}/SRPMS)
|
|
|
|
cp "${abs_srcdir}"/data/SOURCES/hello-1.0.tar.gz ${TOPDIR}/SOURCES
|
|
|
|
rpmbuild \
|
|
--rcfile="${RPMRC}" \
|
|
--define "_topdir build" \
|
|
--root="${abs_builddir}"/testing \
|
|
-ba "${abs_srcdir}"/data/SPECS/hello.spec
|
|
],
|
|
[0],
|
|
[ignore],
|
|
[ignore])
|
|
AT_CLEANUP
|
|
|
|
# ------------------------------
|
|
# Check if rpmbuild --rebuild *.src.rpm works
|
|
AT_SETUP([rpmbuild --rebuild])
|
|
AT_XFAIL_IF([test $RPM_XFAIL -gt 0])
|
|
AT_CHECK([
|
|
TOPDIR="${abs_builddir}"/testing/build
|
|
|
|
rm -rf ${TOPDIR}
|
|
AS_MKDIR_P(${TOPDIR}/SOURCES)
|
|
AS_MKDIR_P(${TOPDIR}/BUILD)
|
|
AS_MKDIR_P(${TOPDIR}/SPECS)
|
|
AS_MKDIR_P(${TOPDIR}/RPMS)
|
|
AS_MKDIR_P(${TOPDIR}/SRPMS)
|
|
|
|
rpmbuild \
|
|
--rcfile="${RPMRC}" \
|
|
--define "_topdir ${TOPDIR}" \
|
|
--rebuild "${abs_srcdir}"/data/SRPMS/hello-1.0-1.src.rpm
|
|
],
|
|
[0],
|
|
[ignore],
|
|
[ignore])
|
|
AT_CLEANUP
|
|
|
|
# ------------------------------
|
|
# Check if rpmbuild --rebuild *.src.rpm
|
|
# honours a relative topdir with --root
|
|
AT_SETUP([rpmbuild --root=... --rebuild])
|
|
AT_XFAIL_IF([test $RPM_XFAIL -gt 0])
|
|
AT_CHECK([
|
|
TOPDIR="${abs_builddir}"/testing/build
|
|
|
|
rm -rf ${TOPDIR}
|
|
AS_MKDIR_P(${TOPDIR}/SOURCES)
|
|
AS_MKDIR_P(${TOPDIR}/BUILD)
|
|
AS_MKDIR_P(${TOPDIR}/SPECS)
|
|
AS_MKDIR_P(${TOPDIR}/RPMS)
|
|
AS_MKDIR_P(${TOPDIR}/SRPMS)
|
|
|
|
rpmbuild \
|
|
--rcfile="${RPMRC}" \
|
|
--define "_topdir build" \
|
|
--root="${abs_builddir}"/testing \
|
|
--rebuild "${abs_srcdir}"/data/SRPMS/hello-1.0-1.src.rpm
|
|
],
|
|
[0],
|
|
[ignore],
|
|
[ignore])
|
|
AT_CLEANUP
|