Skip to content

Commit

Permalink
added build support for Ubuntu 8.04
Browse files Browse the repository at this point in the history
let Bareos build on Ubuntu 8.04.
However, QT-based programs (BAT, traymonitor) and Python plugins will not be build.
Note: also not part of Ubuntu 8.04, debhelper >= 7.0.50 is required for building.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
  • Loading branch information
joergsteffens authored and Marco van Wieringen committed Sep 5, 2014
1 parent b523193 commit 98a152e
Show file tree
Hide file tree
Showing 21 changed files with 552 additions and 422 deletions.
8 changes: 3 additions & 5 deletions Makefile.in
Expand Up @@ -158,33 +158,31 @@ Makefiles:
clean:
@for I in ${all_subdirs} ; \
do (cd $$I; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1); done
@(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
@$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
@$(RMF) examples/1 examples/2 examples/devices/1 examples/devices/2
@$(RMF) -r autom4te.cache
@find . -name ".#*" -exec $(RMF) {} \;
@cp debian/control.common debian/control

# clean for distribution
distclean:
@for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
@for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
@(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
@(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
@(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
@$(RMF) bareos fd Makefile startmysql stopmysql startit stopit btraceback
@$(RMF) bconsole gconsole
@$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
@$(RMF) working/* kerns-*
@$(RMF) -rf txt diff src/python src/testprogs
@$(RMF) -r txt diff src/python src/testprogs
@$(RMF) libtool
# remove files generated by configure
find . -type f -a -name "*.in" -a ! -name "control.in" | sed -e 's/.in$$//' | xargs $(RMF)

devclean:
@for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
@for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
@(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
@(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
@(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
@$(RMF) bareos fd Makefile startmysql stopmysql startit stopit btraceback
@$(RMF) bconsole gconsole
@$(RMF) *~ 1 2 3 core core.* config.guess console.log console.sum
Expand Down
55 changes: 27 additions & 28 deletions autoconf/configure.in
Expand Up @@ -380,17 +380,20 @@ AC_ARG_ENABLE(bat,
)

BAT_DIR=
DEBIAN_CONTROL_BAT=/dev/null
if test x$support_bat = xyes; then
abc=`$PKGCONFIG --atleast-version=4.6 QtGui`
pkg=$?
if test $pkg = 0; then
BAT_DIR=src/qt-console
DEBIAN_CONTROL_BAT=./debian/control.bareos-bat
else
AC_MSG_ERROR(Unable to find suitable Qt4 installation needed by bat)
fi
fi

AC_SUBST(BAT_DIR)
AC_SUBST_FILE(DEBIAN_CONTROL_BAT)

dnl -------------------------------------------
dnl tray-monitor (default off)
Expand All @@ -406,17 +409,20 @@ AC_ARG_ENABLE(traymonitor,
)

TRAY_MONITOR_DIR=
DEBIAN_CONTROL_TRAYMONITOR=/dev/null
if test x$support_traymonitor = xyes; then
abc=`$PKGCONFIG --atleast-version=4.6 QtGui`
pkg=$?
if test $pkg = 0; then
TRAY_MONITOR_DIR=src/qt-tray-monitor
DEBIAN_CONTROL_TRAYMONITOR=./debian/control.bareos-traymonitor
else
AC_MSG_ERROR(Unable to find suitable Qt4 installation needed by tray-monitor)
fi
fi

AC_SUBST(TRAY_MONITOR_DIR)
AC_SUBST_FILE(DEBIAN_CONTROL_TRAYMONITOR)


dnl -------------------------------------------
Expand Down Expand Up @@ -3530,14 +3536,34 @@ osx)
PFILES="${PFILES} \
platforms/osx/Makefile"
;;
debian)
debian|ubuntu|univention)
TAPEDRIVE="/dev/nst0"
PSCMD="ps -e -o pid,command"
DEBIAN_CONTROL_UNIVENTION_BAREOS=/dev/null
DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA=/dev/null
PFILES="${PFILES} \
debian/control \
platforms/debian/Makefile \
platforms/debian/bareos-fd \
platforms/debian/bareos-sd \
platforms/debian/bareos-dir"
case "$DISTNAME" in
ubuntu)
PFILES="${PFILES} \
platforms/ubuntu/Makefile \
platforms/ubuntu/bareos-fd \
platforms/ubuntu/bareos-sd \
platforms/ubuntu/bareos-dir"
;;
univention)
DEBIAN_CONTROL_UNIVENTION_BAREOS=./debian/control.univention-bareos
DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA=./debian/control.univention-bareos-schema
PFILES="${PFILES} \
platforms/univention/Makefile"
;;
esac
AC_SUBST_FILE(DEBIAN_CONTROL_UNIVENTION_BAREOS)
AC_SUBST_FILE(DEBIAN_CONTROL_UNIVENTION_BAREOS_SCHEMA)
;;
freebsd)
VER=`echo $DISTVER | cut -c 1`
Expand Down Expand Up @@ -3679,25 +3705,6 @@ suse)
platforms/suse/bareos-dir \
platforms/suse/bareos"
;;
ubuntu)
TAPEDRIVE="/dev/nst0"
PSCMD="ps -e -o pid,command"
PFILES="${PFILES} \
platforms/ubuntu/Makefile \
platforms/ubuntu/bareos-fd \
platforms/ubuntu/bareos-sd \
platforms/ubuntu/bareos-dir"
;;
univention)
TAPEDRIVE="/dev/nst0"
PSCMD="ps -e -o pid,command"
PFILES="${PFILES} \
platforms/univention/Makefile \
platforms/debian/Makefile \
platforms/debian/bareos-fd \
platforms/debian/bareos-sd \
platforms/debian/bareos-dir"
;;
unknown)
TAPEDRIVE="/dev/nst0"
;;
Expand Down Expand Up @@ -3921,14 +3928,6 @@ echo "Cleaning up"
echo " "
${MAKE:-make} clean

dnl for some Debian based distribution, e.g. Univention, there are additional packages to build
dnl must run after clean
cp ${BUILD_DIR}/debian/control.common ${BUILD_DIR}/debian/control
DEBIAN_CONTROL_ADDITIONAL=${BUILD_DIR}/platforms/$DISTNAME/debian/control.additional
if test -e "$DEBIAN_CONTROL_ADDITIONAL"; then
cat $DEBIAN_CONTROL_ADDITIONAL >> ${BUILD_DIR}/debian/control
fi

echo "
Configuration on `date`:

Expand Down
21 changes: 21 additions & 0 deletions debian/Makefile
@@ -0,0 +1,21 @@
#
# Makefile for preparations of Debian builds
#

all:
@install copyright.header copyright
@sed -r -e 's/^$$/./' -e 's/^[ ]*(.*)$$/ \1/' ../LICENSE >> copyright
@cat copyright.footer >> copyright

clean:
@rm -f *~ *.log
@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

devclean: clean

0 comments on commit 98a152e

Please sign in to comment.