some build environment updates
This commit is contained in:
@@ -5,17 +5,17 @@
|
|||||||
|
|
||||||
# define least version number from subversion's revision number:
|
# define least version number from subversion's revision number:
|
||||||
# it is taken modulo 256 due to a bug on Apple's MacOSX
|
# it is taken modulo 256 due to a bug on Apple's MacOSX
|
||||||
m4_define(x_least, m4_esyscmd_s(
|
m4_define(x_version, m4_esyscmd_s(
|
||||||
LEAST="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
|
SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
|
||||||
for path in . .. ../..; do
|
for path in . .. ../..; do
|
||||||
if svn info $path 2>&1 > /dev/null; then
|
if svn info $path 2>&1 > /dev/null; then
|
||||||
# Mac does not support LEAST > 255
|
SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
|
||||||
LEAST=$(($(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')%256))
|
|
||||||
(cd $path && svn2cl)
|
(cd $path && svn2cl)
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
done
|
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
|
## bugreport mail address is taken from <user@host> in first line of AUTHORS
|
||||||
|
114
bootstrap.sh
114
bootstrap.sh
@@ -36,27 +36,49 @@ OPTIONS
|
|||||||
|
|
||||||
DESCRIPTION
|
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.
|
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.
|
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).
|
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.
|
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.
|
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:
|
Example for an initial run, where your new projet is stored in
|
||||||
|
subversion on svn:/path/to/your/new-project:
|
||||||
|
|
||||||
cd ~/svn
|
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
|
svn co svn:/path/to/your/new-project/trunk new-project
|
||||||
cd new-project
|
cd new-project
|
||||||
../bootstrap-build-environment/bootstrap.sh
|
../bootstrap-build-environment/bootstrap.sh
|
||||||
|
|
||||||
RUNNING
|
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
|
GENERATED FILES
|
||||||
|
|
||||||
@@ -80,17 +102,21 @@ GENERATED FILES
|
|||||||
* debian/docs - if you enabled AX_USE_DEBIAN_PACKAGING
|
* 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}.install - if you enabled AX_USE_DEBIAN_PACKAGING
|
||||||
* debian/${DEFAULT_PROJECT_NAME}.dirs - 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.install - if you enabled AX_USE_DEBIAN_PACKAGING
|
||||||
* debian/${DEFAULT_PROJECT_NAME}-dev.dirs - if you enabled AX_USE_DEBIAN_PACKAGING and AX_USE_LIBTOOL
|
* debian/${DEFAULT_PROJECT_NAME}-dev.dirs - if you enabled AX_USE_DEBIAN_PACKAGING
|
||||||
* debian/rules - 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
|
* debian/compat - if you enabled AX_USE_DEBIAN_PACKAGING
|
||||||
* src/${DEFAULT_PROJECT_NAME}.pc.in - if you enabled AX_USE_LIBTOOL
|
* 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
|
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:
|
The following files normally require editing:
|
||||||
* AUTHORS
|
* AUTHORS
|
||||||
@@ -102,11 +128,13 @@ FILES TO EDIT
|
|||||||
|
|
||||||
FILE DEPENDENCIES
|
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
|
* test/makefile.am depends on AX_USE_LIBTOOL
|
||||||
* doc/doxyfile.in depends on AX_BUILD_EXAMPLES
|
* 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}.install depends on AX_USE_LIBTOOL
|
||||||
* debian/${DEFAULT_PROJECT_NAME}.dirs 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
|
* debian/${DEFAULT_PROJECT_NAME}-dev.install depends on AX_USE_LIBTOOL
|
||||||
@@ -114,22 +142,36 @@ FILE DEPENDENCIES
|
|||||||
|
|
||||||
FILES
|
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.
|
* AUTHORS: First line is the main author and used in Debian and RPM
|
||||||
* 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().
|
packaging, so there must be a GPG key that matches
|
||||||
* 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:
|
to this line.
|
||||||
** Enable C++: AX_USE_CXX
|
* README: First line is a short description of your project, then an
|
||||||
** Enable LibTool library creation: AX_USE_LIBTOOL
|
empty line must follow. All remaining lines are a
|
||||||
** Enable Doxygen documentation generation: AX_USE_DOXYGEN
|
long description of your project. this information
|
||||||
** Enable debian packaging by calling "make deb": AX_USE_DEBIAN_PACKAGING
|
is copied, e.g. in Debian or RPM packages. In C++
|
||||||
** Not yet implemented: AX_USE_RPM_PACKAGING
|
<ou can access the readme by calling
|
||||||
** Enable C++ testing using CppUnit: AX_USE_CPPUNIT
|
${DEFAULT_PROJECT_NAME}::description().
|
||||||
** Enable C++ examples, i.e. for libraries: AX_BUILD_EXAMPLES
|
* ChangeLog: Your changelog is automatically maintained from
|
||||||
** Check for C++11 support: AX_CXX_COMPILE_STDCXX_11 (see ax_cxx_compile_stdcxx_11.m4)
|
subversion history, using svn2cl. You don't need to
|
||||||
** Require a QT module: AX_REQUIRE_QT (see ax_check_qt.m4)
|
care about.
|
||||||
** Optionally use a QT module: AX_CHECK_QT (see ax_check_qt.m4)
|
* configure.ac: This file becomes very short and simple. You provide
|
||||||
** Require a module: AX_PKG_REQUIRE (see ax_init_standard_project.m4)
|
the project name, the major and minor version. The
|
||||||
** Check for an optional module: AX_PKG_CHECK (see ax_init_standard_project.m4)
|
least version number is automatically taken from
|
||||||
* ChangeLog: Your changelog is automatically maintained from subversion history, using svn2cl. You don't need to care about.
|
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
|
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}.cxx - C++ file containing main()
|
||||||
* ${DEFAULT_PROJECT_NAME}.ui - UI file
|
* ${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}
|
bin_PROGRAMS = ${DEFAULT_PROJECT_NAME}
|
||||||
${DEFAULT_PROJECT_NAME}_MOCFILES = moc_${DEFAULT_PROJECT_NAME}.cxx
|
${DEFAULT_PROJECT_NAME}_MOCFILES = moc_${DEFAULT_PROJECT_NAME}.cxx
|
||||||
@@ -206,11 +249,14 @@ checkdir() {
|
|||||||
|
|
||||||
to() {
|
to() {
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
|
mode="u=rw,g=rw,o=r"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
(--condition) shift # test for a tag, abort if not set
|
(--condition) shift # test for a tag, abort if not set
|
||||||
if ! testtag "$1" configure.ac; then
|
if ! testtag "$1" configure.ac; then
|
||||||
return
|
return
|
||||||
fi;;
|
fi;;
|
||||||
|
(--mode) shift # test for a tag, abort if not set
|
||||||
|
mode="$1";;
|
||||||
(*) break;;
|
(*) break;;
|
||||||
esac
|
esac
|
||||||
shift;
|
shift;
|
||||||
@@ -232,6 +278,7 @@ to() {
|
|||||||
else
|
else
|
||||||
echo -e " \e[32msuccess\e[0m"
|
echo -e " \e[32msuccess\e[0m"
|
||||||
fi
|
fi
|
||||||
|
chmod $mode $1
|
||||||
run svn add "$1"
|
run svn add "$1"
|
||||||
run svn propset svn:keywords "Id" "$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)
|
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@
|
Package: @PACKAGE_NAME@
|
||||||
$(if testtag AX_USE_LIBTOOL; then echo "Section: libs"; fi)
|
$(if testtag AX_USE_LIBTOOL; then echo "Section: libs"; fi)Architecture: any
|
||||||
Architecture: any
|
|
||||||
Depends: \${shlibs:Depends}, \${misc:Depends}
|
Depends: \${shlibs:Depends}, \${misc:Depends}
|
||||||
Description: @DESCRIPTION@
|
Description: @DESCRIPTION@
|
||||||
@README_DEB@
|
@README_DEB@
|
||||||
@@ -488,7 +534,7 @@ usr/lib
|
|||||||
usr/include
|
usr/include
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
to debian/rules <<EOF
|
to --mode "u=rwx,g=rwx,o=rx" debian/rules <<EOF
|
||||||
${HEADER}%:
|
${HEADER}%:
|
||||||
dh \$@
|
dh \$@
|
||||||
EOF
|
EOF
|
||||||
|
@@ -6,11 +6,14 @@
|
|||||||
## 1 2 3 4 5 6 7 8
|
## 1 2 3 4 5 6 7 8
|
||||||
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||||
|
|
||||||
|
# change this:
|
||||||
m4_define(x_package_name, webtester) # project's name
|
m4_define(x_package_name, webtester) # project's name
|
||||||
m4_define(x_major, 2) # project's major version
|
m4_define(x_major, 2) # project's major version
|
||||||
m4_define(x_minor, 0) # project's minor version
|
m4_define(x_minor, 0) # project's minor version
|
||||||
|
|
||||||
|
# never edit this block:
|
||||||
m4_include(ax_init_standard_project.m4)
|
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])
|
AM_INIT_AUTOMAKE([1.9 tar-pax])
|
||||||
AX_INIT_STANDARD_PROJECT
|
AX_INIT_STANDARD_PROJECT
|
||||||
|
|
||||||
|
1
debian/.dirs
vendored
Normal file
1
debian/.dirs
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
usr/lib
|
3
debian/.install
vendored
Normal file
3
debian/.install
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
usr/bin/*
|
||||||
|
usr/lib/lib*.so.*
|
||||||
|
usr/share/doc//html
|
4
debian/control.in
vendored
4
debian/control.in
vendored
@@ -1,11 +1,11 @@
|
|||||||
Source: @PACKAGE_NAME@
|
Source: @PACKAGE_NAME@
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Maintainer: @AUTHOR@
|
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@
|
Package: @PACKAGE_NAME@
|
||||||
|
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
Description: @DESCRIPTION@
|
Description: @DESCRIPTION@
|
||||||
@README_DEB@
|
@README_DEB@
|
||||||
|
|
||||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@@ -1,6 +1,6 @@
|
|||||||
## @id $Id$
|
## @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
|
# Feel free to change it or even remove and rebuild it, up to your needs
|
||||||
#
|
#
|
||||||
## 1 2 3 4 5 6 7 8
|
## 1 2 3 4 5 6 7 8
|
||||||
|
5
debian/webtester.install
vendored
5
debian/webtester.install
vendored
@@ -1,3 +1,2 @@
|
|||||||
usr/bin/*
|
/usr/bin/webtester
|
||||||
usr/lib/lib*.so.*
|
/usr/share/doc/webtester/html
|
||||||
usr/share/doc/webtester/html
|
|
||||||
|
Reference in New Issue
Block a user