|
|
|
@ -240,15 +240,29 @@ done |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HEADER='## @id '"\$Id\$"' |
|
|
|
|
# |
|
|
|
|
# This file has been added by '${MY_NAME}' on '$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")' |
|
|
|
|
# Feel free to change it or even remove and rebuild it, up to your needs |
|
|
|
|
# |
|
|
|
|
## |
|
|
|
|
## This file has been added: |
|
|
|
|
## - by '${MY_NAME}' |
|
|
|
|
## - on '$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")' |
|
|
|
|
## Feel free to change it or even remove and rebuild it, up to your needs |
|
|
|
|
## |
|
|
|
|
## 1 2 3 4 5 6 7 8 |
|
|
|
|
## 45678901234567890123456789012345678901234567890123456789012345678901234567890 |
|
|
|
|
|
|
|
|
|
' |
|
|
|
|
|
|
|
|
|
CHEADER='/** @id '"\$Id\$"' |
|
|
|
|
|
|
|
|
|
This file has been added: |
|
|
|
|
- by '${MY_NAME}' |
|
|
|
|
- on '$(LANG= date +"%a, %d %B %Y %H:%M:%S %z")' |
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
// 1 2 3 4 5 6 7 8 |
|
|
|
|
// 45678901234567890123456789012345678901234567890123456789012345678901234567890 |
|
|
|
|
|
|
|
|
|
' |
|
|
|
|
|
|
|
|
|
notice() { |
|
|
|
|
echo -e "\e[1;33m$*\e[0m" |
|
|
|
|
} |
|
|
|
@ -436,12 +450,19 @@ AX_INIT_STANDARD_PROJECT |
|
|
|
|
# create output |
|
|
|
|
AC_OUTPUT |
|
|
|
|
EOF |
|
|
|
|
|
|
|
|
|
PACKAGE_NAME=$(sed -n 's/.*m4_define *( *x_package_name *, *\([^ ]*\) *).*/\1/p' configure.ac) |
|
|
|
|
SAVEIFS="$IFS" |
|
|
|
|
IFS="-" PackageName=( $PACKAGE_NAME ) |
|
|
|
|
IFS="$SAVEIFS" |
|
|
|
|
PackageName=${PackageName[*]^} |
|
|
|
|
PackageName=${PackageName// /} |
|
|
|
|
|
|
|
|
|
if ! testtag "AX_CHECK_QT" configure.ac && \ |
|
|
|
|
! testtag "AX_REQUIRE_QT" configure.ac; then |
|
|
|
|
echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | \ |
|
|
|
|
to --condition AX_USE_CXX src/makefile.am |
|
|
|
|
else |
|
|
|
|
elif ! test -e src/makefile.am; then |
|
|
|
|
to --condition AX_USE_CXX src/makefile.am <<EOF |
|
|
|
|
${HEADER}bin_PROGRAMS = ${PACKAGE_NAME} |
|
|
|
|
|
|
|
|
@ -475,7 +496,7 @@ ${PACKAGE_NAME//-/_}_UIFILES = ui_${PACKAGE_NAME}.hxx |
|
|
|
|
|
|
|
|
|
## list all %.qrc resource files as qrc_%.cxx |
|
|
|
|
## note: if there exists a directory %, the file %.qrc is generated from that |
|
|
|
|
${PACKAGE_NAME//-/_}_RESOURCES = qrc_languages.cxx qrc_resources.cxx |
|
|
|
|
${PACKAGE_NAME//-/_}_RESOURCES = qrc_languages.cxx # qrc_resources.cxx |
|
|
|
|
|
|
|
|
|
## list all final translation files, list all supported languages here |
|
|
|
|
${PACKAGE_NAME//-/_}_TRANSLATIONS = \${LANGUAGE_FILE_BASE}_en.qm \\ |
|
|
|
@ -487,7 +508,7 @@ ${PACKAGE_NAME//-/_}_TRANSLATIONS = \${LANGUAGE_FILE_BASE}_en.qm \\ |
|
|
|
|
${PACKAGE_NAME//-/_}_TR_FILES = main.cxx version.cxx |
|
|
|
|
|
|
|
|
|
## automatic assembly, no need to change |
|
|
|
|
${PACKAGE_NAME//-/_}_SOURCES = ${swisssign_pin_entry_TR_FILES} ${BUILT_SOURCES} |
|
|
|
|
${PACKAGE_NAME//-/_}_SOURCES = \${${PACKAGE_NAME//-/_}_TR_FILES} \${BUILT_SOURCES} |
|
|
|
|
|
|
|
|
|
## automatic assembly, no need to change |
|
|
|
|
BUILT_SOURCES = \${${PACKAGE_NAME//-/_}_MOCFILES} \ |
|
|
|
@ -510,6 +531,89 @@ EXTRA_DIST = \${EXTRA_DIST_TR} \ |
|
|
|
|
LANGUAGE_FILES = \${EXTRA_DIST_TR} \${${PACKAGE_NAME//-/_}_TR_FILES} |
|
|
|
|
|
|
|
|
|
MAINTAINERCLEANFILES = makefile.in |
|
|
|
|
EOF |
|
|
|
|
to --condition AX_USE_CXX src/main.cxx <<EOF |
|
|
|
|
${CHEADER}#include <${PACKAGE_NAME}.hxx> |
|
|
|
|
#include <QApplication> |
|
|
|
|
#include <QCommandLineParser> |
|
|
|
|
#include <iostream> |
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) try { |
|
|
|
|
QApplication a(argc, argv); |
|
|
|
|
QCommandLineParser parser; |
|
|
|
|
parser.addHelpOption(); |
|
|
|
|
parser.process(a); |
|
|
|
|
QStringList scripts(parser.positionalArguments()); |
|
|
|
|
${PackageName} w; |
|
|
|
|
w.show(); |
|
|
|
|
return a.exec(); |
|
|
|
|
} catch (std::exception &x) { |
|
|
|
|
std::cerr<<"**** error: "<<x.what()<<std::endl; |
|
|
|
|
return 1; |
|
|
|
|
} |
|
|
|
|
EOF |
|
|
|
|
to --condition AX_USE_CXX src/${PACKAGE_NAME}.hxx <<EOF |
|
|
|
|
${CHEADER}#ifndef ${PackageName^^}_HXX |
|
|
|
|
#define ${PackageName^^}_HXX |
|
|
|
|
|
|
|
|
|
#include <QMainWindow> |
|
|
|
|
#include <ui_${PACKAGE_NAME}.hxx> |
|
|
|
|
|
|
|
|
|
/// Main Window |
|
|
|
|
/** Main window for ${PACKAGE_NAME} */ |
|
|
|
|
class ${PackageName}: public QMainWindow, protected Ui::${PackageName} { |
|
|
|
|
Q_OBJECT; |
|
|
|
|
public: |
|
|
|
|
explicit ${PackageName}(QWidget *parent = 0): QMainWindow(parent) { |
|
|
|
|
setupUi(this); |
|
|
|
|
} |
|
|
|
|
virtual ~${PackageName}() {} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
EOF |
|
|
|
|
to --condition AX_USE_CXX src/${PACKAGE_NAME}.ui <<EOF |
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
|
|
<ui version="4.0"> |
|
|
|
|
<class>${PackageName}</class> |
|
|
|
|
<widget class="QMainWindow" name="${PackageName}"> |
|
|
|
|
<property name="geometry"> |
|
|
|
|
<rect> |
|
|
|
|
<x>0</x> |
|
|
|
|
<y>0</y> |
|
|
|
|
<width>800</width> |
|
|
|
|
<height>600</height> |
|
|
|
|
</rect> |
|
|
|
|
</property> |
|
|
|
|
<property name="windowTitle"> |
|
|
|
|
<string>${PackageName}</string> |
|
|
|
|
</property> |
|
|
|
|
<widget class="QWidget" name="centralwidget"/> |
|
|
|
|
<widget class="QMenuBar" name="menubar"> |
|
|
|
|
<property name="geometry"> |
|
|
|
|
<rect> |
|
|
|
|
<x>0</x> |
|
|
|
|
<y>0</y> |
|
|
|
|
<width>800</width> |
|
|
|
|
<height>22</height> |
|
|
|
|
</rect> |
|
|
|
|
</property> |
|
|
|
|
</widget> |
|
|
|
|
<widget class="QStatusBar" name="statusbar"/> |
|
|
|
|
</widget> |
|
|
|
|
<resources/> |
|
|
|
|
<connections/> |
|
|
|
|
</ui> |
|
|
|
|
EOF |
|
|
|
|
to --condition AX_USE_CXX src/languages.qrc <<EOF |
|
|
|
|
<RCC> |
|
|
|
|
<qresource prefix="/language"> |
|
|
|
|
<file>${PACKAGE_NAME}_de.qm</file> |
|
|
|
|
<file>${PACKAGE_NAME}_fr.qm</file> |
|
|
|
|
<file>${PACKAGE_NAME}_it.qm</file> |
|
|
|
|
<file>${PACKAGE_NAME}_en.qm</file> |
|
|
|
|
</qresource> |
|
|
|
|
</RCC> |
|
|
|
|
EOF |
|
|
|
|
fi |
|
|
|
|
to --condition AX_USE_CXX src/version.hxx <<EOF |
|
|
|
@ -698,12 +802,11 @@ if testtag AX_USE_DEBIAN_PACKAGING; then |
|
|
|
|
|
|
|
|
|
-- @AUTHOR@ @BUILD_DATE@ |
|
|
|
|
EOF |
|
|
|
|
BUILD_DEPENDS="debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; 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 | qt4-default | 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: @AUTHOR@ |
|
|
|
|
Build-Depends: ${BUILD-DEPENDS} |
|
|
|
|
Build-Depends: debhelper, subversion, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; 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 | qt4-default | 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) |
|
|
|
|
|
|
|
|
|
Package: @PACKAGE_NAME@ |
|
|
|
|
Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; fi) |
|
|
|
@ -717,7 +820,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}) |
|
|
|
|
Description: @DESCRIPTION@ - Development Package |
|
|
|
|
@README_DEB@ |
|
|
|
|
EOF2 |
|
|
|
|