improved debian dependencies
This commit is contained in:
		| @@ -974,3 +974,30 @@ AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [ | |||||||
|   fi |   fi | ||||||
|   AC_SUBST(DEB_DEPEND_IFEXISTS) |   AC_SUBST(DEB_DEPEND_IFEXISTS) | ||||||
| ]) | ]) | ||||||
|  |  | ||||||
|  | # 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+=", ${pkg}" | ||||||
|  |   AC_SUBST(DEB_BUILD_DEPEND) | ||||||
|  | ]) | ||||||
|  |  | ||||||
|  | # require package in debian/control.in append @DEB_DEPEND@ to Depends | ||||||
|  | #  - parameter: | ||||||
|  | #     $1 = package name | ||||||
|  | AC_DEFUN([AX_DEB_DEPEND], [ | ||||||
|  |   pkg=$1 | ||||||
|  |   DEB_DEPEND+=", ${pkg}" | ||||||
|  |   AC_SUBST(DEB_DEPEND) | ||||||
|  | ]) | ||||||
|  |  | ||||||
|  | # 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}" | ||||||
|  |   AC_SUBST(DEB_SECTION) | ||||||
|  | ]) | ||||||
|   | |||||||
| @@ -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}() {} | ||||||
| @@ -1470,12 +1475,12 @@ EOF | |||||||
| Source: @PACKAGE_NAME@ | Source: @PACKAGE_NAME@ | ||||||
| Priority: extra | Priority: extra | ||||||
| Maintainer: @PACKAGER@ | Maintainer: @PACKAGER@ | ||||||
| Build-Depends: ${BUILD_DEPENDS} | Build-Depends: ${BUILD_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} @DEB_DEPEND@ | ||||||
| Description: @DESCRIPTION@ | Description: @DESCRIPTION@ | ||||||
| @README_DEB@ | @README_DEB@ | ||||||
| $(      if testtag AX_USE_LIBTOOL; then | $(      if testtag AX_USE_LIBTOOL; then | ||||||
| @@ -1484,7 +1489,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} @DEB_DEPEND@ @DEB_DEPEND_IFEXISTS@ | ||||||
| Description: @DESCRIPTION@ - Development Package | Description: @DESCRIPTION@ - Development Package | ||||||
| @README_DEB@ | @README_DEB@ | ||||||
| EOF2 | EOF2 | ||||||
| @@ -1496,6 +1501,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 +1509,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 | ||||||
|   | |||||||
| @@ -39,8 +39,11 @@ if test -e debian/control.in -a ! -e debian/control; then | |||||||
|             TO_INSTALL+=" ${f}" |             TO_INSTALL+=" ${f}" | ||||||
|         fi |         fi | ||||||
|     done |     done | ||||||
|  |     for f in $(sed -n 's, *AX_DEB_BUILD_DEPEND(\([^)]*\)).*,\1,p' configure.ac); do | ||||||
|  |         TO_INSTALL+=" ${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\|AX_DEB_BUILD_DEPEND\|AX_DEB_DEPEND\)@,,g' debian/control.in | \ | ||||||
|         sed 's,@[^@]*@, dummytext,g' > debian/control |         sed 's,@[^@]*@, dummytext,g' > debian/control | ||||||
| fi | fi | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user