some build environment updates

master
Marc Wäckerlin 9 years ago
parent 8afec7dd28
commit 124b097675
  1. 10
      ax_init_standard_project.m4
  2. 124
      bootstrap.sh
  3. 5
      configure.ac
  4. 1
      debian/.dirs
  5. 3
      debian/.install
  6. 4
      debian/control.in
  7. 2
      debian/rules
  8. 5
      debian/webtester.install

@ -5,17 +5,17 @@
# define least version number from subversion's revision number:
# it is taken modulo 256 due to a bug on Apple's MacOSX
m4_define(x_least, m4_esyscmd_s(
LEAST="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
m4_define(x_version, m4_esyscmd_s(
SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
for path in . .. ../..; do
if svn info $path 2>&1 > /dev/null; then
# Mac does not support LEAST > 255
LEAST=$(($(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')%256))
SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
(cd $path && svn2cl)
break;
fi
done
echo $ECHO_N $LEAST
# Mac does not support LEAST > 255
echo $ECHO_N x_major.$((x_minor+$SVN_REVISION/256)).$(($SVN_REVISION%256))
))
## bugreport mail address is taken from <user@host> in first line of AUTHORS

@ -36,27 +36,49 @@ OPTIONS
DESCRIPTION
Initializes your build environment, as far as neccessary. Reads your used features from configure.ac, if that file exists, or creates a configure.ac. Automatically copies or creates all required template files.
From your new and empty project's subversion path, call $0 to initialize your build environment.
Before you call ${MY_NAME} the very first time, edit ${0#/*}/AUTHORS and replace it with your name (or the authors of your project, one name each line, main developper and copyright holder on the first line).
The first call to ${MY_NAME} should be something like ../bootstrap-build-environment/${MY_NAME} and not ./${MY_NAME}. Actually, you called $0.
In the way you called ${MY_NAME}, it has detected ${DEFAULT_PROJECT_NAME} as the project name for your project in ${PROJECT_PATH}. In the first run, you should call ${MY_NAME} from a checked out the bootstrap-build-environment from https://dev.marc.waeckerlin.org/, and the path from where you call ${MY_NAME} (which is actually ${PROJECT_PATH}) should be the path to your newly created project. Please note that your project must be a checked out subversion repository, since this build environment relies on subversion.
Example for an initial run, where your new projet is stored in subversion on svn:/path/to/your/new-project:
Initializes your build environment, as far as neccessary. Reads your
used features from configure.ac, if that file exists, or creates a
configure.ac. Automatically copies or creates all required template
files.
From your new and empty project's subversion path, call $0 to
initialize your build environment.
Before you call ${MY_NAME} the very first time, edit ${0#/*}/AUTHORS
and replace it with your name (or the authors of your project, one
name each line, main developper and copyright holder on the first
line).
The first call to ${MY_NAME} should be something like
../bootstrap-build-environment/${MY_NAME} and not
./${MY_NAME}. Actually, you called $0.
In the way you called ${MY_NAME}, it has detected
${DEFAULT_PROJECT_NAME} as the project name for your project in
${PROJECT_PATH}. In the first run, you should call ${MY_NAME} from a
checked out the bootstrap-build-environment from
https://dev.marc.waeckerlin.org/, and the path from where you call
${MY_NAME} (which is actually ${PROJECT_PATH}) should be the path to
your newly created project. Please note that your project must be a
checked out subversion repository, since this build environment
relies on subversion.
Example for an initial run, where your new projet is stored in
subversion on svn:/path/to/your/new-project:
cd ~/svn
svn co https://dev.marc.waeckerlin.org/svn/bootstrap-build-environment/trunk bootstrap-build-environment
svn co https://dev.marc.waeckerlin.org/svn/bootstrap-build-environment/trunk \\
bootstrap-build-environment
svn co svn:/path/to/your/new-project/trunk new-project
cd new-project
../bootstrap-build-environment/bootstrap.sh
RUNNING
If you run ${MY_NAME}, it first generates the necessary files (see below), then first runs make distclean if a makefile exists. After this it calles aclocal, libtoolize, automake, autoconf and optionally ./configure.
If you run ${MY_NAME}, it first generates the necessary files (see
below), then first runs make distclean if a makefile exists. After
this it calles aclocal, libtoolize, automake, autoconf and
optionally ./configure.
GENERATED FILES
@ -80,17 +102,21 @@ GENERATED FILES
* debian/docs - if you enabled AX_USE_DEBIAN_PACKAGING
* debian/${DEFAULT_PROJECT_NAME}.install - if you enabled AX_USE_DEBIAN_PACKAGING
* debian/${DEFAULT_PROJECT_NAME}.dirs - if you enabled AX_USE_DEBIAN_PACKAGING
* debian/${DEFAULT_PROJECT_NAME}-dev.install - if you enabled AX_USE_DEBIAN_PACKAGING and AX_USE_LIBTOOL
* debian/${DEFAULT_PROJECT_NAME}-dev.dirs - if you enabled AX_USE_DEBIAN_PACKAGING and AX_USE_LIBTOOL
* debian/${DEFAULT_PROJECT_NAME}-dev.install - if you enabled AX_USE_DEBIAN_PACKAGING
* debian/${DEFAULT_PROJECT_NAME}-dev.dirs - if you enabled AX_USE_DEBIAN_PACKAGING
* debian/rules - if you enabled AX_USE_DEBIAN_PACKAGING
* debian/compat - if you enabled AX_USE_DEBIAN_PACKAGING
* src/${DEFAULT_PROJECT_NAME}.pc.in - if you enabled AX_USE_LIBTOOL
To rebuild any of these files, just remove it using "svn rm <filename>" and run ${MY_NAME} again.
To rebuild any of these files, just remove it using "svn rm <filename>"
and run ${MY_NAME} again.
FILES TO EDIT
After creation of the files, you can edit them according to your needs. Please don't forget to redo your edits after rebuilding a file. Most files don't even need to be edited, they work out of the box.
After creation of the files, you can edit them according to your
needs. Please don't forget to redo your edits after rebuilding a
file. Most files don't even need to be edited, they work out of the
box.
The following files normally require editing:
* AUTHORS
@ -102,11 +128,13 @@ FILES TO EDIT
FILE DEPENDENCIES
You should rebuild (remove and run (see above) the files, whenever you change the configuration a dependent, i.e.:
You should rebuild (remove and run (see above) the files, whenever
you change the configuration a dependent, i.e.:
* test/makefile.am depends on AX_USE_LIBTOOL
* doc/doxyfile.in depends on AX_BUILD_EXAMPLES
* debian/control.in depends on AX_USE_DOXYGEN, AX_USE_CPPUNIT, AX_CXX_QT, AX_CXX_CHECK_QT, AX_USE_LIBTOOL
* debian/control.in depends on AX_USE_DOXYGEN, AX_USE_CPPUNIT,
AX_CXX_QT, AX_CXX_CHECK_QT, AX_USE_LIBTOOL
* debian/${DEFAULT_PROJECT_NAME}.install depends on AX_USE_LIBTOOL
* debian/${DEFAULT_PROJECT_NAME}.dirs depends on AX_USE_LIBTOOL
* debian/${DEFAULT_PROJECT_NAME}-dev.install depends on AX_USE_LIBTOOL
@ -114,22 +142,36 @@ FILE DEPENDENCIES
FILES
* AUTHORS: First line is the main author and used in Debian and RPM packaging, so there must be a GPG key that matches to this line.
* README: First line is a short description of your project, then an empty line must follow. All remaining lines are a long description of your project. this information is copied, e.g. in Debian or RPM packages. In C++ <ou can access the readme by calling ${DEFAULT_PROJECT_NAME}::description().
* configure.ac: This file becomes very short and simple. You provide the project name, the major and minor version. The least version number is automatically taken from subversion's revision, so every checkin automatically increments the least version number. The following macros are supported:
** Enable C++: AX_USE_CXX
** Enable LibTool library creation: AX_USE_LIBTOOL
** Enable Doxygen documentation generation: AX_USE_DOXYGEN
** Enable debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING
** Not yet implemented: AX_USE_RPM_PACKAGING
** Enable C++ testing using CppUnit: AX_USE_CPPUNIT
** Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES
** Check for C++11 support: AX_CXX_COMPILE_STDCXX_11 (see ax_cxx_compile_stdcxx_11.m4)
** Require a QT module: AX_REQUIRE_QT (see ax_check_qt.m4)
** Optionally use a QT module: AX_CHECK_QT (see ax_check_qt.m4)
** Require a module: AX_PKG_REQUIRE (see ax_init_standard_project.m4)
** Check for an optional module: AX_PKG_CHECK (see ax_init_standard_project.m4)
* ChangeLog: Your changelog is automatically maintained from subversion history, using svn2cl. You don't need to care about.
* AUTHORS: First line is the main author and used in Debian and RPM
packaging, so there must be a GPG key that matches
to this line.
* README: First line is a short description of your project, then an
empty line must follow. All remaining lines are a
long description of your project. this information
is copied, e.g. in Debian or RPM packages. In C++
<ou can access the readme by calling
${DEFAULT_PROJECT_NAME}::description().
* ChangeLog: Your changelog is automatically maintained from
subversion history, using svn2cl. You don't need to
care about.
* configure.ac: This file becomes very short and simple. You provide
the project name, the major and minor version. The
least version number is automatically taken from
subversion's revision, so every checkin
automatically increments the least version
number. The following macros are supported:
* Enable C++: AX_USE_CXX
* Enable LibTool library creation: AX_USE_LIBTOOL
* Enable Doxygen documentation generation: AX_USE_DOXYGEN
* Enable debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING
* Not yet implemented: AX_USE_RPM_PACKAGING
* Enable C++ testing using CppUnit: AX_USE_CPPUNIT
* Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES
* Check for C++11 support: AX_CXX_COMPILE_STDCXX_11 (see ax_cxx_compile_stdcxx_11.m4)
* Require a QT module: AX_REQUIRE_QT (see ax_check_qt.m4)
* Optionally use a QT module: AX_CHECK_QT (see ax_check_qt.m4)
* Require a module: AX_PKG_REQUIRE (see ax_init_standard_project.m4)
* Check for an optional module: AX_PKG_CHECK (see ax_init_standard_project.m4)
EXAMPLES: src/makefile.am in a QT project
@ -138,7 +180,8 @@ EXAMPLES: src/makefile.am in a QT project
* ${DEFAULT_PROJECT_NAME}.cxx - C++ file containing main()
* ${DEFAULT_PROJECT_NAME}.ui - UI file
All rules are implicitely added, all you need to do is to add the following definitions, most lines are generic:
All rules are implicitely added, all you need to do is to add the
following definitions, most lines are generic:
bin_PROGRAMS = ${DEFAULT_PROJECT_NAME}
${DEFAULT_PROJECT_NAME}_MOCFILES = moc_${DEFAULT_PROJECT_NAME}.cxx
@ -206,11 +249,14 @@ checkdir() {
to() {
while test $# -gt 0; do
mode="u=rw,g=rw,o=r"
case "$1" in
(--condition) shift # test for a tag, abort if not set
if ! testtag "$1" configure.ac; then
return
fi;;
(--mode) shift # test for a tag, abort if not set
mode="$1";;
(*) break;;
esac
shift;
@ -232,6 +278,7 @@ to() {
else
echo -e " \e[32msuccess\e[0m"
fi
chmod $mode $1
run svn add "$1"
run svn propset svn:keywords "Id" "$1"
}
@ -445,8 +492,7 @@ Maintainer: @AUTHOR@
Build-Depends: debhelper, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CXX_CHECK_QT; then echo -n ", qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools"; fi)
Package: @PACKAGE_NAME@
$(if testtag AX_USE_LIBTOOL; then echo "Section: libs"; fi)
Architecture: any
$(if testtag AX_USE_LIBTOOL; then echo "Section: libs"; fi)Architecture: any
Depends: \${shlibs:Depends}, \${misc:Depends}
Description: @DESCRIPTION@
@README_DEB@
@ -488,7 +534,7 @@ usr/lib
usr/include
EOF
fi
to debian/rules <<EOF
to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF
${HEADER}%:
dh \$@
EOF

@ -6,11 +6,14 @@
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
# change this:
m4_define(x_package_name, webtester) # project's name
m4_define(x_major, 2) # project's major version
m4_define(x_minor, 0) # project's minor version
# never edit this block:
m4_include(ax_init_standard_project.m4)
AC_INIT(x_package_name, x_major.x_minor.x_least, x_bugreport, x_package_name)
AC_INIT(x_package_name, x_version, x_bugreport, x_package_name)
AM_INIT_AUTOMAKE([1.9 tar-pax])
AX_INIT_STANDARD_PROJECT

1
debian/.dirs vendored

@ -0,0 +1 @@
usr/lib

3
debian/.install vendored

@ -0,0 +1,3 @@
usr/bin/*
usr/lib/lib*.so.*
usr/share/doc//html

4
debian/control.in vendored

@ -1,11 +1,11 @@
Source: @PACKAGE_NAME@
Priority: extra
Maintainer: @AUTHOR@
Build-Depends: debhelper, pkg-config, autotools-dev, lsb-release , doxygen, graphviz, mrw-c++-dev, libxml-cxx-dev, qt5-qmake, libqt5webkit5-dev, qtchooser, qtquick1-5-dev, qtdeclarative5-dev, qtbase5-dev (>=5.2.0)
Build-Depends: debhelper, pkg-config, autotools-dev, lsb-release , doxygen, graphviz
Package: @PACKAGE_NAME@
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: @DESCRIPTION@
@README_DEB@

2
debian/rules vendored

@ -1,6 +1,6 @@
## @id $Id$
#
# This file has been added by bootstrap.sh on Mon, 04 May 2015 16:05:25 +0200
# This file has been added by bootstrap.sh on Tue, 05 May 2015 18:21:10 +0200
# Feel free to change it or even remove and rebuild it, up to your needs
#
## 1 2 3 4 5 6 7 8

@ -1,3 +1,2 @@
usr/bin/*
usr/lib/lib*.so.*
usr/share/doc/webtester/html
/usr/bin/webtester
/usr/share/doc/webtester/html

Loading…
Cancel
Save