fixed debian dependencies

master
Marc Wäckerlin 8 years ago
parent 5a75cd1111
commit 7072d83d3f
  1. 2
      COPYING
  2. 32
      ChangeLog
  3. 2
      INSTALL
  4. 35
      ax_init_standard_project.m4
  5. 16
      bootstrap.sh
  6. 11
      resolve-debbuilddeps.sh
  7. 30
      scripts/ax_init_standard_project.m4
  8. 2
      scripts/bootstrap.sh

@ -1 +1 @@
/usr/share/automake-1.15/COPYING /usr/share/automake-1.14/COPYING

@ -1,3 +1,35 @@
2017-02-06 10:14
* [r134] scripts/resolve-debbuilddeps.sh:
fixed dependency resolve problem
2017-02-02 20:03
* [r133] ChangeLog, bootstrap.sh, scripts/bootstrap.sh:
new list RUN_DEPENDS
2017-02-02 16:49
* [r132] scripts/ax_init_standard_project.m4:
improved debian dependencies and resolve
2017-02-02 16:27
* [r131] scripts/resolve-debbuilddeps.sh:
improved debian dependencies and resolve
2017-02-02 16:06
* [r130] scripts/ax_init_standard_project.m4, scripts/bootstrap.sh,
scripts/resolve-debbuilddeps.sh:
improved debian dependencies
2017-01-07 18:56
* [r129] bootstrap.sh, build-in-docker.conf, debian/control.in,
scripts/bootstrap.sh:
fix typo
2017-01-07 11:48 2017-01-07 11:48
* [r128] ChangeLog, bootstrap.sh, build-in-docker.sh: * [r128] ChangeLog, bootstrap.sh, build-in-docker.sh:

@ -1 +1 @@
/usr/share/automake-1.15/INSTALL /usr/share/automake-1.14/INSTALL

@ -968,9 +968,40 @@ AC_DEFUN([AX_CHECK_VALID_LD_FLAG], [
# - parameter: # - parameter:
# $1 = package name # $1 = package name
AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [ AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [
pkg=$1 pkg="$1"
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS+=", ${pkg}" DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}"
fi fi
])
# require package in debian/control.in append @DEB_BUILD_DEPEND@ to Build-Depends
# - parameter:
# $1 = package name
AC_DEFUN([AX_DEB_BUILD_DEPEND], [
pkg="$1"
DEB_BUILD_DEPEND="${DEB_BUILD_DEPEND}, ${pkg}"
])
# require package in debian/control.in append @DEB_DEPEND@ to Depends
# - parameter:
# $1 = package name
AC_DEFUN([AX_DEB_DEPEND], [
pkg="$1"
DEB_DEPEND="${DEB_DEPEND}, ${pkg}"
])
# require package in debian/control.in append @DEB_DEPEND@ to Depends
# - parameter:
# $1 = package name
AC_DEFUN([AX_DEB_SECTION], [
pkg="$1"
DEB_SECTION="${pkg}"
])
# call after setting debian dependencies
AC_DEFUN([AX_DEB_RESOLVE], [
AC_SUBST(DEB_BUILD_DEPEND)
AC_SUBST(DEB_DEPEND)
AC_SUBST(DEB_SECTION)
AC_SUBST(DEB_DEPEND_IFEXISTS) AC_SUBST(DEB_DEPEND_IFEXISTS)
]) ])

@ -690,9 +690,13 @@ ${CHEADER}#include <${PACKAGE_NAME}.hxx>
#include <QApplication> #include <QApplication>
#include <QCommandLineParser> #include <QCommandLineParser>
#include <iostream> #include <iostream>
#include <version.hxx>
int main(int argc, char *argv[]) try { int main(int argc, char *argv[]) try {
QApplication a(argc, argv); QApplication a(argc, argv);
a.setApplicationDisplayName(a.tr("${PACKAGE_NAME}"));
a.setApplicationName(${PACKAGE_NAME}::package_name().c_str());
a.setApplicationVersion(${PACKAGE_NAME}::version().c_str());
QCommandLineParser parser; QCommandLineParser parser;
parser.addHelpOption(); parser.addHelpOption();
parser.process(a); parser.process(a);
@ -725,6 +729,7 @@ class ${PackageName}: public QMainWindow, protected Ui::${PackageName} {
Q_OBJECT; Q_OBJECT;
public: public:
explicit ${PackageName}(QWidget *parent = 0): QMainWindow(parent) { explicit ${PackageName}(QWidget *parent = 0): QMainWindow(parent) {
setTitle(tr("${PACKAGE_NAME}[*]"));
setupUi(this); setupUi(this);
} }
virtual ~${PackageName}() {} virtual ~${PackageName}() {}
@ -1465,17 +1470,18 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
-- @PACKAGER@ @BUILD_DATE@ -- @PACKAGER@ @BUILD_DATE@
EOF EOF
RUN_DEPENDS="$(if testtag AX_USE_NODEJS; then echo -n ", nodejs, npm"; fi)"
BUILD_DEPENDS="debhelper, fakeroot, ${VCSDEPENDS_DEB} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release$(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen, default-jre-headless|default-jre"; fi; if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)" BUILD_DEPENDS="debhelper, fakeroot, ${VCSDEPENDS_DEB} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release$(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen, default-jre-headless|default-jre"; fi; if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)"
to debian/control.in <<EOF to debian/control.in <<EOF
Source: @PACKAGE_NAME@ Source: @PACKAGE_NAME@
Priority: extra Priority: extra
Maintainer: @PACKAGER@ Maintainer: @PACKAGER@
Build-Depends: ${BUILD_DEPENDS} Build-Depends: ${BUILD_DEPENDS}${RUN_DEPENDS} @DEB_BUILD_DEPEND@ @DEB_DEPEND_IFEXISTS@
Package: @PACKAGE_NAME@ Package: @PACKAGE_NAME@
Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; fi) Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; else echo "@DEB_SECTION@"; fi)
Architecture: any Architecture: any
Depends: \${shlibs:Depends}, \${misc:Depends} Depends: \${shlibs:Depends}, \${misc:Depends}${RUN_DEPENDS} @DEB_DEPEND@
Description: @DESCRIPTION@ Description: @DESCRIPTION@
@README_DEB@ @README_DEB@
$( if testtag AX_USE_LIBTOOL; then $( if testtag AX_USE_LIBTOOL; then
@ -1484,7 +1490,7 @@ $( if testtag AX_USE_LIBTOOL; then
Package: @PACKAGE_NAME@-dev Package: @PACKAGE_NAME@-dev
Section: libdevel Section: libdevel
Architecture: any Architecture: any
Depends: @PACKAGE_NAME@ (= \${binary:Version}), ${BUILD_DEPENDS} Depends: @PACKAGE_NAME@ (= \${binary:Version}), ${BUILD_DEPENDS}${RUN_DEPENDS} @DEB_DEPEND@ @DEB_BUILD_DEPEND@ @DEB_DEPEND_IFEXISTS@
Description: @DESCRIPTION@ - Development Package Description: @DESCRIPTION@ - Development Package
@README_DEB@ @README_DEB@
EOF2 EOF2
@ -1496,6 +1502,7 @@ README
EOF EOF
to --condition AX_USE_LIBTOOL debian/${PACKAGE_NAME}.install <<EOF to --condition AX_USE_LIBTOOL debian/${PACKAGE_NAME}.install <<EOF
usr/lib/lib*.so.* usr/lib/lib*.so.*
usr/share/${PACKAGE_NAME}
EOF EOF
to --condition AX_USE_LIBTOOL debian/${PACKAGE_NAME}-dev.install <<EOF to --condition AX_USE_LIBTOOL debian/${PACKAGE_NAME}-dev.install <<EOF
usr/include/* usr/include/*
@ -1503,7 +1510,6 @@ usr/lib/lib*.a
usr/lib/lib*.so usr/lib/lib*.so
usr/lib/pkgconfig/* usr/lib/pkgconfig/*
usr/lib/*.la usr/lib/*.la
usr/share/${PACKAGE_NAME}
usr/share/doc/${PACKAGE_NAME}/html usr/share/doc/${PACKAGE_NAME}/html
EOF EOF
to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF

@ -32,21 +32,24 @@ function install() {
} }
TO_INSTALL= TO_INSTALL=
DEPS=
if test -e debian/control.in -a ! -e debian/control; then if test -e debian/control.in -a ! -e debian/control; then
for f in $(sed -n 's, *AX_DEB_DEPEND_IFEXISTS(\([^)]*\)).*,\1,p' configure.ac); do for f in $(sed -n 's, *AX_DEB_DEPEND_IFEXISTS(\([^)]*\)).*,\1,p' configure.ac); do
if test -n "$(${DO} apt-cache policy -q ${f})" && ((! $(${DO} apt-cache policy ${f} 2>&1 | grep -q 'N: Unable to locate package')) && (! ${DO} dpkg -l "${f}")); then if test -n "$(${DO} apt-cache policy -q ${f})" && ((! $(${DO} apt-cache policy ${f} 2>&1 | grep -q 'N: Unable to locate package')) && (! ${DO} dpkg -l "${f}")); then
TO_INSTALL+=" ${f}" DEPS+=" ${f}"
fi fi
done done
for f in $(sed -n 's, *AX_DEB_BUILD_DEPEND(\([^)]*\)).*,\1,p' configure.ac); do
DEPS+=" ${f}"
done
trap "rm debian/control" INT TERM EXIT trap "rm debian/control" INT TERM EXIT
sed 's,@DEB_DEPEND_IFEXISTS@,,g' debian/control.in | \ sed 's,@\(DEB_DEPEND_IFEXISTS\|DEB_BUILD_DEPEND\|DEB_DEPEND\)@,,g' debian/control.in | \
sed 's,@[^@]*@, dummytext,g' > debian/control sed 's,@[^@]*@, dummytext,g' > debian/control
fi fi
install dpkg-dev install dpkg-dev
DEPS=$(LANG= ${DO} dpkg-checkbuilddeps 2>&1 || true) DEPS+=" $(LANG= ${DO} dpkg-checkbuilddeps 2>&1 | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')"
DEPS=$(echo "$DEPS" | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')
for pa in ${DEPS}; do for pa in ${DEPS}; do
if test ${pa//|/} = ${pa}; then if test ${pa//|/} = ${pa}; then

@ -167,12 +167,6 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_TARNAME//[^a-zA-Z0-9]/_}'" AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_TARNAME//[^a-zA-Z0-9]/_}'"
AX_SUBST(NUMBERS) AX_SUBST(NUMBERS)
AX_SUBST(HOME) AX_SUBST(HOME)
DEB_DEPEND_IFEXISTS=
DEB_BUILD_DEPEND=
DEB_DEPEND=
AC_SUBST(DEB_DEPEND_IFEXISTS)
AC_SUBST(DEB_BUILD_DEPEND)
AC_SUBST(DEB_DEPEND)
if test -f README.md; then if test -f README.md; then
README=$(tail -n +3 README.md) README=$(tail -n +3 README.md)
DESCRIPTION=$(head -1 README.md) DESCRIPTION=$(head -1 README.md)
@ -974,36 +968,40 @@ AC_DEFUN([AX_CHECK_VALID_LD_FLAG], [
# - parameter: # - parameter:
# $1 = package name # $1 = package name
AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [ AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [
pkg=$1 pkg="$1"
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS+=", ${pkg}" DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}"
fi fi
AC_SUBST(DEB_DEPEND_IFEXISTS)
]) ])
# require package in debian/control.in append @DEB_BUILD_DEPEND@ to Build-Depends # require package in debian/control.in append @DEB_BUILD_DEPEND@ to Build-Depends
# - parameter: # - parameter:
# $1 = package name # $1 = package name
AC_DEFUN([AX_DEB_BUILD_DEPEND], [ AC_DEFUN([AX_DEB_BUILD_DEPEND], [
pkg=$1 pkg="$1"
DEB_BUILD_DEPEND+=", ${pkg}" DEB_BUILD_DEPEND="${DEB_BUILD_DEPEND}, ${pkg}"
AC_SUBST(DEB_BUILD_DEPEND)
]) ])
# require package in debian/control.in append @DEB_DEPEND@ to Depends # require package in debian/control.in append @DEB_DEPEND@ to Depends
# - parameter: # - parameter:
# $1 = package name # $1 = package name
AC_DEFUN([AX_DEB_DEPEND], [ AC_DEFUN([AX_DEB_DEPEND], [
pkg=$1 pkg="$1"
DEB_DEPEND+=", ${pkg}" DEB_DEPEND="${DEB_DEPEND}, ${pkg}"
AC_SUBST(DEB_DEPEND)
]) ])
# require package in debian/control.in append @DEB_DEPEND@ to Depends # require package in debian/control.in append @DEB_DEPEND@ to Depends
# - parameter: # - parameter:
# $1 = package name # $1 = package name
AC_DEFUN([AX_DEB_SECTION], [ AC_DEFUN([AX_DEB_SECTION], [
pkg=$1 pkg="$1"
DEB_SECTION="${pkg}" DEB_SECTION="${pkg}"
])
# call after setting debian dependencies
AC_DEFUN([AX_DEB_RESOLVE], [
AC_SUBST(DEB_BUILD_DEPEND)
AC_SUBST(DEB_DEPEND)
AC_SUBST(DEB_SECTION) AC_SUBST(DEB_SECTION)
AC_SUBST(DEB_DEPEND_IFEXISTS)
]) ])

@ -1490,7 +1490,7 @@ $( if testtag AX_USE_LIBTOOL; then
Package: @PACKAGE_NAME@-dev Package: @PACKAGE_NAME@-dev
Section: libdevel Section: libdevel
Architecture: any Architecture: any
Depends: @PACKAGE_NAME@ (= \${binary:Version}), ${BUILD_DEPENDS}${RUN_DEPENDS} @DEB_DEPEND@ @DEB_DEPEND_IFEXISTS@ Depends: @PACKAGE_NAME@ (= \${binary:Version}), ${BUILD_DEPENDS}${RUN_DEPENDS} @DEB_DEPEND@ @DEB_BUILD_DEPEND@ @DEB_DEPEND_IFEXISTS@
Description: @DESCRIPTION@ - Development Package Description: @DESCRIPTION@ - Development Package
@README_DEB@ @README_DEB@
EOF2 EOF2

Loading…
Cancel
Save