fixed build for ubuntu, fedora, opensuse

master
Marc Wäckerlin 8 years ago
parent 4d8a5d0b7d
commit ad8bbe5cef
  1. 4
      ax_init_standard_project.m4
  2. 12
      bootstrap.sh
  3. 7
      libpcscxx.spec.in
  4. 11
      resolve-debbuilddeps.sh
  5. 9
      resolve-rpmbuilddeps.sh

@ -840,7 +840,7 @@ AC_DEFUN([AX_PKG_REQUIRE], [
fi
done
for f in $pkg $4; do
if (test -x /usr/bin/zypper && zypper search -x "${f}-devel" 1>&2 > /dev/n ull) || \
if (test -x /usr/bin/zypper && zypper search -x "${f}-devel" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "${f}-devel" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "${f}-devel" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "${f}-devel" 1>&2 > /dev/null); then
@ -911,7 +911,7 @@ AC_DEFUN([AX_PKG_CHECK], [
if test -n "$(apt-cache policy -q ${deb_pkg} 2> /dev/null)"; then
AX_DEB_BUILD_DEPEND([$deb_pkg])
fi
if (test -x /usr/bin/zypper && zypper search -x "$rpm_pkg" 1>&2 > /dev/n ull) || \
if (test -x /usr/bin/zypper && zypper search -x "$rpm_pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$rpm_pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$rpm_pkg" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$rpm_pkg" 1>&2 > /dev/null); then

@ -1629,15 +1629,19 @@ BuildRequires: which, pkgconfig, gnupg, expect, ${VCSDEPENDS_RPM}make, automake,
if testtag AX_USE_PERLDOC; then
echo -n ", libpod-tree-perl";
fi
if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then
echo -n ", qt-devel, libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel";
fi
) @RPM_BUILD_DEPEND@ @RPM_DEPEND_IFEXISTS@
#### os dependent definitions ####
%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires: lsb-release
BuildRequires: lsb-release$(
if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then
echo -n ", qt-devel, libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel";
fi)
%else
$(
if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then
echo -n "BuildRequires: qt-devel, qt5-qtbase-devel, qt5-qttools-devel, qtwebkit-devel";
fi)
%if 0%{?mageia}
BuildRequires: rpm-sign, lsb-release
%else

@ -7,12 +7,13 @@ Group: Development/Libraries/C++
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: which, pkgconfig, gnupg, expect, subversion, make, automake, autoconf, rpm-build, binutils-devel, gcc-c++, doxygen, graphviz, java-openjdk, qt-devel, libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel @RPM_BUILD_DEPEND@ @RPM_DEPEND_IFEXISTS@
BuildRequires: which, pkgconfig, gnupg, expect, subversion, make, automake, autoconf, rpm-build, binutils-devel, gcc-c++, doxygen, graphviz, java-openjdk @RPM_BUILD_DEPEND@ @RPM_DEPEND_IFEXISTS@
#### os dependent definitions ####
%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires: lsb-release
BuildRequires: lsb-release, qt-devel, libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel
%else
BuildRequires: qt-devel, qt5-qtbase-devel, qt5-qttools-devel, qtwebkit-devel
%if 0%{?mageia}
BuildRequires: rpm-sign, lsb-release
%else
@ -74,12 +75,12 @@ This Package contains all files required for developement.
%files devel
%defattr(-,root,root,-)
/usr/bin/*
/usr/%_lib/*.so
/usr/%_lib/*.a
/usr/%_lib/*.la
/usr/%_lib/pkgconfig
/usr/include/*
/usr/bin/*
%doc
/usr/share/doc/packages/@PACKAGE_NAME@/html
/usr/share/doc/packages/@PACKAGE_NAME@/examples

@ -36,10 +36,7 @@ DEPS=
if test -e debian/control.in -a ! -e debian/control; then
function pkg_exists() {
test -n "$(${DO} apt-cache policy -q ${1})" \
&& ((! $(${DO} apt-cache policy ${1} 2>&1 \
| grep -q 'N: Unable to locate package')) \
&& (! ${DO} dpkg -l "${1}" 1>&2 > /dev/null))
test -n "$(${DO} apt-cache policy -q ${1})"
}
function AX_PKG_CHECK() {
local DEV_DEB_DIST_PKG=
@ -127,4 +124,10 @@ if test -n "${TO_INSTALL}" && ! install ${TO_INSTALL}; then
exit 1
fi
FILES="$(LANG= ${DO} dpkg-checkbuilddeps 2>&1 | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')"
if test -n "${FILES}"; then
echo "**** ERROR: Cannot install: " $FILES
exit 1
fi
echo "**** Success: All Dependencies Resolved"

@ -107,5 +107,14 @@ else
fi
fi
if test -n "${SCHROOTNAME}"; then
FILES=$(LANG= schroot -c ${SCHROOTNAME} -- rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
else
FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
fi
if test -n "${FILES}"; then
echo "**** ERROR: Cannot install: " $FILES
exit 1
fi
echo "**** Success: All Dependencies Resolved"

Loading…
Cancel
Save