ZoneMinder/ZoneMinder — pull request #200 by knnniggett (2013-10-05 23:51:45+00:00)
Title: Create ZM_PATH_DATA and point zmupdate to ZM_PATH_DATA/db

Problem:
Previously, zmupdate.pl looked for the update sql scripts under ZM_PATH_BUILD/db. ZM_PATH_BUILD points to the folder the source was built from. However, this folder does not exist on systems on which zoneminder was not built from source (e.g. deb, rpm, pkg, etc).

Solution:
Create a new ZM variable called ZM_PATH_BUILD, which points to @PKGDATADIR@. Then modify zmupdate to look in ZM_PATH_BUILD/db.

Couple of things to note:
1) "make install" already copies the sql scripts into @PKGDATADIR@/db so no change was needed there.
2) This solution works under *all* build scenarios: from source, from deb, from rpm, from pkg, etc.

Awaiting feedback.