| @@ -1,18 +1,18 @@ | | | @@ -1,18 +1,18 @@ |
1 | # $NetBSD: Makefile,v 1.17 2015/04/10 02:58:49 dsainty Exp $ | | 1 | # $NetBSD: Makefile,v 1.18 2015/04/22 15:13:43 dsainty Exp $ |
2 | | | 2 | |
3 | PKGNAME= ${DISTNAME:S/ZoneMinder-/zoneminder-/} | | 3 | PKGNAME= ${DISTNAME:S/ZoneMinder-/zoneminder-/} |
4 | DISTNAME= ZoneMinder-1.28.1 | | 4 | DISTNAME= ZoneMinder-1.28.1 |
5 | PKGREVISION= 1 | | 5 | PKGREVISION= 2 |
6 | CATEGORIES= security | | 6 | CATEGORIES= security |
7 | MASTER_SITES= ${MASTER_SITE_GITHUB:=ZoneMinder/} | | 7 | MASTER_SITES= ${MASTER_SITE_GITHUB:=ZoneMinder/} |
8 | GITHUB_PROJECT= ZoneMinder | | 8 | GITHUB_PROJECT= ZoneMinder |
9 | GITHUB_TYPE= tag | | 9 | GITHUB_TYPE= tag |
10 | GITHUB_TAG= v${PKGVERSION_NOREV} | | 10 | GITHUB_TAG= v${PKGVERSION_NOREV} |
11 | | | 11 | |
12 | MAINTAINER= dsainty@NetBSD.org | | 12 | MAINTAINER= dsainty@NetBSD.org |
13 | HOMEPAGE= http://www.zoneminder.com/ | | 13 | HOMEPAGE= http://www.zoneminder.com/ |
14 | COMMENT= Video camera security and surveillance solution | | 14 | COMMENT= Video camera security and surveillance solution |
15 | LICENSE= gnu-gpl-v2 | | 15 | LICENSE= gnu-gpl-v2 |
16 | | | 16 | |
17 | # NetBSD tar: Invalid header, starting valid header search. | | 17 | # NetBSD tar: Invalid header, starting valid header search. |
18 | EXTRACT_USING= gtar | | 18 | EXTRACT_USING= gtar |
| @@ -117,53 +117,78 @@ CONFIGURE_ARGS+= --with-webgroup=${APACH | | | @@ -117,53 +117,78 @@ CONFIGURE_ARGS+= --with-webgroup=${APACH |
117 | DEPENDS+= ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}-[0-9]*:../../www/ap-php | | 117 | DEPENDS+= ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}-[0-9]*:../../www/ap-php |
118 | DEPENDS+= ${PHP_PKG_PREFIX}-mysql-[0-9]*:../../databases/php-mysql | | 118 | DEPENDS+= ${PHP_PKG_PREFIX}-mysql-[0-9]*:../../databases/php-mysql |
119 | DEPENDS+= ${PHP_PKG_PREFIX}-pdo_mysql-[0-9]*:../../databases/php-pdo_mysql | | 119 | DEPENDS+= ${PHP_PKG_PREFIX}-pdo_mysql-[0-9]*:../../databases/php-pdo_mysql |
120 | .endif | | 120 | .endif |
121 | | | 121 | |
122 | # This directory contains state, so use OWN_DIRS instead of MAKE_DIRS. | | 122 | # This directory contains state, so use OWN_DIRS instead of MAKE_DIRS. |
123 | ZM_CACHE= ${VARBASE}/cache/zoneminder | | 123 | ZM_CACHE= ${VARBASE}/cache/zoneminder |
124 | OWN_DIRS_PERMS+= ${ZM_CACHE} ${ROOT_USER} ${ROOT_GROUP} 755 | | 124 | OWN_DIRS_PERMS+= ${ZM_CACHE} ${ROOT_USER} ${ROOT_GROUP} 755 |
125 | OWN_DIRS_PERMS+= ${ZM_CACHE}/temp ${ROOT_USER} ${APACHE_GROUP} 775 | | 125 | OWN_DIRS_PERMS+= ${ZM_CACHE}/temp ${ROOT_USER} ${APACHE_GROUP} 775 |
126 | OWN_DIRS_PERMS+= ${ZM_CACHE}/images ${ROOT_USER} ${APACHE_GROUP} 775 | | 126 | OWN_DIRS_PERMS+= ${ZM_CACHE}/images ${ROOT_USER} ${APACHE_GROUP} 775 |
127 | OWN_DIRS_PERMS+= ${ZM_CACHE}/events ${ROOT_USER} ${APACHE_GROUP} 775 | | 127 | OWN_DIRS_PERMS+= ${ZM_CACHE}/events ${ROOT_USER} ${APACHE_GROUP} 775 |
128 | | | 128 | |
129 | REPLACE_PERL+= scripts/zmaudit.pl.in | | 129 | REPLACE_PERL+= scripts/zmaudit.pl.in |
| | | 130 | REPLACE_PERL+= scripts/zmcamtool.pl.in |
130 | REPLACE_PERL+= scripts/zmcontrol.pl.in | | 131 | REPLACE_PERL+= scripts/zmcontrol.pl.in |
131 | REPLACE_PERL+= scripts/zmdc.pl.in | | 132 | REPLACE_PERL+= scripts/zmdc.pl.in |
132 | REPLACE_PERL+= scripts/zmfilter.pl.in | | 133 | REPLACE_PERL+= scripts/zmfilter.pl.in |
133 | REPLACE_PERL+= scripts/zmpkg.pl.in | | 134 | REPLACE_PERL+= scripts/zmpkg.pl.in |
134 | REPLACE_PERL+= scripts/zmtrack.pl.in | | 135 | REPLACE_PERL+= scripts/zmtrack.pl.in |
135 | REPLACE_PERL+= scripts/zmtrigger.pl.in | | 136 | REPLACE_PERL+= scripts/zmtrigger.pl.in |
136 | REPLACE_PERL+= scripts/zmupdate.pl.in | | 137 | REPLACE_PERL+= scripts/zmupdate.pl.in |
137 | REPLACE_PERL+= scripts/zmvideo.pl.in | | 138 | REPLACE_PERL+= scripts/zmvideo.pl.in |
138 | REPLACE_PERL+= scripts/zmwatch.pl.in | | 139 | REPLACE_PERL+= scripts/zmwatch.pl.in |
139 | REPLACE_PERL+= scripts/zmx10.pl.in | | 140 | REPLACE_PERL+= scripts/zmx10.pl.in |
140 | | | 141 | |
| | | 142 | # |
| | | 143 | # The intention of zmsystemctl.pl is to use bin/pkexec to allow the |
| | | 144 | # apache user to start and stop the ZoneMinder services on operating |
| | | 145 | # systems using systemd and newer versions of Polkit than Pkgsrc |
| | | 146 | # currently has. |
| | | 147 | # |
| | | 148 | # If the base OS doesn't use systemd (E.g. anything not Linux), this |
| | | 149 | # file shouldn't be used anyway. |
| | | 150 | # |
| | | 151 | # In Pkgsrc we ignore the potentially absent pkexec interpreter in |
| | | 152 | # this file. If the base OS uses systemd, it probably also has pkexec |
| | | 153 | # in its base installation. |
| | | 154 | # |
| | | 155 | |
| | | 156 | CHECK_INTERPRETER_SKIP+= bin/zmsystemctl.pl |
| | | 157 | EXTRA_PERL+= scripts/zmsystemctl.pl.in |
| | | 158 | |
| | | 159 | SUBST_CLASSES+= systemd-perl |
| | | 160 | SUBST_MESSAGE.systemd-perl= Adjusting systemd pkexec perl. |
| | | 161 | SUBST_STAGE.systemd-perl= pre-configure |
| | | 162 | SUBST_FILES.systemd-perl= scripts/zmsystemctl.pl.in |
| | | 163 | SUBST_SED.systemd-perl= -e 's|/usr/bin/perl|${PERL5}|g' |
| | | 164 | |
| | | 165 | |
141 | SUBST_CLASSES+= dbpaths-path | | 166 | SUBST_CLASSES+= dbpaths-path |
142 | SUBST_MESSAGE.dbpaths-path= Adjusting default paths in configuration. | | 167 | SUBST_MESSAGE.dbpaths-path= Adjusting default paths in configuration. |
143 | SUBST_STAGE.dbpaths-path= pre-configure | | 168 | SUBST_STAGE.dbpaths-path= pre-configure |
144 | SUBST_FILES.dbpaths-path= db/zm_create.sql.in | | 169 | SUBST_FILES.dbpaths-path= db/zm_create.sql.in |
145 | SUBST_SED.dbpaths-path= -e 's|/usr/local/bin/|${PREFIX}/bin/|g' | | 170 | SUBST_SED.dbpaths-path= -e 's|/usr/local/bin/|${PREFIX}/bin/|g' |
146 | SUBST_SED.dbpaths-path+= -e 's|/usr/bin|${PREFIX}/bin|g' | | 171 | SUBST_SED.dbpaths-path+= -e 's|/usr/bin|${PREFIX}/bin|g' |
147 | SUBST_SED.dbpaths-path+= -e 's|/cgi-bin/nph-zms|/zm/cgi-bin/nph-zms|g' | | 172 | SUBST_SED.dbpaths-path+= -e 's|/cgi-bin/nph-zms|/zm/cgi-bin/nph-zms|g' |
148 | | | 173 | |
149 | # | | 174 | # |
150 | # Required to find the 'mysql' client executable, and may also use 'sudo' if | | 175 | # Required to find the 'mysql' client executable, and may also use 'sudo' if |
151 | # installed. | | 176 | # installed. |
152 | # | | 177 | # |
153 | SUBST_CLASSES+= script-path | | 178 | SUBST_CLASSES+= script-path |
154 | SUBST_MESSAGE.script-path= Adjusting paths in scripts. | | 179 | SUBST_MESSAGE.script-path= Adjusting paths in scripts. |
155 | SUBST_STAGE.script-path= pre-configure | | 180 | SUBST_STAGE.script-path= pre-configure |
156 | SUBST_FILES.script-path= ${REPLACE_PERL} | | 181 | SUBST_FILES.script-path= ${REPLACE_PERL} ${EXTRA_PERL} |
157 | SUBST_SED.script-path= -e "s|^\\([\$$]ENV{PATH} *= *'\\).*';\$$|\\1${PREFIX}/bin:/bin:/usr/bin';|g" | | 182 | SUBST_SED.script-path= -e "s|^\\([\$$]ENV{PATH} *= *'\\).*';\$$|\\1${PREFIX}/bin:/bin:/usr/bin';|g" |
158 | | | 183 | |
159 | SUBST_CLASSES+= files | | 184 | SUBST_CLASSES+= files |
160 | SUBST_STAGE.files= pre-configure | | 185 | SUBST_STAGE.files= pre-configure |
161 | SUBST_FILES.files= zoneminder.conf | | 186 | SUBST_FILES.files= zoneminder.conf |
162 | SUBST_SED.files= -e "s|@ZM_HTTPD_ROOT@|${PREFIX}/${ZM_HTTPD_ROOT}|g" | | 187 | SUBST_SED.files= -e "s|@ZM_HTTPD_ROOT@|${PREFIX}/${ZM_HTTPD_ROOT}|g" |
163 | SUBST_SED.files+= -e "s|@ZM_HTTPD_CGIBIN@|${PREFIX}/${ZM_HTTPD_CGIBIN}|g" | | 188 | SUBST_SED.files+= -e "s|@ZM_HTTPD_CGIBIN@|${PREFIX}/${ZM_HTTPD_CGIBIN}|g" |
164 | SUBST_MESSAGE.files= Fixing ZoneMinder configuration file for Apache. | | 189 | SUBST_MESSAGE.files= Fixing ZoneMinder configuration file for Apache. |
165 | | | 190 | |
166 | PLIST_VARS+= rcd | | 191 | PLIST_VARS+= rcd |
167 | | | 192 | |
168 | .if ${INIT_SYSTEM} == "rc.d" | | 193 | .if ${INIT_SYSTEM} == "rc.d" |
169 | PLIST.rcd= yes | | 194 | PLIST.rcd= yes |