Install the sql files for dbconfig
This commit is contained in:
parent
9eb21bc3dd
commit
8a51a754aa
|
@ -72,6 +72,7 @@ override_dh_clean:
|
||||||
done || true
|
done || true
|
||||||
|
|
||||||
override_dh_install:
|
override_dh_install:
|
||||||
|
dh_install --fail-missing
|
||||||
#
|
#
|
||||||
# NOTE: This is a short-term kludge; hopefully changes in the next
|
# NOTE: This is a short-term kludge; hopefully changes in the next
|
||||||
# upstream version will render this unnecessary.
|
# upstream version will render this unnecessary.
|
||||||
|
@ -81,7 +82,6 @@ override_dh_install:
|
||||||
dh_link var/cache/zoneminder/events usr/share/zoneminder/events
|
dh_link var/cache/zoneminder/events usr/share/zoneminder/events
|
||||||
dh_link var/cache/zoneminder/images usr/share/zoneminder/images
|
dh_link var/cache/zoneminder/images usr/share/zoneminder/images
|
||||||
dh_link var/cache/zoneminder/temp usr/share/zoneminder/temp
|
dh_link var/cache/zoneminder/temp usr/share/zoneminder/temp
|
||||||
|
|
||||||
#
|
#
|
||||||
# This is a slightly lesser kludge; moving the cgi stuff to
|
# This is a slightly lesser kludge; moving the cgi stuff to
|
||||||
# /usr/share/zoneminder/cgi-bin breaks one set of behavior,
|
# /usr/share/zoneminder/cgi-bin breaks one set of behavior,
|
||||||
|
@ -89,8 +89,24 @@ override_dh_install:
|
||||||
# behavior.
|
# behavior.
|
||||||
#
|
#
|
||||||
dh_link usr/lib/cgi-bin usr/share/zoneminder/cgi-bin
|
dh_link usr/lib/cgi-bin usr/share/zoneminder/cgi-bin
|
||||||
|
#
|
||||||
dh_install --fail-missing
|
# Install sql file for dbconfig (first installation)
|
||||||
|
install -m 644 db/zm_create.sql \
|
||||||
|
debian/zoneminder/usr/share/dbconfig-common/data/zoneminder/install/mysql
|
||||||
|
#
|
||||||
|
# Remove unneeded sql requests
|
||||||
|
# dbconfig will create the underlying database
|
||||||
|
sed -i "/^ *CREATE DATABASE/d" \
|
||||||
|
debian/zoneminder/usr/share/dbconfig-common/data/zoneminder/install/mysql
|
||||||
|
sed -i "/^ *USE /d" \
|
||||||
|
debian/zoneminder/usr/share/dbconfig-common/data/zoneminder/install/mysql
|
||||||
|
#
|
||||||
|
# Install sql update files for dbconfig
|
||||||
|
for sqlfile in db/*; do \
|
||||||
|
lnk=`echo $$sqlfile | sed "s/^db\/zm_update-\(.*\)\.sql/\1/"`; \
|
||||||
|
dh_link usr/share/zoneminder/$$sqlfile \
|
||||||
|
usr/share/dbconfig-common/data/zoneminder/upgrade/mysql/$$lnk; \
|
||||||
|
done || true
|
||||||
|
|
||||||
override_dh_fixperms:
|
override_dh_fixperms:
|
||||||
dh_fixperms
|
dh_fixperms
|
||||||
|
|
Loading…
Reference in New Issue