improved windozw build
This commit is contained in:
123
bootstrap.sh
123
bootstrap.sh
@@ -147,7 +147,9 @@ GENERATED FILES
|
||||
* src/makefile.am - if you enabled AX_USE_CXX
|
||||
* src/version.hxx - if you enabled AX_USE_CXX
|
||||
* src/version.cxx - if you enabled AX_USE_CXX
|
||||
* html/makefile.am - if you enabled AX_BUILD_HTML
|
||||
* etc/makefile.am - if you enable AX_USE_ETC
|
||||
* html/makefile.am - if you enabled AX_BUILD_HTML or AX_BUILD_HTML_NPM
|
||||
* html/package.json.in - if you enabled AX_BUILD_HTML_NPM
|
||||
* scripts/makefile.am - if you enabled AX_USE_SCRIPTS
|
||||
* nodejs/makefile.am - if you add AX_USE_NODEJS
|
||||
* nodejs/${DEFAULT_PROJECT_NAME}.js - if you add AX_USE_NODEJS
|
||||
@@ -222,7 +224,7 @@ FILE DEPENDENCIES
|
||||
configuration a dependent, i.e.:
|
||||
|
||||
* test/makefile.am depends on AX_USE_LIBTOOL
|
||||
* html/makefile.am depends on AX_BUILD_HTML
|
||||
* html/makefile.am depends on AX_BUILD_HTML or AX_BUILD_HTML_NPM
|
||||
* doc/doxyfile.in depends on AX_BUILD_EXAMPLES
|
||||
* debian/control.in depends on AX_USE_DOXYGEN, AX_USE_PERLDOC,
|
||||
AX_USE_CPPUNIT AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL
|
||||
@@ -256,6 +258,7 @@ FILES
|
||||
number. In git, git rev-list --all --count is used.
|
||||
The following macros are supported in configure.ac:
|
||||
* Enable C++: AX_USE_CXX
|
||||
* Enable system config files in /etc: AX_USE_ETC
|
||||
* Enable LibTool library creation: AX_USE_LIBTOOL
|
||||
* Enable Scripts: AX_USE_SCRIPTS
|
||||
* Enable NodeJS project: AX_USE_NODEJS
|
||||
@@ -302,7 +305,7 @@ VCSDEPENDS=""
|
||||
if test -d .svn; then
|
||||
VCS="svn"
|
||||
VCSDEPENDS_DEB="svn2cl, subversion, subversion-tools,"
|
||||
VCSDEPENDS_RPM="subversion, subversion-tools,"
|
||||
VCSDEPENDS_RPM="subversion,"
|
||||
echo -e " \e[32msuccess\e[0m detected ${VCS}"
|
||||
elif test -d .git; then
|
||||
VCS="git"
|
||||
@@ -569,6 +572,7 @@ AX_INIT_STANDARD_PROJECT
|
||||
|
||||
# requirements, uncomment, what you need:
|
||||
#AX_USE_CXX
|
||||
#AX_USE_ETC
|
||||
#AX_USE_LIBTOOL
|
||||
#AX_USE_SCRIPTS
|
||||
#AX_USE_NODEJS
|
||||
@@ -580,6 +584,7 @@ AX_INIT_STANDARD_PROJECT
|
||||
#AX_BUILD_TEST
|
||||
#AX_BUILD_EXAMPLES
|
||||
#AX_BUILD_HTML
|
||||
#AX_BUILD_HTML_NPM
|
||||
|
||||
# qt features, uncomment, what you need:
|
||||
#AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets])
|
||||
@@ -690,9 +695,13 @@ ${CHEADER}#include <${PACKAGE_NAME}.hxx>
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <iostream>
|
||||
#include <version.hxx>
|
||||
|
||||
int main(int argc, char *argv[]) try {
|
||||
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;
|
||||
parser.addHelpOption();
|
||||
parser.process(a);
|
||||
@@ -725,6 +734,7 @@ class ${PackageName}: public QMainWindow, protected Ui::${PackageName} {
|
||||
Q_OBJECT;
|
||||
public:
|
||||
explicit ${PackageName}(QWidget *parent = 0): QMainWindow(parent) {
|
||||
setTitle(tr("${PACKAGE_NAME}[*]"));
|
||||
setupUi(this);
|
||||
}
|
||||
virtual ~${PackageName}() {}
|
||||
@@ -854,6 +864,13 @@ namespace NAMESPACE {
|
||||
const std::string IDENT("\$Id: " PACKAGE_STRING);
|
||||
}
|
||||
EOF
|
||||
to --condition AX_USE_ETC etc/makefile.am <<EOF
|
||||
${HEADER}pkgsysconfdir = \${sysconfdir}/@PACKAGE_NAME@
|
||||
|
||||
dist_pkgsysconf_DATA =
|
||||
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
EOF
|
||||
to --condition AX_USE_SCRIPTS scripts/makefile.am <<EOF
|
||||
${HEADER}dist_bin_SCRIPTS =
|
||||
|
||||
@@ -873,9 +890,9 @@ nodejsdir = \${pkgdatadir}/nodejs
|
||||
|
||||
sysconfdefaultdir = \${sysconfdir}/default
|
||||
sysconfinitdir = \${sysconfdir}/init
|
||||
dist_sysconf_DATA = etc/@PACKAGE_NAME@.json
|
||||
dist_sysconfdefault_DATA = etc/default/@PACKAGE_NAME@
|
||||
dist_sysconfinit_DATA = etc/init/@PACKAGE_NAME@.conf
|
||||
dist_sysconf_DATA = \${sysconfdir}/@PACKAGE_NAME@.json
|
||||
dist_sysconfdefault_DATA = \${sysconfdir}/default/@PACKAGE_NAME@
|
||||
dist_sysconfinit_DATA = \${sysconfdir}/init/@PACKAGE_NAME@.conf
|
||||
|
||||
all: node_modules
|
||||
|
||||
@@ -1066,7 +1083,9 @@ to --condition AX_USE_NODEJS nodejs/etc/systemd/system/${PACKAGE_NAME}.service <
|
||||
Description=$(head -1 README)
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/nodejs /usr/share/${PACKAGE_NAME}/nodejs/${PACKAGE_NAME} > /var/log/${PACKAGE_NAME}.log
|
||||
ExecStart=/usr/bin/nodejs /usr/share/${PACKAGE_NAME}/nodejs/${PACKAGE_NAME}
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
Restart=on-abort
|
||||
|
||||
[Install]
|
||||
@@ -1265,11 +1284,59 @@ LDADD = -l${PACKAGE_NAME#lib}
|
||||
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
EOF
|
||||
to --condition AX_BUILD_HTML html/makefile.am <<EOF
|
||||
${HEADER}EXTRA_DIST = \${www_DATA}
|
||||
to --condition AX_BUILD_HTML_NPM html/package.json.in <<EOF
|
||||
{
|
||||
"name": "@PACKAGE_NAME@",
|
||||
"version": "@PACKAGE_VERSION@",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
},
|
||||
"description": "@DESCRIPTION@",
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "@AUTHOR@",
|
||||
"license": "@LICENSE@",
|
||||
"path": {
|
||||
"prefix": "@PREFIX@",
|
||||
"sysconf": "@SYSCONFDIR@",
|
||||
"pkgdata": "@PKGDATADIR@",
|
||||
"localstate": "@LOCALSTATEDIR@",
|
||||
"log": "@LOCALSTATEDIR@/log/@PACKAGE_NAME@.log",
|
||||
"config": "@SYSCONFDIR@/@PACKAGE_NAME@.json",
|
||||
"nodejs": "@PKGDATADIR@/nodejs"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
to --condition 'AX_BUILD_HTML|AX_BUILD_HTML_NPM' html/makefile.am <<EOF
|
||||
${HEADER}EXTRA_DIST = $(testtag AX_BUILD_HTML_NPM && echo "package.json.in")
|
||||
|
||||
wwwdir = \${pkgdatadir}/html
|
||||
www_DATA =
|
||||
www_DATA = $(testtag AX_BUILD_HTML_NPM && echo "package.json")
|
||||
dist_www_DATA =
|
||||
|
||||
$(if testtag AX_BUILD_HTML_NPM; then
|
||||
cat<<EOF2
|
||||
|
||||
all: node_modules
|
||||
|
||||
node_modules: package.json.in
|
||||
HOME=. npm install
|
||||
|
||||
clean-local:
|
||||
-rm -r node_modules .npm
|
||||
|
||||
install-data-hook:
|
||||
test -d \$(DESTDIR)\${wwwdir} || mkdir -p \$(DESTDIR)\${wwwdir}
|
||||
chmod -R u+w \$(DESTDIR)\${wwwdir}
|
||||
cp -r . \$(DESTDIR)\${wwwdir}
|
||||
|
||||
uninstall-local:
|
||||
-chmod -R u+w \$(DESTDIR)\${wwwdir}
|
||||
-rm -rf \$(DESTDIR)\${wwwdir}
|
||||
EOF2
|
||||
fi)
|
||||
|
||||
MAINTAINERCLEANFILES = makefile.in
|
||||
EOF
|
||||
@@ -1465,17 +1532,18 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
|
||||
|
||||
-- @PACKAGER@ @BUILD_DATE@
|
||||
EOF
|
||||
BUILD_DEPENDS="debhelper, fakeroot, ${VCSDEPENDS_DEB} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release, fakeroot, $(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)"
|
||||
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)"
|
||||
to debian/control.in <<EOF
|
||||
Source: @PACKAGE_NAME@
|
||||
Priority: extra
|
||||
Maintainer: @PACKAGER@
|
||||
Build-Depends: ${BUILD_DEPENDS}
|
||||
Build-Depends: ${BUILD_DEPENDS}${RUN_DEPENDS} @DEB_BUILD_DEPEND@ @DEB_DEPEND_IFEXISTS@
|
||||
|
||||
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
|
||||
Depends: \${shlibs:Depends}, \${misc:Depends}
|
||||
Depends: \${shlibs:Depends}, \${misc:Depends}${RUN_DEPENDS} @DEB_DEPEND@
|
||||
Description: @DESCRIPTION@
|
||||
@README_DEB@
|
||||
$( if testtag AX_USE_LIBTOOL; then
|
||||
@@ -1484,7 +1552,7 @@ $( if testtag AX_USE_LIBTOOL; then
|
||||
Package: @PACKAGE_NAME@-dev
|
||||
Section: libdevel
|
||||
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
|
||||
@README_DEB@
|
||||
EOF2
|
||||
@@ -1496,6 +1564,7 @@ README
|
||||
EOF
|
||||
to --condition AX_USE_LIBTOOL debian/${PACKAGE_NAME}.install <<EOF
|
||||
usr/lib/lib*.so.*
|
||||
usr/share/${PACKAGE_NAME}
|
||||
EOF
|
||||
to --condition AX_USE_LIBTOOL debian/${PACKAGE_NAME}-dev.install <<EOF
|
||||
usr/include/*
|
||||
@@ -1503,7 +1572,6 @@ usr/lib/lib*.a
|
||||
usr/lib/lib*.so
|
||||
usr/lib/pkgconfig/*
|
||||
usr/lib/*.la
|
||||
usr/share/${PACKAGE_NAME}
|
||||
usr/share/doc/${PACKAGE_NAME}/html
|
||||
EOF
|
||||
to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF
|
||||
@@ -1600,7 +1668,9 @@ echo
|
||||
echo This package contains only the shared libraries required at runtime.
|
||||
fi)
|
||||
|
||||
|
||||
$(if ! testtag 'AX_USE_LIBTOOL|AX_USE_CXX'; then
|
||||
echo '%global debug_package %{nil}'
|
||||
fi)
|
||||
%prep
|
||||
%setup -q
|
||||
./configure --prefix=/usr \\
|
||||
@@ -1625,6 +1695,7 @@ else
|
||||
echo '/usr/bin/*'
|
||||
echo '/usr/share/applications/*'
|
||||
fi)
|
||||
/usr/share/@PACKAGE_NAME@
|
||||
%doc
|
||||
$(if testtag AX_USE_LIBTOOL; then
|
||||
cat <<EOF2
|
||||
@@ -1636,7 +1707,7 @@ $(if testtag AX_USE_LIBTOOL; then
|
||||
/usr/share/doc/packages/@PACKAGE_NAME@/README
|
||||
EOF2
|
||||
else
|
||||
echo '/usr/share/*'
|
||||
echo '/usr/share/doc/packages/@PACKAGE_NAME@'
|
||||
fi)
|
||||
|
||||
$(if testtag AX_USE_LIBTOOL; then
|
||||
@@ -1671,6 +1742,9 @@ SUBDIRS=""
|
||||
if testtag AX_USE_CXX; then
|
||||
SUBDIRS="${SUBDIRS} src"
|
||||
fi
|
||||
if testtag AX_USE_ETC; then
|
||||
SUBDIRS="${SUBDIRS} etc"
|
||||
fi
|
||||
if testtag AX_BUILD_TEST AX_USE_CPPUNIT; then
|
||||
SUBDIRS="${SUBDIRS} test"
|
||||
fi
|
||||
@@ -1735,10 +1809,15 @@ Cflags: -I\${includedir} @CPPFLAGS@
|
||||
Requires: @PKG_REQUIREMENTS@
|
||||
EOF
|
||||
to build-in-docker.conf <<EOF
|
||||
repos+=("Debian|Ubuntu-precise::::::universe")
|
||||
repos+=("Ubuntu-precise:::'deb http://archive.ubuntu.com/ubuntu precise universe'")
|
||||
envs+=("-e 'HOME=\${HOME}'")
|
||||
dirs+=("-v \${HOME}/.gnupg:\${HOME}/.gnupg:ro")
|
||||
${HEADER}# Use Ubuntu Universe Repository
|
||||
repos+=("Ubuntu:::universe")
|
||||
|
||||
# Use Marc Wäckerlin's Repository, see https://dev.marc.waeckerlin.org
|
||||
repos+=("Debian|Ubuntu:::https://dev.marc.waeckerlin.org/repository")
|
||||
repos+=("openSUSE:::https://dev.marc.waeckerlin.org/repository/opensuse/marc-waeckerlin.repo")
|
||||
repos+=("Fedora:::https://dev.marc.waeckerlin.org/repository/fedora/marc-waeckerlin.repo")
|
||||
repos+=("CentOS:::https://dev.marc.waeckerlin.org/repository/centos/marc-waeckerlin.repo")
|
||||
keys+=("https://dev.marc.waeckerlin.org/repository/PublicKey")
|
||||
EOF
|
||||
|
||||
#### Cleanup If Makefile Exists ####
|
||||
|
Reference in New Issue
Block a user