build tested for deb and rpm

master
Marc Wäckerlin 6 years ago
parent 9c571040bd
commit b79c5b64c3
  1. 150
      ChangeLog
  2. 7
      README
  3. 14
      README.md
  4. 33
      ax_check_qt.m4
  5. 82
      ax_init_standard_project.m4
  6. 31
      bootstrap.sh
  7. 24
      build-in-docker.sh
  8. 45
      certman.spec.in
  9. 4
      configure.ac
  10. 64
      mac-create-app-bundle.sh
  11. 8
      makefile.am
  12. 2
      resolve-debbuilddeps.sh
  13. 4
      resolve-rpmbuilddeps.sh

@ -1,150 +0,0 @@
2017-03-15 08:50
* [r23] COPYING, INSTALL, build-in-docker.conf, configure.ac,
debian, debian/changelog.in[ADD], debian/compat[ADD],
debian/control.in[ADD], debian/docs[ADD], debian/rules[ADD]:
fixed debian and docker build
2017-03-14 15:27
* [r22] ChangeLog, ax_cxx_compile_stdcxx_11.m4,
ax_init_standard_project.m4, bootstrap.sh, build-in-docker.sh,
certman.svg[ADD], doc/footer.html.in[ADD],
doc/header.html.in[ADD], doc/plantuml.jar[ADD],
doc/style.css[ADD], makefile.am, makefile_test.inc.am[ADD],
resolve-debbuilddeps.sh, resolve-rpmbuilddeps.sh, sql-to-dot.sed:
added logo
2016-05-14 11:31
* [r21] src/certman.hxx:
read more than one certificate from a file; take file names in
command line arguments
2016-05-14 10:26
* [r20] ax_init_standard_project.m4, bootstrap.sh,
build-in-docker.conf[ADD], resolve-rpmbuilddeps.sh,
src/certman.hxx, src/main.cxx:
read more than one certificate from a file; take file names in
command line arguments
2016-05-05 17:19
* [r19] ChangeLog, ax_init_standard_project.m4, build-in-docker.sh:
updated build system
2016-04-24 16:20
* [r18] ChangeLog, autogen.sh[ADD], ax_init_standard_project.m4,
bootstrap.sh, build-in-docker.sh, mac-create-app-bundle.sh,
resolve-debbuilddeps.sh, resolve-rpmbuilddeps.sh,
src/version.cxx, src/version.hxx:
fix build error
2015-11-28 13:48 marc
* [r17] ChangeLog, ax_init_standard_project.m4, bootstrap.sh,
build-in-docker.sh, certman.desktop.in[ADD], sql-to-dot.sed[ADD]:
buildsystem update
2015-11-16 12:37 marc
* [r16] doc/doxyfile.in:
SVG must not be interactive for embedding in redmine
2015-11-09 12:52 marc
* [r15] ax_init_standard_project.m4, bootstrap.sh,
debian/control.in, resolve-debbuilddeps.sh:
fixed build dependencies
2015-11-07 10:47 marc
* [r14] bootstrap.sh:
there is no qt4-default
2015-11-07 09:23 marc
* [r13] bootstrap.sh, debian/control.in:
there is no qt4-default
2015-11-06 23:58 marc
* [r12] debian/control.in:
fixed dependencies
2015-11-05 09:47 marc
* [r11] ax_init_standard_project.m4, bootstrap.sh,
build-in-docker.sh[ADD], resolve-debbuilddeps.sh:
updated build system
2015-11-05 09:07 marc
* [r10] doc/doxyfile.in:
doxygen should not build search engine, it's awful in embedded
redmine
2015-11-04 06:27 marc
* [r9] debian/control.in:
update dependencies
2015-11-03 23:05 marc
* [r8] debian/control.in:
set section
2015-11-03 22:05 marc
* [r7] AUTHORS:
AUTHOR updated to new homepage
2015-11-03 14:33 marc
* [r6] ChangeLog, ax_check_qt.m4, ax_init_standard_project.m4,
bootstrap.sh, resolve-debbuilddeps.sh:
prepared for build in a docker instance on jenkins
2015-10-09 15:02 marc
* [r5] src/certman.hxx:
typo
2015-10-08 16:37 marc
* [r4] doc/screenshots[ADD], doc/screenshots/openfromurl.png[ADD]:
added screenshot
2015-10-08 14:38 marc
* [r3] COPYING[ADD], ChangeLog[ADD], INSTALL[ADD],
src/certificate.hxx[ADD], src/certificate.ui[ADD],
src/certman.hxx, src/certman.ui, src/certman_de.ts[ADD],
src/certman_en.ts[ADD], src/certman_fr.ts[ADD],
src/certman_it.ts[ADD], src/makefile.am,
src/openfromurl.hxx[ADD], src/openfromurl.ui[ADD]:
first version to show an save certificates from files or urls
2015-10-08 11:22 marc
* [r2] AUTHORS[ADD], NEWS[ADD], README[ADD], ax_check_qt.m4[ADD],
ax_cxx_compile_stdcxx_11.m4[ADD],
ax_init_standard_project.m4[ADD], bootstrap.sh[ADD],
build-resource-file.sh[ADD], certman.spec.in[ADD],
configure.ac[ADD], debian[ADD], debian/changelog.in[ADD],
debian/compat[ADD], debian/control.in[ADD], debian/docs[ADD],
debian/rules[ADD], doc[ADD], doc/doxyfile.in[ADD],
doc/makefile.am[ADD], mac-create-app-bundle.sh[ADD],
makefile.am[ADD], resolve-debbuilddeps.sh[ADD],
resolve-rpmbuilddeps.sh[ADD], src[ADD], src/certman.hxx[ADD],
src/certman.ui[ADD], src/languages.qrc[ADD], src/main.cxx[ADD],
src/makefile.am[ADD], src/version.cxx[ADD], src/version.hxx[ADD]:
bootstrapped qt project
2015-10-08 08:50 marc
* [r1] .[ADD]:
structure

@ -1,7 +0,0 @@
Certificate Manager
Tool to read an write certificates, i.e. SSL certificates and
SuisseIDs. Supports PEM, DER and PKCS#11 cryptoki token reader. This
tool should assist in investigating certificate problems.
Based on QT and libpcscxx.

@ -0,0 +1,14 @@
Certificate Manager
==================
Tool to read an write certificates, i.e. SSL certificates and SuisseIDs. Supports PEM and DER. This tool should assist in investigating certificate problems.
Based on QT and libpcscxx.
Examples
--------
You can load certificates of an SSL webserver directly from an URL (enter URL without `https://`) and arrange all certificates in sub windows:
[Example: Open from URL, with certificates in background](doc/screenshots/openfromurl.png)

@ -119,10 +119,17 @@ AC_DEFUN([AX_CHECK_QT], [
AC_DEFINE([HAVE_$1])
QTDIR=$(${PKG_CONFIG} --variable=prefix Qt5Core)
qt_host_bins=$(${PKG_CONFIG} --variable=host_bins Qt5Core)
if test -d "${qt_host_bins}"; then
QT_PLUGIN_PATH=${qt_host_bins}/../plugins
else
QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins
qt_libdir=$(${PKG_CONFIG} --variable=libdir Qt5Core)
if test -d "${qt_libdir}" -a -d "${qt_libdir}/plugins"; then
QT_PLUGIN_PATH="${qt_libdir}/plugins"
elif test -d "${qt_libdir}/qt5" -a -d "${qt_libdir}/qt5/plugins"; then
QT_PLUGIN_PATH="${qt_libdir}/qt5/plugins"
elif test -d "${qt_host_bins}" -a -d "${qt_host_bins}/../plugins"; then
QT_PLUGIN_PATH="${qt_host_bins}/../plugins"
elif test -d "${QTDIR}/plugins; then
QT_PLUGIN_PATH="${QTDIR}/plugins"
elif test -d "${QTDIR}/share/qt5/plugins; then
QT_PLUGIN_PATH="${QTDIR}/share/qt5/plugins"
fi
MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}"
[$1]_CPPFLAGS="${[$1]5_CFLAGS}"
@ -166,10 +173,17 @@ AC_DEFUN([AX_CHECK_QT], [
AC_DEFINE([HAVE_$1])
QTDIR=$(${PKG_CONFIG} --variable=prefix QtCore)
qt_host_bins=$(${PKG_CONFIG} --variable=host_bins QtCore)
if test -d "${qt_host_bins}"; then
QT_PLUGIN_PATH=${qt_host_bins}/../plugins
else
QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins
qt_libdir=$(${PKG_CONFIG} --variable=libdir QtCore)
if test -d "${qt_libdir}" -a -d "${qt_libdir}/plugins"; then
QT_PLUGIN_PATH="${qt_libdir}/plugins"
elif test -d "${qt_libdir}/qt5" -a -d "${qt_libdir}/qt5/plugins"; then
QT_PLUGIN_PATH="${qt_libdir}/qt5/plugins"
elif test -d "${qt_host_bins}" -a -d "${qt_host_bins}/../plugins"; then
QT_PLUGIN_PATH="${qt_host_bins}/../plugins"
elif test -d "${QTDIR}/plugins; then
QT_PLUGIN_PATH="${QTDIR}/plugins"
elif test -d "${QTDIR}/share/qt5/plugins; then
QT_PLUGIN_PATH="${QTDIR}/share/qt5/plugins"
fi
MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}"
[$1]_CPPFLAGS="${[$1]_CFLAGS}"
@ -214,9 +228,6 @@ AC_DEFUN([AX_CHECK_QT], [
AX_CHECK_VALID_CXX_FLAG([-Wl,-subsystem,windows], [windows console flag])
fi
test "x$prefix" = xNONE && prefix=$ac_default_prefix
if test "${QT_PLUGIN_PATH}" = "${QT_PLUGIN_PATH#${prefix}}"; then
QT_PLUGIN_PATH=${prefix}${QT_PLUGIN_PATH#/usr}
fi
AC_ARG_WITH([qt-plugin-path],
[AS_HELP_STRING([--with-qt-plugin-path=PATH],
[define a different qt plugin path, current @<:@default=check@:>@])],

@ -1,4 +1,4 @@
## @id $Id$
## @id $Id: ax_init_standard_project.m4 204 2016-09-29 18:29:53Z marc $
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
@ -218,8 +218,17 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AX_SUBST(AUTHOR_URL)
AX_SUBST(AUTHOR_MAIL)
AX_SUBST(PACKAGER)
PROJECT_URL="${PROJECT_URL:-${AUTHOR_URL}/projects/${PACKAGE_NAME}}"
SOURCE_DOWNLOAD="${SOURCE_DOWNLOAD:-${AUTHOR_URL}/downloads/${PACKAGE_NAME}}"
PROJECT_URL="${PROJECT_URL:-${AUTHOR_URL}}"
for path in . .. ../.. ../../..; do
if test -d ${path}/.svn; then
PROJECT_URL="$(LANG= svn info | sed -n 's,^Repository Root: ,,p')"
break
elif test -d ${path}/.git; then
PROJECT_URL="$(git remote get-url origin)"
break
fi
done
SOURCE_DOWNLOAD="${SOURCE_DOWNLOAD:-${PROJECT_URL}}"
AX_SUBST(PROJECT_URL)
AX_SUBST(SOURCE_DOWNLOAD)
VENDOR=$((lsb_release -is 2>/dev/null || echo unknown) | tr ' ' '_')
@ -365,12 +374,13 @@ AC_DEFUN([AX_USE_CXX], [
#### Begin: Appended by $0
%.app: %
-rm -r [\$][@]
\$(MAKE) DESTDIR=[\$][\$](pwd)/[\$][@]/tmp install
\$(MAKE) DESTDIR=[\$][\$](pwd)/tmp install
QTDIR="\${QTDIR}" \
QT_PLUGINS="\${QT_PLUGINS}" \
QT_PLUGIN_PATH="\${QT_PLUGIN_PATH}" \
\${top_builddir}/mac-create-app-bundle.sh \
[\$][@] [\$][<] [\$][\$](pwd)/[\$][@]/tmp\${prefix}
[\$][@] [\$][<] [\$][\$](pwd)/tmp[\$]{prefix}
-rm -rf tmp
maintainer-clean-cxx-targets:
-rm makefile.in
@ -1066,13 +1076,16 @@ AC_DEFUN([AX_CHECK_VALID_LD_FLAG], [
# Check if a package exists in the current distribution, if yes, require it
# in debian/control.in append @DEB_DEPEND_IFEXISTS@ to Build-Depends
# if you pass a list, it will require the first matching, if any matches
# - parameter:
# $1 = package name
# $1 = space separated list of package names
AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [
pkg="$1"
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}"
fi
for pkg in $1; do
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}"
break
fi
done
])
# require package in debian/control.in append @DEB_BUILD_DEPEND@ to Build-Depends
@ -1109,17 +1122,19 @@ AC_DEFUN([AX_DEB_RESOLVE], [
# Check if a package exists in the current distribution, if yes, require it
# in .spec.in append @RPM_DEPEND_IFEXISTS@ to Build-Depends
# if you pass a list, it will require the first matching, if any matches
# - parameter:
# $1 = package name
# $1 = space separated package names
AC_DEFUN([AX_RPM_DEPEND_IFEXISTS], [
pkg="$1"
if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}"
fi
for pkg in $1; do
if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}"
break
fi
done
])
# require package in .spec.in append @RPM_BUILD_DEPEND@ to Build-Depends
@ -1160,36 +1175,23 @@ AC_DEFUN([AX_RPM_RESOLVE], [
# Check if a package exists in the current distribution, if yes, require it
# in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends
# if you pass a list, it will require the first matching, if any matches
# - parameter:
# $1 = package name
# $1 = space separated list of package names
AC_DEFUN([AX_ALL_DEPEND_IFEXISTS], [
pkg="$1"
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}"
fi
if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}"
fi
AX_DEB_DEPEND_IFEXISTS([$1])
AX_RPM_DEPEND_IFEXISTS([$1])
])
# Check if a package exists in the current distribution, if yes, require it
# in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends
# if you pass a list, it will require the first matching, if any matches
# - parameter:
# $1 = package name
AC_DEFUN([AX_ALL_DEPEND_IFEXISTS_DEV], [
pkg="$1"
if test -n "$(apt-cache policy -q ${pkg}-dev 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}-dev"
fi
if (test -x /usr/bin/zypper && zypper search -x "$pkg"-devel 1>&2 > /dev/null) || \
(test -x /usr/bin/dnf && dnf list -q "$pkg"-devel 1>&2 > /dev/null) || \
(test -x /usr/bin/yum && yum list -q "$pkg"-devel 1>&2 > /dev/null) || \
(test -x /usr/sbin/urpmq && urpmq "$pkg"-devel 1>&2 > /dev/null); then
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}-devel"
fi
pkgs="$1"
AX_DEB_DEPEND_IFEXISTS([${pkgs// /-dev }-dev])
AX_RPM_DEPEND_IFEXISTS([${pkgs// /-devel }-devel])
])
# require package in .spec.in append @ALL_BUILD_DEPEND@ to Build-Depends

@ -1,7 +1,7 @@
#! /bin/bash
## @file
##
## $Id$
## $Id: bootstrap.sh 52 2015-11-03 15:38:21Z marc $
##
## $Date: 2004/08/31 15:57:19 $
## $Author: marc $
@ -41,7 +41,7 @@ while test $# -gt 0; do
(--no-vcs|-n) novcs=1;;
(--exclude-vcs|-x) shift; excludevcs+=("$1");;
(--version|-v)
echo "$Id$";
echo "$Id: bootstrap.sh 52 2015-11-03 15:38:21Z marc $";
exit;;
(--help|-h) less <<EOF
SYNOPSIS
@ -1352,7 +1352,7 @@ ${HEADER}AM_CPPFLAGS = -I\${top_srcdir}/src -I\${top_builddir}/src
AM_LDFLAGS = -L\${abs_top_builddir}/src/.libs
LDADD = -l${PACKAGE_NAME#lib}
exampledir = ${docdir}/examples
exampledir = \${docdir}/examples
example_DATA =
MAINTAINERCLEANFILES = makefile.in
@ -1605,8 +1605,8 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
-- @PACKAGER@ @BUILD_DATE@
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)"
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 | qt4-dev,"; fi)"
to debian/control.in <<EOF
Source: @PACKAGE_NAME@
Priority: extra
@ -1646,6 +1646,9 @@ usr/lib/lib*.so
usr/lib/pkgconfig/*
usr/lib/*.la
usr/share/doc/${PACKAGE_NAME}/html
$(if testtag AX_BUILD_EXAMPLES; then
echo usr/share/doc/${PACKAGE_NAME}/examples
fi)
EOF
to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF
${HEADER}%:
@ -1678,7 +1681,7 @@ fi)
$(if testtag AX_RPM_DEPEND; then echo "Requires: @RPM_DEPEND@"; fi)
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: which, pkgconfig, pandoc, gnupg, expect, ${VCSDEPENDS_RPM}make, automake, autoconf, rpm-build$(
BuildRequires: which, pkgconfig, gnupg, expect, ${VCSDEPENDS_RPM}make, automake, autoconf, rpm-build$(
if testtag AX_USE_CXX; then
echo -n ", binutils-devel, gcc-c++"
fi
@ -1700,13 +1703,17 @@ BuildRequires: lsb-release$(
echo -n ", libqt5-qtbase-devel, libqt5-qttools, libqt5-linguist-devel, libQt5WebKit5-devel libqt5-qtwebengine-devel libQt5WebKitWidgets-devel";
fi)
%else
%if 0%{?mageia}
BuildRequires: rpm-sign, lsb-release
$(
if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then
echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools-devel, qt5-qtwebkit-devel";
echo -n "BuildRequires: qtbase5-common-devel, qttools5, lib64qt5webkit-devel, lib64qt5webkitwidgets-devel";
fi)
%if 0%{?mageia}
BuildRequires: rpm-sign, lsb-release
%else
$(
if testtag AX_REQUIRE_QT || testtag AX_CHECK_QT; then
echo -n "BuildRequires: qt5-qtbase-devel, qt5-qttools-devel, qt5-qtwebkit-devel";
fi)
BuildRequires: rpm-sign, redhat-lsb
%global debug_package %{nil}
%endif
@ -1715,6 +1722,9 @@ $(
if testtag AX_USE_DOXYGEN; then cat <<EOS
%if ! 0%{?centos}
BuildRequires: mscgen
%if ! 0%{?mageia}
BuildRequires: pandoc
%endif
%endif
EOS
fi
@ -1766,7 +1776,7 @@ $(if testtag AX_USE_ETC; then
cat <<EOF2
%config
/etc/*
/etc
EOF2
fi)
@ -1875,6 +1885,7 @@ $(if test -e README.md -a ! -e README; then
cat <<EOF2
README: README.md
cp README.md README
CLEANFILES = README
EOF2

@ -248,16 +248,18 @@ case $mode in
docker exec ${DOCKER_ID} update-locale LANG=${LANG}
fi
OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends'
for f in 'libpam-systemd:amd64' 'policykit*' 'colord'; do
docker exec ${DOCKER_ID} bash -c "echo 'Package: $f' >> /etc/apt/preferences"
PREVENT='libpam-systemd policykit.* colord dconf-service'
for f in ${PREVENT}; do
docker exec ${DOCKER_ID} bash -c "echo 'Package: ${f}' >> /etc/apt/preferences"
docker exec ${DOCKER_ID} bash -c "echo 'Pin-Priority: -100' >> /etc/apt/preferences"
docker exec ${DOCKER_ID} bash -c "echo >> /etc/apt/preferences"
done
docker exec ${DOCKER_ID} apt-get update ${OPTIONS}
docker exec ${DOCKER_ID} apt-mark hold ${PREVENT}
docker exec ${DOCKER_ID} apt-get upgrade ${OPTIONS}
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} software-properties-common apt-transport-https dpkg-dev lsb-release wget || \
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} python-software-properties apt-transport-https dpkg-dev lsb-release wget;
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties software-properties-common apt-transport-https dpkg-dev lsb-release wget || \
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- software-properties-common apt-transport-https dpkg-dev lsb-release wget || \
docker exec ${DOCKER_ID} apt-get install ${OPTIONS} ${PREVENT// /- }- python-software-properties apt-transport-https dpkg-dev lsb-release wget;
for key in "${keys[@]}"; do
wget -O- "$key" \
| docker exec -i ${DOCKER_ID} apt-key add -
@ -265,9 +267,12 @@ case $mode in
for repo in "${repos[@]}"; do
ifthenelse "${repo}" "apt-add-repository 'ARG'"
done
docker exec ${DOCKER_ID} apt-get update ${OPTIONS}
for package in "${packages[@]}"; do
ifthenelse "${package}" "apt-get install ${OPTIONS} ARG"
ifthenelse "${package}" "apt-get install ${OPTIONS} ${PREVENT} ARG"
done
for command in "${commands[@]}"; do
ifthenelse "${command}" "ARG"
@ -294,11 +299,14 @@ EOF
LSB_RELEASE=/usr/bin/lsb_release
fi
docker exec ${DOCKER_ID} ${INSTALL_TOOL} rpm-build automake libtool subversion gcc-c++ pkgconfig wget $LSB_RELEASE
if docker exec ${DOCKER_ID} test -x /usr/bin/dnf; then
docker exec ${DOCKER_ID} dnf install -y 'dnf-command(config-manager)'
fi
i=0
for key in "${keys[@]}"; do
wget -Orpm-key "$key"
docker exec -i ${DOCKER_ID} wget -Orpm-key "$key"
docker exec -i ${DOCKER_ID} rpm --import rpm-key
rm rpm-key
docker exec -i ${DOCKER_ID} rm rpm-key
done
for repo in "${repos[@]}"; do
INSTALL_REPO=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper ar) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf config-manager --add-repo) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo wget -O/etc/yum.repos.d/additional$i.repo) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo false))

@ -1,31 +1,33 @@
Summary: @DESCRIPTION@
Name: @PACKAGE_NAME@
Version: @VERSION@
Release: @BUILD_NUMBER@%{?dist}
Release: @BUILD_NUMBER@.@DISTRO@
License: LGPL
Group: Applications/...
Group: @RPM_GROUP@
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gnupg, subversion, automake, autoconf, doxygen
%if 0%{?fedora} != 20
BuildRequires: graphviz
BuildRequires: which, pkgconfig, gnupg, expect, git, 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, libqt5-qtbase-devel, libqt5-qttools, libqt5-linguist-devel, libQt5WebKit5-devel libqt5-qtwebengine-devel libQt5WebKitWidgets-devel
%else
%if 0%{?mageia}
BuildRequires: rpm-sign, lsb-release
BuildRequires: qtbase5-common-devel, qttools5, lib64qt5webkit-devel, lib64qt5webkitwidgets-devel
%else
BuildRequires: qt5-qtbase-devel, qt5-qttools-devel, qt5-qtwebkit-devel
BuildRequires: rpm-sign, redhat-lsb
%global debug_package %{nil}
%endif
%if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version}
BuildRequires: pkgconfig, redhat-lsb
%if ! ( 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} )
%endif
%if ! 0%{?centos}
BuildRequires: mscgen
BuildRequires: qt5-qtbase-devel, qt5-qttools, qt5-qtwebkit-devel
%else
BuildRequires: qt-devel
%if ! 0%{?mageia}
BuildRequires: pandoc
%endif
%else%if 0%{?suse_version} || 0%{?sles_version}
BuildRequires: pkg-config, lsb-release
%if 0%{?suse_version} < 1200 || 0%{?sles_version} < 1200
BuildRequires: libqt4-devel, qt4-x11-tools, libQtWebKit-devel
%else
BuildRequires: libqt5-qtbase-devel, libqt5-qttools, libQt5WebKit5-devel
%endif
%endif%endif
%description
@README@
@ -50,9 +52,12 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
/usr/bin/*
/usr/bin
/usr/share/applications
/usr/share/@PACKAGE_NAME@
%doc
/usr/share/*
/usr/share/doc

@ -19,8 +19,8 @@ AX_USE_CXX
#AX_USE_LIBTOOL
#AX_USE_SCRIPTS
AX_USE_DOXYGEN
AX_USE_DEBIAN_PACKAGING
AX_USE_RPM_PACKAGING
AX_USE_DEBIAN_PACKAGING(web)
AX_USE_RPM_PACKAGING(Applications/Internet)
#AX_USE_CPPUNIT
#AX_BUILD_EXAMPLES
#AX_BUILD_HTML

@ -7,7 +7,7 @@
## Parameters:
## $1: name of the app-target
## $2: name of the project
## $3: installation source
## $3: package installation target
##
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
@ -16,31 +16,33 @@ if test "$(uname -s)" != "Darwin"; then
echo "**** ERROR: run on Mac OS-X: $0"
exit 1
fi
test -n "$1"
test -n "$2"
test -d "$3"
target="$(pwd)/${1}/Contents/MacOS"
project=${2:-$(sed -n 's/ *m4_define *( *x_package_name, *\(.*\) *).*/\1/p' $(pwd)/configure.ac)}
apptarget=${1:-${project}.app}
sources=${3:-$(pwd)/tmp}
! test -e "$apptarget" || rm -rf "$apptarget"
test -n "$project"
test -d "$sources"
target="$(pwd)/${apptarget}/Contents/MacOS"
echo "Creating $apptarget for $project from $sources"
# Step 1: create and fill app directory structure
mkdir -p ${1}/Contents/{Resources,MacOS}
! test -d ${3}/bin || \
find ${3}/bin -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \;
executablefile=$(ls -1 ${1}/Contents/MacOS/ | head -1)
! test -d ${3}/lib || \
find ${3}/lib -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/MacOS/ \;
! test -d ${3}/share/${2} || \
find ${3}/share/${2} -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \;
! test -d ${3}/share/${2} || rmdir ${3}/share/${2}
! test -d ${3}/share || \
find ${3}/share -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \;
! test -d ${3}/bin || rmdir ${3}/bin
! test -d ${3}/lib || rmdir ${3}/lib
! test -d ${3}/share || rmdir ${3}/share
! test -d ${3} || \
find ${3} -mindepth 1 -maxdepth 1 -exec mv {} ${1}/Contents/Resources/ \;
! test -d ${3}/include || rm -r ${3}/include
! test -d ${3} || rmdir ${3}
! test -d ${1}/tmp || rm -r ${1}/tmp
mkdir -p ${apptarget}/Contents/{Resources,MacOS}
! test -d ${sources}/bin || \
find ${sources}/bin -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \;
! test -d ${sources}/scripts || \
find ${sources}/scripts -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \;
executablefile=${apptarget}/Contents/MacOS/${project}
test -x $executablefile || executablefile=$(ls -1 ${apptarget}/Contents/MacOS/ | head -1)
! test -d ${sources}/lib || \
find ${sources}/lib -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/MacOS/ \;
! test -d ${sources}/share/${project} || \
find ${sources}/share/${project} -mindepth 1 -maxdepth 1 -exec cp -a {} ${apptarget}/Contents/Resources/ \;
! test -d ${sources}/share || \
find ${sources}/share -mindepth 1 -maxdepth 1 -name ${project} -prune -o -exec cp -a {} ${apptarget}/Contents/Resources/ \;
! test -d ${sources} || \
find ${sources} -mindepth 1 -maxdepth 1 -name share -o -name bin -o -name lib -o -name scripts -prune -o -exec cp -a {} ${apptarget}/Contents/Resources/ \;
# Step 2: copy qt plugins, if necessary
for f in ${QT_PLUGINS}; do
@ -57,7 +59,7 @@ while [ $found -ne 0 ]; do
cd "${target}"
for file in $(find . -type f); do
for lib in $(otool -L ${file} | tail -n +2 \
| egrep '/opt/local/|'"${HOME}" \
| egrep '/usr/local/|/opt/local/|'"${HOME}" \
| grep -v $file | awk '{print $1}'); do
found=1
test -f ${lib##*/} \
@ -79,23 +81,23 @@ if test -n "${QTDIR}"; then
MENU_NIB=$(find ${QTDIR} -name .svn -o -name .git -prune -o -name qt_menu.nib -print \
| head -1)
if test -e "${MENU_NIB}"; then
rsync -r "${MENU_NIB}" ${1}/Contents/Resources/
test -d ${1}/Contents/Resources/qt_menu.nib
rsync -r "${MENU_NIB}" ${apptarget}/Contents/Resources/
test -d ${apptarget}/Contents/Resources/qt_menu.nib
fi
fi
# Step 5: copy or create info.plist
infoplist=$(find ${1}/Contents/Resources -name Info.plist)
infoplist=$(find ${apptarget}/Contents/Resources -name Info.plist)
if test -f "${infoplist}"; then
mv "${infoplist}" ${1}/Contents/Info.plist
cp -a "${infoplist}" ${apptarget}/Contents/Info.plist
else
cat > ${1}/Contents/Info.plist <<EOF
cat > ${apptarget}/Contents/Info.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>${2}</string>
<string>${project}</string>
<key>CFBundleExecutable</key>
<string>${executablefile##/}</string>
</dict>

@ -2,7 +2,7 @@
##
## This file has been added:
## - by bootstrap.sh
## - on Wed, 04 April 2018 14:27:37 +0200
## - on Fri, 10 August 2018 16:46:55 +0200
## Feel free to change it or even remove and rebuild it, up to your needs
##
## 1 2 3 4 5 6 7 8
@ -21,6 +21,10 @@ dist_noinst_DATA = ax_check_qt.m4 bootstrap.sh \
mac-create-app-bundle.sh resolve-debbuilddeps.sh \
dependency-graph.sh template.sh \
sql-to-dot.sed
dist_doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog
dist_doc_DATA = AUTHORS NEWS README.md COPYING INSTALL ChangeLog
README: README.md
cp README.md README
CLEANFILES = README
MAINTAINERCLEANFILES = makefile.in

@ -24,7 +24,7 @@ else
fi
function install() {
if ${SUDO} apt-get -y install $*; then
if ${SUDO} apt-get install -y --force-yes --no-install-suggests --no-install-recommends $*; then
return 0
else
return 1

@ -97,12 +97,12 @@ 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')
if test -n "${FILES}"; then
if test -n "${FILES}${DEPS}"; then
schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} ${FILES} ${DEPS}
fi
else
FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p')
if test -n "${FILES}"; then
if test -n "${FILES}${DEPS}"; then
${INSTALL_TOOL} ${FILES} ${DEPS}
fi
fi

Loading…
Cancel
Save