This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
zoneminder/zoneminder-1.24.3-dbinstall.patch
2011-03-25 00:19:27 -05:00

71 lines
2.6 KiB
Diff

diff -up ./configure.ac.dbinstall ./configure.ac
--- ./configure.ac.dbinstall 2011-02-15 15:59:06.000000000 -0600
+++ ./configure.ac 2011-03-24 22:50:36.615225107 -0500
@@ -1,11 +1,9 @@
AC_PREREQ(2.59)
-AC_INIT(zm,1.24.3,support@zoneminder.com,ZoneMinder,http://www.zoneminder.com/downloads.html)
+AC_INIT(zm,1.24.3,support@zoneminder.com,zoneminder,http://www.zoneminder.com/downloads.html)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(src/zm.h)
AM_CONFIG_HEADER(config.h)
-PATH_BUILD=`pwd`
-AC_SUBST(PATH_BUILD)
TIME_BUILD=`date +'%s'`
AC_SUBST(TIME_BUILD)
@@ -354,6 +352,8 @@ AC_PROG_PERL_MODULES(X10::ActiveHome,,AC
AC_DEFINE_DIR([BINDIR],[bindir],[Expanded binary directory])
AC_DEFINE_DIR([LIBDIR],[libdir],[Expanded library directory])
+AC_DEFINE_DIR([DATADIR],[datadir],[Expanded data directory])
+AC_SUBST(PKGDATADIR,"$DATADIR/$PACKAGE")
AC_SUBST(ZM_PID,"$ZM_RUNDIR/zm.pid")
AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory])
AC_SUBST(ZM_CONFIG,"$SYSCONFDIR/zm.conf")
diff -up ./db/Makefile.am.dbinstall ./db/Makefile.am
--- ./db/Makefile.am.dbinstall 2009-10-14 04:42:46.000000000 -0500
+++ ./db/Makefile.am 2011-03-24 22:50:14.173912137 -0500
@@ -1,7 +1,16 @@
AUTOMAKE_OPTIONS = gnu
+zmdbdatadir = $(pkgdatadir)/db
+
EXTRA_DIST = \
zm_create.sql.in \
+ $(dbupgrade_scripts)
+
+dist_zmdbdata_DATA = \
+ zm_create.sql \
+ $(dbupgrade_scripts)
+
+dbupgrade_scripts = \
zm_update-0.0.1.sql \
zm_update-0.9.7.sql \
zm_update-0.9.8.sql \
diff -up ./scripts/zmupdate.pl.in.dbinstall ./scripts/zmupdate.pl.in
--- ./scripts/zmupdate.pl.in.dbinstall 2011-01-17 12:21:37.000000000 -0600
+++ ./scripts/zmupdate.pl.in 2011-03-24 22:50:14.174912107 -0500
@@ -403,7 +403,7 @@ if ( $version )
$command .= " -p".$db_pass;
}
}
- $command .= " ".ZM_DB_NAME." < ".ZM_PATH_BUILD."/db/zm_update-".$version.".sql";
+ $command .= " ".ZM_DB_NAME." < ".ZM_PATH_DATA."/db/zm_update-".$version.".sql";
print( "Executing '$command'\n" ) if ( DBG_LEVEL > 0 );
my $output = qx($command);
diff -up ./zm.conf.in.dbinstall ./zm.conf.in
--- ./zm.conf.in.dbinstall 2008-07-25 04:48:16.000000000 -0500
+++ ./zm.conf.in 2011-03-24 22:50:14.175912077 -0500
@@ -12,8 +12,8 @@
# Current version of ZoneMinder
ZM_VERSION=@VERSION@
-# Path to build directory, used mostly for finding DB upgrade scripts
-ZM_PATH_BUILD=@PATH_BUILD@
+# Path to installed data directory, used mostly for finding DB upgrade scripts
+ZM_PATH_DATA=@PKGDATADIR@
# Build time, used to record when to trigger various checks
ZM_TIME_BUILD=@TIME_BUILD@