Skip to content

Commit

Permalink
add configure option dynamic-debian-package-list
Browse files Browse the repository at this point in the history
When building packages for Debian,
the resulting packages are defined in the file debian/control.
This file must exist at the beginning of the build process.
As Bareos is build for different plattforms, the resulting packages differ.
Therefore configure can overwrite debian/control
so that is matches the configured options.
However, the Debian project does not allow this file to be changed.
Therefore we make this feature optional.
The configure default is to keep the static debian/control file.
When configure is used with the option
--enable-dynamic-debian-package-list
debian/control will be overwritten with the template debian/control.in.
  • Loading branch information
joergsteffens committed Nov 7, 2014
1 parent 38f3e01 commit 501bcb2
Show file tree
Hide file tree
Showing 6 changed files with 387 additions and 301 deletions.
28 changes: 25 additions & 3 deletions autoconf/configure.in
@@ -1,4 +1,4 @@
dnl

dnl Process this file with autoconf to produce a configure script.
dnl
dnl require a recent autoconf
Expand Down Expand Up @@ -844,6 +844,28 @@ AC_SUBST(CONS_LDFLAGS)
AC_SUBST(READLINE_SRC)

dnl End of readline/conio stuff

dnl -------------------------------------------
dnl dynamic-debian-package-list (default off)
dnl -------------------------------------------
AC_ARG_ENABLE(dynamic-debian-package-list,
AC_HELP_STRING([--enable-dynamic-debian-package-list], [generate debian/control depending on configured options @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
generate_debian_control=yes
fi
]
)

DEBIAN_CONTROL=
if test x$generate_debian_control = xyes; then
DEBIAN_CONTROL="debian/control"
fi
AC_SUBST(DEBIAN_CONTROL)




dnl -----------------------------------------------------------------------

dnl Minimal stuff for readline Makefile configuration
Expand Down Expand Up @@ -3892,7 +3914,7 @@ debian|ubuntu|univention)
PSCMD="ps -e -o pid,command"
DEBIAN_CONTROL_UNIVENTION_BAREOS=/dev/null
DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA=/dev/null
PFILES="${PFILES} \
PFILES="${PFILES} ${DEBIAN_CONTROL} \
debian/bareos-bat.install \
debian/bareos-bconsole.install \
debian/bareos-common.install \
Expand Down Expand Up @@ -3921,7 +3943,6 @@ debian|ubuntu|univention)
debian/bareos-storage.preinst \
debian/bareos-tools.install \
debian/bareos-traymonitor.install \
debian/control \
platforms/debian/Makefile \
platforms/debian/set_dbconfig_vars.sh"
case "$DISTNAME" in
Expand Down Expand Up @@ -4390,6 +4411,7 @@ Configuration on `date`:
Bareos version: ${BAREOS} ${VERSION} (${DATE})
Distribution: ${DISTNAME}
Source code location: ${srcdir}
Modify package list: ${DEBIAN_CONTROL}
Install binaries: ${bindir}
Install system binaries: ${sbindir}
Install libraries: ${libdir}
Expand Down
6 changes: 1 addition & 5 deletions debian/Makefile
Expand Up @@ -14,10 +14,6 @@ clean:
@rm -f -r tmp/*

distclean: clean
@find . -type f -a -name "*.in" | sed -e 's/.in$$//' | xargs rm -f
# control is generated during configure,
# however, for Debian builds a control file must be available before.
# Therefore create a link to control.dummy.
@ln -s control.dummy control
@find . -type f -a -name "*.in" -a ! -name "control.in" | sed -e 's/.in$$//' | xargs rm -f

devclean: clean
1 change: 0 additions & 1 deletion debian/control

This file was deleted.

0 comments on commit 501bcb2

Please sign in to comment.