build in docker tested

master
Marc Wäckerlin 9 years ago
parent e55205521d
commit 7dc2179629
  1. 12
      bootstrap.sh
  2. 15
      build-in-docker.sh
  3. 2
      configure.ac
  4. 2
      debian/control.in
  5. 15
      examples/makefile.am
  6. 1
      resolve-debbuilddeps.sh
  7. 60
      webtester.spec.in

@ -19,6 +19,7 @@ PROJECT_PATH=$(pwd)
DEFAULT_PROJECT_NAME=${PROJECT_PATH##*/}
configure=0
build=0
docker=0
buildtarget="distcheck"
overwrite=0
rebuild=0
@ -26,6 +27,7 @@ rebuildfiles=()
while test $# -gt 0; do
case "$1" in
(--configure|-c) configure=1;;
(--docker|-d) docker=1;;
(--build|-b) configure=1; build=1;;
(--target|-t) shift; configure=1; build=1; buildtarget="$1";;
(--overwrite|-o) overwrite=1;;
@ -42,6 +44,7 @@ SYNOPSIS
OPTIONS
--configure, -c call ./configure after initialization
--docker, -d build and run tests in a docker instance
--build, -b build, also call ./configure && make distcheck
--target, -t <target> same as -b, but specify target instead of distcheck
--overwrite, -o overwrite all basic files (bootstrap.sh, m4-macros)
@ -105,6 +108,7 @@ GENERATED FILES
* ax_check_qt.m4 - auxiliary macro definition file
* resolve-debbuilddeps.sh - script to install debian package dependencies
* resolve-rpmbuilddeps.sh - script to install RPM package dependencies
* build-in-docker.sh - script to build the project encapsulated in a docker container
* build-resource-file.sh - build resource.qrc file from a resource directory
* mac-create-app-bundle.sh - script to create apple mac os-x app-bundle
* AUTHORS - replace your name in AUTHORS before first run
@ -405,6 +409,7 @@ copy ax_cxx_compile_stdcxx_11.m4
copy ax_check_qt.m4
copy resolve-debbuilddeps.sh
copy resolve-rpmbuilddeps.sh
copy build-in-docker.sh
copy build-resource-file.sh
copy mac-create-app-bundle.sh
AUTHOR=$(gpg -K | sed -n 's,uid *,,p' | sort | head -1)
@ -814,7 +819,7 @@ 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)"
BUILD_DEPENDS="debhelper, subversion, svn2cl, 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
@ -1024,3 +1029,8 @@ fi
if test "$build" -eq 1; then
make $buildtarget
fi
#### Build In Docker If User Requires ####
if test "$docker" -eq 1; then
./build-in-docker.sh
fi

@ -0,0 +1,15 @@
#! /bin/bash -ex
# build and test everything in a fresh docker installation
DOCKER_ID=$(docker run -d -v $(pwd):/workdir -w /workdir ubuntu sleep infinity)
trap "docker rm -f ${DOCKER_ID}" INT TERM EXIT
docker exec ${DOCKER_ID} apt-get install -y software-properties-common apt-transport-https dpkg-dev
docker exec ${DOCKER_ID} apt-add-repository universe
docker exec ${DOCKER_ID} apt-add-repository https://dev.marc.waeckerlin.org/repository
wget -O- https://dev.marc.waeckerlin.org/repository/PublicKey \
| docker exec -i ${DOCKER_ID} apt-key add -
docker exec ${DOCKER_ID} apt-get update
docker exec ${DOCKER_ID} ./resolve-debbuilddeps.sh
docker exec -u $(id -u) ${DOCKER_ID} svn upgrade || true
docker exec -u $(id -u) ${DOCKER_ID} ./bootstrap.sh -t "all check distcheck"

@ -23,7 +23,7 @@ AX_USE_CXX
AX_USE_SCRIPTS
AX_USE_DOXYGEN
AX_USE_DEBIAN_PACKAGING
#AX_USE_RPM_PACKAGING
AX_USE_RPM_PACKAGING
#AX_USE_CPPUNIT
AX_BUILD_TEST
#AX_BUILD_EXAMPLES

2
debian/control.in vendored

@ -1,7 +1,7 @@
Source: @PACKAGE_NAME@
Priority: extra
Maintainer: @AUTHOR@
Build-Depends: debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release , doxygen, graphviz, mscgen, qtbase5-dev, qtbase5-dev-tools, qttools5-dev, qt5-default, libqt5webkit5-dev, libqt5svg5-dev, xvfb
Build-Depends: debhelper, subversion, svn2cl, pkg-config, automake, libtool, autotools-dev, lsb-release , doxygen, graphviz, mscgen, qtbase5-dev, qtbase5-dev-tools, qttools5-dev, qt5-default, libqt5webkit5-dev, libqt5svg5-dev, xvfb, mrw-c++-dev, libxml-cxx-dev
Package: @PACKAGE_NAME@
Section: web

@ -1,15 +0,0 @@
## @id $Id$
##
## This file has been added:
## - by bootstrap.sh
## - on Wed, 04 November 2015 08:51:26 +0100
## Feel free to change it or even remove and rebuild it, up to your needs
##
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
AM_CPPFLAGS = -I${top_srcdir}/src -I${top_builddir}/src
AM_LDFLAGS = -L${abs_top_builddir}/src/.libs
LDADD = -lwebtester
MAINTAINERCLEANFILES = makefile.in

@ -22,6 +22,7 @@ function install() {
return 0
fi
fi
return 1
}
TO_INSTALL=

@ -0,0 +1,60 @@
Summary: @DESCRIPTION@
Name: @PACKAGE_NAME@
Version: @VERSION@
Release: @BUILD_NUMBER@%{?dist}
License: LGPL
Group: Applications/...
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gnupg, subversion, automake, autoconf, doxygen, xvfb, mrw-c++-dev, libxml-cxx-dev
%if 0%{?fedora} != 20
BuildRequires: graphviz
%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} )
BuildRequires: mscgen
BuildRequires: qt5-qtbase-devel, qt5-qttools, qt5-qtwebkit-devel
%else
BuildRequires: qt-devel
%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@
%prep
%setup -q
./configure --prefix=/usr \
--sysconfdir=/etc \
--docdir=/usr/share/doc/packages/@PACKAGE_NAME@ \
--libdir=/usr/%_lib
%build
make
%install
DESTDIR=$RPM_BUILD_ROOT make install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
/usr/bin/*
%doc
/usr/share/*
%changelog
Loading…
Cancel
Save