Author: arekm                        Date: Thu Nov 29 17:38:54 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new; from fc

---- Files affected:
SOURCES:
   zm-fedora.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/zm-fedora.patch
diff -u /dev/null SOURCES/zm-fedora.patch:1.1
--- /dev/null   Thu Nov 29 18:38:54 2007
+++ SOURCES/zm-fedora.patch     Thu Nov 29 18:38:49 2007
@@ -0,0 +1,177 @@
+diff -urN ZoneMinder-1.22.3.org/configure.in ZoneMinder-1.22.3/configure.in
+--- ZoneMinder-1.22.3.org/configure.in 2006-10-23 16:06:21.000000000 +0200
++++ ZoneMinder-1.22.3/configure.in     2007-11-29 18:08:52.809478549 +0100
+@@ -1,10 +1,8 @@
+-AC_INIT(zm,1.22.3,[EMAIL PROTECTED],ZoneMinder)
++AC_INIT(zm,1.22.3,[EMAIL PROTECTED],zoneminder)
+ AC_CONFIG_SRCDIR(src/zm.h)
+ AM_INIT_AUTOMAKE
+ AM_CONFIG_HEADER(config.h)
+ 
+-PATH_BUILD=`pwd`
+-AC_SUBST(PATH_BUILD)
+ TIME_BUILD=`date +'%s'`
+ AC_SUBST(TIME_BUILD)
+ 
+@@ -216,8 +214,10 @@
+ 
+ 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(RUNDIR,"/var/run")
+-AC_SUBST(ZM_RUNDIR,"$RUNDIR/zm")
++AC_SUBST(ZM_RUNDIR,"$RUNDIR/$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 -urN ZoneMinder-1.22.3.org/db/Makefile.am ZoneMinder-1.22.3/db/Makefile.am
+--- ZoneMinder-1.22.3.org/db/Makefile.am       2006-10-23 16:05:45.000000000 
+0200
++++ ZoneMinder-1.22.3/db/Makefile.am   2007-11-29 18:08:52.809478549 +0100
+@@ -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 -urN ZoneMinder-1.22.3.org/Makefile.am ZoneMinder-1.22.3/Makefile.am
+--- ZoneMinder-1.22.3.org/Makefile.am  2006-01-15 18:41:21.000000000 +0100
++++ ZoneMinder-1.22.3/Makefile.am      2007-11-29 18:08:52.819479054 +0100
+@@ -23,9 +23,9 @@
+ # Yes, you are correct. This is a HACK!
+ install-data-hook:
+       ( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) 
$(sysconf_DATA); chmod 600 $(sysconf_DATA) )
+-      -( if ! test -e $(RUNDIR); then mkdir $(RUNDIR); fi )
+-      ( if ! test -e $(ZM_RUNDIR); then mkdir $(ZM_RUNDIR); fi; chown 
$(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR) )
++      -( if ! test -e $(DESTDIR)$(RUNDIR); then mkdir $(DESTDIR)$(RUNDIR); fi 
)
++      ( if ! test -e $(DESTDIR)$(ZM_RUNDIR); then mkdir 
$(DESTDIR)$(ZM_RUNDIR); fi; chown $(webuser):$(webgroup) 
$(DESTDIR)$(ZM_RUNDIR); chmod u+w $(DESTDIR)$(ZM_RUNDIR) )
+ 
+ uninstall-hook:
+       @-( cd $(DESTDIR)$(webdir); rm -rf events graphics images sounds temp )
+-      @-( rm -rf $(ZM_RUNDIR) )
++      @-( rm -rf $(DESTDIR)$(ZM_RUNDIR) )
+diff -urN ZoneMinder-1.22.3.org/scripts/zm.in ZoneMinder-1.22.3/scripts/zm.in
+--- ZoneMinder-1.22.3.org/scripts/zm.in        2006-11-16 10:06:37.000000000 
+0100
++++ ZoneMinder-1.22.3/scripts/zm.in    2007-11-29 18:11:09.786431365 +0100
+@@ -6,10 +6,10 @@
+ # Source function library.
+ . /etc/rc.d/init.d/functions
+ 
+-prog=ZoneMinder
++prog="@PACKAGE@"
+ ZM_CONFIG="@ZM_CONFIG@"
+ pidfile="@ZM_RUNDIR@"
+-LOCKFILE=/var/lock/subsys/zm
++LOCKFILE=/var/lock/subsys/$prog
+ 
+ loadconf()
+ {
+@@ -27,9 +27,8 @@
+ start()
+ {
+       zmupdate || return $?
+-      loadconf || return $?
+       #Make sure the directory for our PID folder exists or create one.
+-      [ ! -d /var/run/zm ] \
++      [ ! -d $pidfile ] \
+               && mkdir -m 774 $pidfile \
+               && chown $ZM_WEB_USER:$ZM_WEB_GROUP $pidfile
+       #Make sure the folder for the socks file exists or create one
+@@ -38,44 +37,38 @@
+       [ ! -d $ZM_PATH_SOCK ] \
+               && mkdir -m 774 $ZM_PATH_SOCK \
+               && chown $ZM_WEB_USER:$ZM_WEB_GROUP $ZM_PATH_SOCK
+-      echo -n $"Starting $prog: "
+-      $command start
++      msg_starting "${prog}"
++      daemon $command start
+       RETVAL=$?
+-      [ $RETVAL = 0 ] && success || failure
+-      echo
+       [ $RETVAL = 0 ] && touch $LOCKFILE
+       return $RETVAL
+ }
+ 
+ stop()
+ {
+-      loadconf
+-      echo -n $"Stopping $prog: "
+-      $command stop
++      msg_stopping "${prog}"
++      daemon $command stop
+       RETVAL=$?
+-      [ $RETVAL = 0 ] && success || failure
+-      echo
+       [ $RETVAL = 0 ] && rm -f $LOCKFILE
+ }
+ 
+ zmstatus()
+ {
+-      loadconf
+       result=`$command status`
+       if [ "$result" = "running" ]; then
+-              echo "ZoneMinder is running"
++              echo "$prog is running"
+               $ZM_PATH_BIN/zmu -l
+               RETVAL=0
+       else
+-              echo "ZoneMinder is stopped"
++              echo "$prog is stopped"
+               RETVAL=1
+       fi
+ }
+ 
+ zmupdate()
+ {
+-      if [ -x $ZM_PATH_BIN/zm_update ]; then
+-              $ZM_PATH_BIN/zm_update noi
++      if [ -x $ZM_PATH_BIN/zmupdate.pl ]; then
++              $ZM_PATH_BIN/zmupdate.pl --freshen >/dev/null
+       fi
+ }
+ 
+@@ -92,7 +85,6 @@
+               start
+               ;;
+       'condrestart')
+-              loadconf
+               result=`$ZM_PATH_BIN/zmdc.pl check`
+               if [ "$result" = "running" ]; then
+                       $ZM_PATH_BIN/zmdc.pl shutdown > /dev/null
+diff -urN ZoneMinder-1.22.3.org/scripts/zmupdate.pl 
ZoneMinder-1.22.3/scripts/zmupdate.pl
+--- ZoneMinder-1.22.3.org/scripts/zmupdate.pl  2006-11-24 15:39:38.000000000 
+0100
++++ ZoneMinder-1.22.3/scripts/zmupdate.pl      2007-11-29 18:08:52.809478549 
+0100
+@@ -320,7 +320,7 @@
+                               $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 -urN ZoneMinder-1.22.3.org/zm.conf.in ZoneMinder-1.22.3/zm.conf.in
+--- ZoneMinder-1.22.3.org/zm.conf.in   2006-11-16 10:06:30.000000000 +0100
++++ ZoneMinder-1.22.3/zm.conf.in       2007-11-29 18:08:52.809478549 +0100
+@@ -12,8 +12,8 @@
+ # Current version of ZoneMinder
+ [EMAIL PROTECTED]@
+ 
+-# Path to build directory, used mostly for finding DB upgrade scripts
[EMAIL PROTECTED]@
++# Path to installed data directory, used mostly for finding DB upgrade scripts
[EMAIL PROTECTED]@
+ 
+ # Build time, used to record when to trigger various checks
+ [EMAIL PROTECTED]@
================================================================
_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to