| @@ -1,217 +1,242 @@ | | | @@ -1,217 +1,242 @@ |
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 |
19 | | | 19 | |
20 | DEPENDS+= netpbm-[0-9]*:../../graphics/netpbm | | 20 | DEPENDS+= netpbm-[0-9]*:../../graphics/netpbm |
21 | | | 21 | |
22 | PKG_OPTIONS_VAR= PKG_OPTIONS.zoneminder | | 22 | PKG_OPTIONS_VAR= PKG_OPTIONS.zoneminder |
23 | PKG_SUPPORTED_OPTIONS= apache | | 23 | PKG_SUPPORTED_OPTIONS= apache |
24 | PKG_SUGGESTED_OPTIONS= apache | | 24 | PKG_SUGGESTED_OPTIONS= apache |
25 | | | 25 | |
26 | .include "../../mk/bsd.options.mk" | | 26 | .include "../../mk/bsd.options.mk" |
27 | | | 27 | |
28 | GNU_CONFIGURE= yes | | 28 | GNU_CONFIGURE= yes |
29 | USE_LANGUAGES= c c++ | | 29 | USE_LANGUAGES= c c++ |
30 | USE_TOOLS+= aclocal autoconf autoheader automake gmake perl | | 30 | USE_TOOLS+= aclocal autoconf autoheader automake gmake perl |
31 | | | 31 | |
32 | # MIME::Entity is needed from p5-MIME-tools | | 32 | # MIME::Entity is needed from p5-MIME-tools |
33 | # LWP::UserAgent is needed from p5-libwww | | 33 | # LWP::UserAgent is needed from p5-libwww |
34 | DEPENDS+= p5-Archive-Zip-[0-9]*:../../archivers/p5-Archive-Zip | | 34 | DEPENDS+= p5-Archive-Zip-[0-9]*:../../archivers/p5-Archive-Zip |
35 | DEPENDS+= p5-Date-Manip-[0-9]*:../../devel/p5-Date-Manip | | 35 | DEPENDS+= p5-Date-Manip-[0-9]*:../../devel/p5-Date-Manip |
36 | DEPENDS+= p5-Device-SerialPort-[0-9]*:../../comms/p5-Device-SerialPort | | 36 | DEPENDS+= p5-Device-SerialPort-[0-9]*:../../comms/p5-Device-SerialPort |
37 | DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql | | 37 | DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql |
38 | DEPENDS+= p5-MIME-Lite-[0-9]*:../../mail/p5-MIME-Lite | | 38 | DEPENDS+= p5-MIME-Lite-[0-9]*:../../mail/p5-MIME-Lite |
39 | DEPENDS+= p5-MIME-tools-[0-9]*:../../mail/p5-MIME-tools | | 39 | DEPENDS+= p5-MIME-tools-[0-9]*:../../mail/p5-MIME-tools |
40 | DEPENDS+= p5-PHP-Serialization-[0-9]*:../../devel/p5-PHP-Serialization | | 40 | DEPENDS+= p5-PHP-Serialization-[0-9]*:../../devel/p5-PHP-Serialization |
41 | DEPENDS+= {perl>=5.7.3,p5-Time-HiRes-[0-9]*}:../../time/p5-Time-HiRes | | 41 | DEPENDS+= {perl>=5.7.3,p5-Time-HiRes-[0-9]*}:../../time/p5-Time-HiRes |
42 | DEPENDS+= p5-libwww-[0-9]*:../../www/p5-libwww | | 42 | DEPENDS+= p5-libwww-[0-9]*:../../www/p5-libwww |
43 | | | 43 | |
44 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | | 44 | CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} |
45 | | | 45 | |
46 | ZM_HTTPD_ROOT= share/zoneminder/htdocs | | 46 | ZM_HTTPD_ROOT= share/zoneminder/htdocs |
47 | PLIST_SUBST+= ZM_HTTPD_ROOT=${ZM_HTTPD_ROOT:Q} | | 47 | PLIST_SUBST+= ZM_HTTPD_ROOT=${ZM_HTTPD_ROOT:Q} |
48 | OWN_DIRS+= ${ZM_HTTPD_ROOT:Q} | | 48 | OWN_DIRS+= ${ZM_HTTPD_ROOT:Q} |
49 | | | 49 | |
50 | ZM_HTTPD_CGIBIN= libexec/zoneminder/cgi-bin | | 50 | ZM_HTTPD_CGIBIN= libexec/zoneminder/cgi-bin |
51 | PLIST_SUBST+= ZM_HTTPD_CGIBIN=${ZM_HTTPD_CGIBIN:Q} | | 51 | PLIST_SUBST+= ZM_HTTPD_CGIBIN=${ZM_HTTPD_CGIBIN:Q} |
52 | BUILD_DEFS+= ZM_HTTPD_CGIBIN | | 52 | BUILD_DEFS+= ZM_HTTPD_CGIBIN |
53 | OWN_DIRS+= ${ZM_HTTPD_CGIBIN:Q} | | 53 | OWN_DIRS+= ${ZM_HTTPD_CGIBIN:Q} |
54 | | | 54 | |
55 | INSTALLATION_DIRS+= share/zoneminder ${ZM_HTTPD_ROOT} | | 55 | INSTALLATION_DIRS+= share/zoneminder ${ZM_HTTPD_ROOT} |
56 | INSTALLATION_DIRS+= libexec/zoneminder ${ZM_HTTPD_CGIBIN} | | 56 | INSTALLATION_DIRS+= libexec/zoneminder ${ZM_HTTPD_CGIBIN} |
57 | | | 57 | |
58 | BUILD_DEFS+= VARBASE | | 58 | BUILD_DEFS+= VARBASE |
59 | CONFIGURE_ARGS+= --with-webdir=${PREFIX}/${ZM_HTTPD_ROOT:Q} | | 59 | CONFIGURE_ARGS+= --with-webdir=${PREFIX}/${ZM_HTTPD_ROOT:Q} |
60 | CONFIGURE_ARGS+= --with-cgidir=${PREFIX}/${ZM_HTTPD_CGIBIN:Q} | | 60 | CONFIGURE_ARGS+= --with-cgidir=${PREFIX}/${ZM_HTTPD_CGIBIN:Q} |
61 | CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_PREFIX.mysql-client} | | 61 | CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_PREFIX.mysql-client} |
62 | CONFIGURE_ARGS+= --localstatedir=${VARBASE} | | 62 | CONFIGURE_ARGS+= --localstatedir=${VARBASE} |
63 | | | 63 | |
64 | # PolicyKit doesn't actually seem to be necessary. This hack disables | | 64 | # PolicyKit doesn't actually seem to be necessary. This hack disables |
65 | # configure's hunt for PolicyKit, but has no other apparent ill effects. | | 65 | # configure's hunt for PolicyKit, but has no other apparent ill effects. |
66 | CONFIGURE_ENV+= POLKIT_CFLAGS=" " POLKIT_LIBS=" " | | 66 | CONFIGURE_ENV+= POLKIT_CFLAGS=" " POLKIT_LIBS=" " |
67 | | | 67 | |
68 | PTHREAD_AUTO_VARS= yes | | 68 | PTHREAD_AUTO_VARS= yes |
69 | .include "../../mk/pthread.buildlink3.mk" | | 69 | .include "../../mk/pthread.buildlink3.mk" |
70 | | | 70 | |
71 | CONFIGURE_ENV+= OPT_NETPBM=yes | | 71 | CONFIGURE_ENV+= OPT_NETPBM=yes |
72 | CONFIGURE_ENV+= PATH_NETPBM=${PREFIX}/bin/pnmscale | | 72 | CONFIGURE_ENV+= PATH_NETPBM=${PREFIX}/bin/pnmscale |
73 | | | 73 | |
74 | .include "../../multimedia/ffmpeg2/buildlink3.mk" | | 74 | .include "../../multimedia/ffmpeg2/buildlink3.mk" |
75 | CONFIGURE_ARGS+= --with-ffmpeg=${BUILDLINK_PREFIX.ffmpeg2} | | 75 | CONFIGURE_ARGS+= --with-ffmpeg=${BUILDLINK_PREFIX.ffmpeg2} |
76 | CONFIGURE_ENV+= PATH_FFMPEG=${BUILDLINK_PREFIX.ffmpeg2}/bin/ffmpeg2 | | 76 | CONFIGURE_ENV+= PATH_FFMPEG=${BUILDLINK_PREFIX.ffmpeg2}/bin/ffmpeg2 |
77 | CONFIGURE_ENV+= OPT_FFMPEG=yes | | 77 | CONFIGURE_ENV+= OPT_FFMPEG=yes |
78 | | | 78 | |
79 | # The backtrace requires Linux's unportable <execinfo.h> header. | | 79 | # The backtrace requires Linux's unportable <execinfo.h> header. |
80 | CONFIGURE_ARGS+= --enable-crashtrace=no | | 80 | CONFIGURE_ARGS+= --enable-crashtrace=no |
81 | | | 81 | |
82 | # Need Perl Sys::Mmap module for (default) mmap support. | | 82 | # Need Perl Sys::Mmap module for (default) mmap support. |
83 | CONFIGURE_ARGS+= --enable-mmap=no | | 83 | CONFIGURE_ARGS+= --enable-mmap=no |
84 | | | 84 | |
85 | # This is somewhat awkward. ffmpeg's libavformat/avformat.h requires | | 85 | # This is somewhat awkward. ffmpeg's libavformat/avformat.h requires |
86 | # constant macros from stdint.h, but these are only defined under C++ if | | 86 | # constant macros from stdint.h, but these are only defined under C++ if |
87 | # __STDC_CONSTANT_MACROS is requested, so we have to do that on behalf | | 87 | # __STDC_CONSTANT_MACROS is requested, so we have to do that on behalf |
88 | # of ffmpeg. Failure to do so causes configure time failures, and | | 88 | # of ffmpeg. Failure to do so causes configure time failures, and |
89 | # build failures complaining about UINT64_C not being defined. | | 89 | # build failures complaining about UINT64_C not being defined. |
90 | CFLAGS+= -D__STDC_CONSTANT_MACROS | | 90 | CFLAGS+= -D__STDC_CONSTANT_MACROS |
91 | | | 91 | |
92 | # Since MySQL uses openssl, use the same library instead of defaulting to | | 92 | # Since MySQL uses openssl, use the same library instead of defaulting to |
93 | # gnutls. | | 93 | # gnutls. |
94 | CONFIGURE_ENV+= ZM_SSL_LIB=openssl | | 94 | CONFIGURE_ENV+= ZM_SSL_LIB=openssl |
95 | | | 95 | |
96 | # Control where run-time state (PID file and sockets) get stored. | | 96 | # Control where run-time state (PID file and sockets) get stored. |
97 | # Default is "/var/run/zm", but we want to conform to VARBASE. | | 97 | # Default is "/var/run/zm", but we want to conform to VARBASE. |
98 | CONFIGURE_ENV+= ZM_RUNDIR=${VARBASE}/run/zm | | 98 | CONFIGURE_ENV+= ZM_RUNDIR=${VARBASE}/run/zm |
99 | CONFIGURE_ENV+= ZM_SOCKDIR=${VARBASE}/run/zm | | 99 | CONFIGURE_ENV+= ZM_SOCKDIR=${VARBASE}/run/zm |
100 | | | 100 | |
101 | .if !empty(PKG_OPTIONS:Mapache) | | 101 | .if !empty(PKG_OPTIONS:Mapache) |
102 | .include "../../mk/apache.mk" | | 102 | .include "../../mk/apache.mk" |
103 | | | 103 | |
104 | PKG_USERS_VARS+= APACHE_USER | | 104 | PKG_USERS_VARS+= APACHE_USER |
105 | PKG_GROUPS_VARS+= APACHE_GROUP | | 105 | PKG_GROUPS_VARS+= APACHE_GROUP |
106 | BUILD_DEFS+= APACHE_USER APACHE_GROUP | | 106 | BUILD_DEFS+= APACHE_USER APACHE_GROUP |
107 | | | 107 | |
108 | # This directory contains no useful state, so use MAKE_DIRS instead of | | 108 | # This directory contains no useful state, so use MAKE_DIRS instead of |
109 | # OWN_DIRS. | | 109 | # OWN_DIRS. |
110 | MAKE_DIRS_PERMS+= ${VARBASE}/run/zm ${ROOT_USER} ${APACHE_GROUP} 775 | | 110 | MAKE_DIRS_PERMS+= ${VARBASE}/run/zm ${ROOT_USER} ${APACHE_GROUP} 775 |
111 | | | 111 | |
112 | CONFIGURE_ARGS+= --with-webuser=${APACHE_USER} | | 112 | CONFIGURE_ARGS+= --with-webuser=${APACHE_USER} |
113 | CONFIGURE_ARGS+= --with-webgroup=${APACHE_GROUP} | | 113 | CONFIGURE_ARGS+= --with-webgroup=${APACHE_GROUP} |
114 | | | 114 | |
115 | # If we're using Apache we're going to need PHP, and PHP MySQL support. | | 115 | # If we're using Apache we're going to need PHP, and PHP MySQL support. |
116 | .include "../../lang/php/phpversion.mk" | | 116 | .include "../../lang/php/phpversion.mk" |
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 |
170 | .endif | | 195 | .endif |
171 | | | 196 | |
172 | post-extract: | | 197 | post-extract: |
173 | ${CP} ${FILESDIR}/zoneminder.conf ${WRKSRC}/zoneminder.conf | | 198 | ${CP} ${FILESDIR}/zoneminder.conf ${WRKSRC}/zoneminder.conf |
174 | | | 199 | |
175 | pre-configure: | | 200 | pre-configure: |
176 | set -e; cd ${WRKSRC}; \ | | 201 | set -e; cd ${WRKSRC}; \ |
177 | aclocal; autoheader; automake -a --foreign -i; autoconf | | 202 | aclocal; autoheader; automake -a --foreign -i; autoconf |
178 | | | 203 | |
179 | # | | 204 | # |
180 | # Arrange for module.mk to perform its magic here on top of the non-Perl | | 205 | # Arrange for module.mk to perform its magic here on top of the non-Perl |
181 | # build tasks. | | 206 | # build tasks. |
182 | # | | 207 | # |
183 | PERL5_REQD+= 5.6.0 | | 208 | PERL5_REQD+= 5.6.0 |
184 | PERL5_CONFIGURE= no | | 209 | PERL5_CONFIGURE= no |
185 | PERL5_CONFIGURE_DIRS= ${WRKSRC}/scripts/ZoneMinder | | 210 | PERL5_CONFIGURE_DIRS= ${WRKSRC}/scripts/ZoneMinder |
186 | PERL5_PACKLIST= auto/ZoneMinder/.packlist | | 211 | PERL5_PACKLIST= auto/ZoneMinder/.packlist |
187 | .include "../../lang/perl5/module.mk" | | 212 | .include "../../lang/perl5/module.mk" |
188 | | | 213 | |
189 | post-configure: perl5-configure | | 214 | post-configure: perl5-configure |
190 | | | 215 | |
191 | EGDIR= share/examples/${PKGBASE} | | 216 | EGDIR= share/examples/${PKGBASE} |
192 | INSTALLATION_DIRS+= ${EGDIR} ${EGDIR}/config ${EGDIR}/apache | | 217 | INSTALLATION_DIRS+= ${EGDIR} ${EGDIR}/config ${EGDIR}/apache |
193 | CONF_FILES+= ${PREFIX}/${EGDIR}/config/zm.conf ${PKG_SYSCONFDIR}/zm.conf | | 218 | CONF_FILES+= ${PREFIX}/${EGDIR}/config/zm.conf ${PKG_SYSCONFDIR}/zm.conf |
194 | INSTALLATION_DIRS+= bin share/examples/rc.d share/zoneminder/db | | 219 | INSTALLATION_DIRS+= bin share/examples/rc.d share/zoneminder/db |
195 | post-install: | | 220 | post-install: |
196 | ${INSTALL_DATA} ${WRKSRC}/zoneminder.conf ${DESTDIR}${PREFIX}/${EGDIR}/apache/zoneminder.conf | | 221 | ${INSTALL_DATA} ${WRKSRC}/zoneminder.conf ${DESTDIR}${PREFIX}/${EGDIR}/apache/zoneminder.conf |
197 | ${INSTALL_DATA} ${WRKSRC}/zm.conf ${DESTDIR}${PREFIX}/${EGDIR}/config/zm.conf | | 222 | ${INSTALL_DATA} ${WRKSRC}/zm.conf ${DESTDIR}${PREFIX}/${EGDIR}/config/zm.conf |
198 | .if ${INIT_SYSTEM} == "rc.d" | | 223 | .if ${INIT_SYSTEM} == "rc.d" |
199 | ${INSTALL_SCRIPT} ${WRKSRC}/scripts/zm ${DESTDIR}${PREFIX}/share/examples/rc.d/zoneminder | | 224 | ${INSTALL_SCRIPT} ${WRKSRC}/scripts/zm ${DESTDIR}${PREFIX}/share/examples/rc.d/zoneminder |
200 | .endif | | 225 | .endif |
201 | ${INSTALL_DATA} ${WRKSRC}/db/*.sql ${DESTDIR}${PREFIX}/share/zoneminder/db/ | | 226 | ${INSTALL_DATA} ${WRKSRC}/db/*.sql ${DESTDIR}${PREFIX}/share/zoneminder/db/ |
202 | rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events || true | | 227 | rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events || true |
203 | rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images || true | | 228 | rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images || true |
204 | ${LN} -s ${ZM_CACHE}/temp ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/temp | | 229 | ${LN} -s ${ZM_CACHE}/temp ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/temp |
205 | ${LN} -s ${ZM_CACHE}/events ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events | | 230 | ${LN} -s ${ZM_CACHE}/events ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events |
206 | ${LN} -s ${ZM_CACHE}/images ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images | | 231 | ${LN} -s ${ZM_CACHE}/images ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images |
207 | | | 232 | |
208 | | | 233 | |
209 | .include "../../mk/dlopen.buildlink3.mk" | | 234 | .include "../../mk/dlopen.buildlink3.mk" |
210 | .include "../../mk/jpeg.buildlink3.mk" | | 235 | .include "../../mk/jpeg.buildlink3.mk" |
211 | .include "../../mk/mysql.buildlink3.mk" | | 236 | .include "../../mk/mysql.buildlink3.mk" |
212 | .include "../../mk/pthread.buildlink3.mk" | | 237 | .include "../../mk/pthread.buildlink3.mk" |
213 | .include "../../archivers/bzip2/buildlink3.mk" | | 238 | .include "../../archivers/bzip2/buildlink3.mk" |
214 | .include "../../devel/pcre/buildlink3.mk" | | 239 | .include "../../devel/pcre/buildlink3.mk" |
215 | .include "../../devel/zlib/buildlink3.mk" | | 240 | .include "../../devel/zlib/buildlink3.mk" |
216 | .include "../../security/openssl/buildlink3.mk" | | 241 | .include "../../security/openssl/buildlink3.mk" |
217 | .include "../../mk/bsd.pkg.mk" | | 242 | .include "../../mk/bsd.pkg.mk" |