[Box Backup-commit] COMMIT r2009 - in box/james/FreeBSD: . files

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sun Dec 16 16:48:31 GMT 2007


Author: jamesog
Date: 2007-12-16 16:48:28 +0000 (Sun, 16 Dec 2007)
New Revision: 2009

Added:
   box/james/FreeBSD/files/patch-configdir
Removed:
   box/james/FreeBSD/files/patch-configure.ac
   box/james/FreeBSD/files/patch-lib-common-BoxPortsAndFiles.h
Modified:
   box/james/FreeBSD/Makefile
Log:
Update the FreeBSD port skeleton for pre-0.11:

 * Remove all the perl hacks; these have been committed to trunk
 * Update the build targets to the new build-backup-(client|server) targets
 * Enable BDB by default
 * Remove the g++ fix as Chris has fixed this in trunk
 * Update the configdir patch to make autoconf generate a macro instead of
   manually patching with sed



Modified: box/james/FreeBSD/Makefile
===================================================================
--- box/james/FreeBSD/Makefile	2007-12-16 12:57:21 UTC (rev 2008)
+++ box/james/FreeBSD/Makefile	2007-12-16 16:48:28 UTC (rev 2009)
@@ -27,12 +27,17 @@
 
 OPTIONS=	CLIENT "Install the bbackupd client" On \
 		SERVER "Install the bbstored server" On \
+		BDB "Enable Berkeley DB" On \
 		GNUREADLINE "Enable the use of GNU readline" Off \
 		TESTS  "Allows use of a 'test' target to run tests" Off
 
 .include <bsd.port.pre.mk>
 
-TARGETOS!=	${ECHO_CMD} `${UNAME} -s``${UNAME} -r | ${SED} -e 's/[-(].*//'` | ${TR} A-Z a-z
+.if defined(WITH_BDB)
+USE_BDB=	42+
+CONFIGURE_ARGS+=--with-bdb-lib=${BDB_LIB_DIR} \
+		--with-bdb-headers=${BDB_INCLUDE_DIR}
+.endif
 
 .if defined(WITH_GNUREADLINE)
 CONFIGURE_ARGS+=--enable-gnu-readline
@@ -43,22 +48,22 @@
 		Please 'make config' again
 .endif
 
-.if defined(WITHOUT_CLIENT)
-PLIST_SUB+=	CLIENT="@comment "
-.else
+.if defined(WITH_CLIENT)
 USE_RC_SUBR+=	bbackupd.sh
 PLIST_SUB+=	CLIENT=""
-ALL_TARGET+=	parcels/${DISTNAME}-backup-client-${TARGETOS}.tgz
+ALL_TARGET+=	build-backup-client
 INSTALL_TARGET+=install-backup-client
+.else
+PLIST_SUB+=	CLIENT="@comment "
 .endif
 
-.if defined(WITHOUT_SERVER)
-PLIST_SUB+=	SERVER="@comment "
-.else
+.if defined(WITH_SERVER)
 USE_RC_SUBR+=	bbstored.sh
 PLIST_SUB+=	SERVER=""
-ALL_TARGET+=	parcels/${DISTNAME}-backup-server-${TARGETOS}.tgz
+ALL_TARGET+=	build-backup-server
 INSTALL_TARGET+=install-backup-server
+.else
+PLIST_SUB+=	SERVER="@comment "
 .endif
 
 CONFLICTS=	boxbackup-server-[0-9]* boxbackup-client-[0-9]*
@@ -71,27 +76,6 @@
 .endif
 
 post-patch:
-# Replace hard-coded /etc/box with $PREFIX/etc/box
-	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \
-		${WRKSRC}/lib/common/BoxPortsAndFiles.h
-# Fix path to perl
-	@${FIND} ${WRKSRC} -name "*.pl" -exec \
-		${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},g' {} \;
-	@${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},g' \
-		${WRKSRC}/bin/bbackupd/bbackupd-config \
-		${WRKSRC}/bin/bbstored/bbstored-certs \
-		${WRKSRC}/bin/bbstored/bbstored-config \
-		${WRKSRC}/lib/raidfile/raidfile-config
-	@${FIND} ${WRKSRC} -name "Makefile.extra" -exec \
-		${REINPLACE_CMD} -e 's,perl,${PERL},g' {} \;
-	@${REINPLACE_CMD} -e 's,perl ,${PERL} ,g' \
-		${WRKSRC}/test/bbackupd/testfiles/bbackupd.conf \
-		${WRKSRC}/infrastructure/makebuildenv.pl
-	@${REINPLACE_CMD} -e 's,"perl ,PERL_EXECUTABLE " ,g' \
-		${WRKSRC}/test/backupstorefix/testbackupstorefix.cpp
-# Fix hard-coded g++
-	@${REINPLACE_CMD} -e 's,g++,${CXX},' \
-		 ${WRKSRC}/infrastructure/makebuildenv.pl
 .if !defined(WITHOUT_CLIENT)
 	@${CAT} ${FILESDIR}/pkg-message.client >> ${PKGMESSAGE}
 .endif

Added: box/james/FreeBSD/files/patch-configdir
===================================================================
--- box/james/FreeBSD/files/patch-configdir	                        (rev 0)
+++ box/james/FreeBSD/files/patch-configdir	2007-12-16 16:48:28 UTC (rev 2009)
@@ -0,0 +1,16 @@
+Index: configure.ac
+===================================================================
+--- configure.ac	(revision 2007)
++++ configure.ac	(working copy)
+@@ -268,9 +268,11 @@
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ bindir_expanded=`eval "echo $bindir"`
+ bindir_expanded=`eval "echo $bindir_expanded"`
++box_configdir=`eval "echo ${sysconfdir}/box"`
+ prefix=$saved_prefix
+ exec_prefix=$saved_exec_prefix
+ AC_SUBST([bindir_expanded])
++AC_DEFINE_UNQUOTED([BOX_CONFIGDIR], ["$box_configdir"], [Location of config files (e.g. PREFIX/etc)])
+ 
+ 
+ ### Output files

Deleted: box/james/FreeBSD/files/patch-configure.ac
===================================================================
--- box/james/FreeBSD/files/patch-configure.ac	2007-12-16 12:57:21 UTC (rev 2008)
+++ box/james/FreeBSD/files/patch-configure.ac	2007-12-16 16:48:28 UTC (rev 2009)
@@ -1,35 +0,0 @@
---- configure.ac.orig	Thu Mar 16 22:26:39 2006
-+++ configure.ac	Thu Mar 16 22:28:31 2006
-@@ -2,7 +2,7 @@
- # Process this file with autoconf to produce a configure script.
- 
- AC_PREREQ(2.59)
--AC_INIT([Box Backup], 0.09, [box at fluffy.co.uk])
-+AC_INIT([Box Backup], 0.10, [box at fluffy.co.uk])
- AC_CONFIG_SRCDIR([lib/common/Box.h])
- AC_CONFIG_HEADERS([lib/common/BoxConfig.h])
- 
-@@ -26,6 +26,12 @@
-   # Use -rdynamic if we have gcc. This is needed for backtrace
-   AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic'])
- fi
-+AC_PATH_PROG([PERL], [perl], [no])
-+if test "x$PERL" != "xno"; then
-+  AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], [Location of the perl executable])
-+else
-+  AC_MSG_ERROR([[perl executable was not found]])
-+fi
- 
- 
- ### Checks for libraries.
-@@ -208,8 +214,8 @@
- 
- # Configure the Box build system
- echo
--perl ./infrastructure/makebuildenv.pl &&
--  perl ./infrastructure/makeparcels.pl
-+$PERL ./infrastructure/makebuildenv.pl &&
-+  $PERL ./infrastructure/makeparcels.pl
- 
- # Write summary of important info
- cat <<EOC

Deleted: box/james/FreeBSD/files/patch-lib-common-BoxPortsAndFiles.h
===================================================================
--- box/james/FreeBSD/files/patch-lib-common-BoxPortsAndFiles.h	2007-12-16 12:57:21 UTC (rev 2008)
+++ box/james/FreeBSD/files/patch-lib-common-BoxPortsAndFiles.h	2007-12-16 16:48:28 UTC (rev 2009)
@@ -1,25 +0,0 @@
---- lib/common/BoxPortsAndFiles.h.orig	Thu Mar 16 19:28:09 2006
-+++ lib/common/BoxPortsAndFiles.h	Thu Mar 16 19:28:38 2006
-@@ -53,7 +53,7 @@
- 
- // Backup store daemon
- #define BOX_PORT_BBSTORED					(BOX_PORT_BASE+1)
--#define BOX_FILE_BBSTORED_DEFAULT_CONFIG	"/etc/box/bbstored.conf"
-+#define BOX_FILE_BBSTORED_DEFAULT_CONFIG	"%%PREFIX%%/etc/box/bbstored.conf"
- // directory within the RAIDFILE root for the backup store daemon
- #define BOX_RAIDFILE_ROOT_BBSTORED			"backup"
- 
-@@ -61,11 +61,11 @@
- #ifdef WIN32
- #define BOX_FILE_BBACKUPD_DEFAULT_CONFIG	"C:\\Program Files\\Box Backup\\bbackupd.conf"
- #else
--#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG	"/etc/box/bbackupd.conf"
-+#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG	"%%PREFIX%%/etc/box/bbackupd.conf"
- #endif
- 
- // RaidFile conf location default
--#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG	"/etc/box/raidfile.conf"
-+#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG	"%%PREFIX%%/etc/box/raidfile.conf"
- 
- // Default name of the named pipe
- #define BOX_NAMED_PIPE_NAME L"\\\\.\\pipe\\boxbackup"




More information about the Boxbackup-commit mailing list