diff --git a/dev-perl/Data-Entropy/Data-Entropy-0.7.0-r1.ebuild b/dev-perl/Data-Entropy/Data-Entropy-0.7.0-r1.ebuild new file mode 100644 index 0000000..ad78e0a --- /dev/null +++ b/dev-perl/Data-Entropy/Data-Entropy-0.7.0-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +DIST_AUTHOR=ZEFRAM +DIST_VERSION=0.007 + +inherit perl-module + +DESCRIPTION="entropy (randomness) management" + +SLOT="0" +KEYWORDS="~amd64 ~x86" + +comment() { echo ''; } +COMMON_DEPEND=" + $(comment virtual/perl-Carp) + dev-perl/Crypt-Rijndael + >=dev-perl/Data-Float-0.8.0 + $(comment virtual/perl-Errno 1.0.0) + $(comment virtual/perl-Exporter) + dev-perl/HTTP-Lite + >=virtual/perl-IO-1.03 $(comment 1.30.0 IO::File) + dev-perl/Params-Classify + $(comment virtual/perl-constant) + $(comment virtual/perl-integer) + virtual/perl-parent + $(comment perl 5.6 w/ strict and warnings) +" +DEPEND=" + ${COMMON_DEPEND} + + $(comment CONFIGURE REQUIRES) + dev-perl/Module-Build + $(comment perl 5.6 w/ strict and warnings) + + $(comment BUILD REQUIRES) + dev-perl/Crypt-Rijndael + >=dev-perl/Data-Float-0.8.0 + >=virtual/perl-IO-1.03 $(comment 1.30.0 IO::File) + dev-perl/Module-Build + virtual/perl-Test-Simple $(comment Test::More) + $(comment virtual/perl-constant) + $(comment perl 5.6 w/ strict and warnings) +" +RDEPEND=" + ${COMMON_DEPEND} +" +BDEPEND="${RDEPEND} + dev-perl/Module-Build +" diff --git a/dev-perl/Data-Entropy/Manifest b/dev-perl/Data-Entropy/Manifest new file mode 100644 index 0000000..f95cb17 --- /dev/null +++ b/dev-perl/Data-Entropy/Manifest @@ -0,0 +1,3 @@ +DIST Data-Entropy-0.007.tar.gz 43667 BLAKE2B 1ea01b75582b8191df4bc7d8e353cf2593a05f1ada14e58d07e57bd66c9e680c23b8b3e9fbb3f3206d79b2f52e483325d9b27c2f9820afcdfba94a68f95e1758 SHA512 f845fabcac67ab16d44f8bbefa0fc09df171efd6cd9ae2f2ee7e189cbb707cf074705763a022941cbfdda5ab4e03b85eacdb7942a504644a40970c42b5a7e0b9 +EBUILD Data-Entropy-0.7.0-r1.ebuild 1157 BLAKE2B da307eb86aeefda4ec99ee2d772974c3ed2eec474cf4ebf0d834d2c4f362fd23c36936a90b66f3ba5d4004d8902c52f496927a5e5a734f4c46f0b706ec02199c SHA512 2b1abde7445d8bd0a9974fc986814bd349e32a46fc23ba876bb4646662b7c92db14ff666f76f3e7d9c0ea1b867e7b5811b5de6ca3587e0f6e13eac9be2c7d807 +MISC metadata.xml 927 BLAKE2B 18adf3b93202f0bcee7ca3045df8fdee3cdb0766e5d346ca699ddcecb68a6aa3b47c66d4855826107f65983555e804a15304cda473f9606d5a80f9e512ac7339 SHA512 2662e2833714ca118375c6a4a5aa2a400079d1ae45ff9922558072adee78b4a15e8b9e1879d200530f0fbfeb8ef88d674f4fbb2c8a9d9033abd31430e03831f3 diff --git a/dev-perl/Data-Entropy/metadata.xml b/dev-perl/Data-Entropy/metadata.xml new file mode 100644 index 0000000..0b098cc --- /dev/null +++ b/dev-perl/Data-Entropy/metadata.xml @@ -0,0 +1,20 @@ + + + + + nic@boet.cc + + Oubliette - ebuild copied and tweaked from perl-experimental overlay for zoneminder + + + + Data-Entropy + Data::Entropy + Data::Entropy::Algorithms + Data::Entropy::RawSource::CryptCounter + Data::Entropy::RawSource::Local + Data::Entropy::RawSource::RandomOrg + Data::Entropy::RawSource::RandomnumbersInfo + Data::Entropy::Source + + diff --git a/dev-perl/HTTP-Lite/HTTP-Lite-2.44.ebuild b/dev-perl/HTTP-Lite/HTTP-Lite-2.44.ebuild new file mode 100644 index 0000000..e101c87 --- /dev/null +++ b/dev-perl/HTTP-Lite/HTTP-Lite-2.44.ebuild @@ -0,0 +1,36 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DIST_AUTHOR=NEILB +DIST_VERSION=2.44 + +inherit perl-module + +DESCRIPTION='Lightweight HTTP implementation' + +SLOT="0" +KEYWORDS="~amd64 ~x86" + +perl_meta_configure() { + # ExtUtils::MakeMaker 6.42 ( 6.420.0 ) + echo \>=virtual/perl-ExtUtils-MakeMaker-6.42 +} +perl_meta_build() { + # ExtUtils::MakeMaker 6.42 ( 6.420.0 ) + echo \>=virtual/perl-ExtUtils-MakeMaker-6.42 +} +perl_meta_runtime() { + # perl 5.005 ( 5.5.0 ) + echo \>=dev-lang/perl-5.5.0 +} +DEPEND=" + dev-perl/Module-Install + $(perl_meta_configure) + $(perl_meta_build) + $(perl_meta_runtime) +" +RDEPEND=" + $(perl_meta_runtime) +" diff --git a/dev-perl/HTTP-Lite/Manifest b/dev-perl/HTTP-Lite/Manifest new file mode 100644 index 0000000..79851cc --- /dev/null +++ b/dev-perl/HTTP-Lite/Manifest @@ -0,0 +1,3 @@ +DIST HTTP-Lite-2.44.tar.gz 287819 BLAKE2B 0d5ff72132c8bc42e01fa38579a7b502708ca89d6cff1f6fb65a4a94926b87dc34d90a99dacaba2326b402c1b7a1643ecde67cf02ad05acb01fc14b6886999ca SHA512 a30dbcdd3af404117f626502e3c591e073bbf9f113b137e6be0f2fca44948c04c1816064091f1a8bed4bfc1635efb02e57a1830f1f577eadc748b6b08e4e5e0f +EBUILD HTTP-Lite-2.44.ebuild 679 BLAKE2B 0ae93574e898dd9fde9a9e0ae6a7749bebc159b2c58e7f9d69f956e8ebebc2583b12ca3a0016338ac6c6952ff88edcd6f2c25ec5fc3995cec27aea54eda3ec83 SHA512 3a5be304d6ec8ab8fcb7b60c6178bff6d62e3171eaceff07b667585a4ff38cd69fab2b2123c3c1f3952cc4b978109b860c4c30ebac1f5de241f7af6b6f8fcf83 +MISC metadata.xml 577 BLAKE2B ddc56f02da488a842f8a9531f613c4d91b2fe8c0dbf2280da5188442a6e01694aaa2bd0f70bd9f8c776b00eaf1a89e42b1e97bbdca6f46c2d71ed760bab777e4 SHA512 dc712524d3c226d73dbe045180c3eed7579bd252910b60b0f223e494dce3c9c06e8ae538de8841bfab0bc04c2a9b51a7ba6887f2ad680db08ffc17fbb99f0731 diff --git a/dev-perl/HTTP-Lite/metadata.xml b/dev-perl/HTTP-Lite/metadata.xml new file mode 100644 index 0000000..ec4b79a --- /dev/null +++ b/dev-perl/HTTP-Lite/metadata.xml @@ -0,0 +1,17 @@ + + + + + nic@boet.cc + + Oubliette - ebuild copied from perl-experimental overlay for zoneminder + https://github.com/gentoo-perl/perl-experimental/tree/master/dev-perl/HTTP-Lite + + https://github.com/neilb/HTTP-Lite/releases + + + + HTTP-Lite + HTTP::Lite + + diff --git a/dev-perl/X10/Manifest b/dev-perl/X10/Manifest new file mode 100644 index 0000000..8f4f864 --- /dev/null +++ b/dev-perl/X10/Manifest @@ -0,0 +1,3 @@ +DIST X10-0.04.tar.gz 16194 BLAKE2B 4a7161e6fc956a7da8f1a950ea57d2ae2f24a8363e51210b37700b9814bfce116a5dc8d031945f65ab9f0663f7380c24c4b7a2c7e71fe4fc6cf4b4eed26737dd SHA512 8e003b9463cddc37b898b0847d6b985027b62073dcc45586f44688d47cbd886e335e90d3aeecc64ce8c832d3d413d2015216c76e5ce725d6ec4321e105df306d +EBUILD X10-0.04.ebuild 338 BLAKE2B c0133ae9bbaa1421cfdfca2a8f2973ef6b4ef5a9b50f0ec2e62f128ec22d542c1799ff92555c3c3b40c726888b3cdee76f328066b7810464a1340ff06113045d SHA512 22a5c7469db15eb8d7446c438099bdb3a7ebb5d10443492dc8285ce2d4f51c93656bb3bb78ad829a78686a30bd1292809851c089d418b3ea0d98d44d0e9f9f51 +MISC metadata.xml 297 BLAKE2B faf6d57caaf5cd420c6b2b3bdeb64753734bac6107fc99bba35bf108ca78ad37d2188246986ff0e505028bf905740d2dc5dfb32cf37448105ab856359af5d2e1 SHA512 39245eecf831ba597ccd57da10be24455845df931a2dc22e19c5a030bf2226c03e4695ffc4a234338a103d01151d0edfe9e1d1bdc8c68e4f93cfd3dc0c64e295 diff --git a/dev-perl/X10/X10-0.04.ebuild b/dev-perl/X10/X10-0.04.ebuild new file mode 100644 index 0000000..5af8662 --- /dev/null +++ b/dev-perl/X10/X10-0.04.ebuild @@ -0,0 +1,19 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DIST_AUTHOR="ROBF" +inherit perl-module + +DESCRIPTION="Perl X10 module" + +#LICENSE="|| ( Artistic GPL-1+ )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + dev-perl/Time-ParseDate + dev-perl/Device-SerialPort" +DEPEND="${RDEPEND}" diff --git a/dev-perl/X10/metadata.xml b/dev-perl/X10/metadata.xml new file mode 100644 index 0000000..211ae02 --- /dev/null +++ b/dev-perl/X10/metadata.xml @@ -0,0 +1,10 @@ + + + + + nic@boet.cc + + Oubliette - new ebuild for zoneminder X10 support + + + diff --git a/www-misc/zoneminder/Manifest b/www-misc/zoneminder/Manifest new file mode 100644 index 0000000..3bbafd1 --- /dev/null +++ b/www-misc/zoneminder/Manifest @@ -0,0 +1,21 @@ +AUX 10_zoneminder.conf 1564 BLAKE2B ffee831a8e7308e4da8f7e286158acca90928f08fb42dc8ae1c859ea4fcc931304113158ff83da32ac727242e08f9d61c695fbd07883a794fdf0cd343347ad8d SHA512 d74dc1933627936f59486fe4c2fbcf2b32977328f07ba14e256cf5c5b7084a01616c86c8bb17ab8936aa4235bf1af6d6499e87b1a9281182eb34665d7b48eef8 +AUX README.gentoo 1427 BLAKE2B 5f0cf173dc39072b9063c1edcc6f47ca7926169a8925f45ed58102a152a68be120d66cea32439e12b0caec540e1eb9e42c62d24900b9957184a339c986733b16 SHA512 885e0d606afa5792907b2f3c610d6f4a1145fb635967dd8b940d037198dab259f1c3302a463ac7ce63391a02a7e4f7ad9711fa994ca3df90e1472e1392396ee0 +AUX conf.d 138 BLAKE2B 41ccdedf00277d98a011ac56015c0e46b641df13bf1ad9828a0d62fc2459c43237918a7b4b59d2594de2f3ef01ee8cc89cf63aa79f56bdb368d837d0a9203819 SHA512 66a3447869a5c7ed613a90a81ae3b0464836a8d1804b195770dd4832e61e89f826998f58dba1ce42d7d411c543d485290e670b0bf929646ad99f48a996bc609a +AUX init.d 475 BLAKE2B 4de6fd787e85cf23f8e3cf562c6ea49dfe91243dbaf6decdb1c92f0d4a996b6f7b78ff2e08b41c1e16fdf37bf58c66c00e03128b69d6e3fbe5f41826aa4f6ac2 SHA512 98641eab59582c74d09dacd48172002872b81a03d13f205d56cc52915b66b754145086f0a589424e2dea28621a6f322fa17ac45e6ad0291961ab4226efc2c3be +AUX zoneminder-1.36.18-semaphore.patch 627 BLAKE2B a3b52482bca4e163554a5cdced7d8c688aa0342b2a0a3ca1f47d965e52fbcde6567a72d9cc3b5ac3d2460bd164c81b1e8be5e1df93565bf90e2c119ec624305d SHA512 150e5dc6e444c08fd3dd2680507130aa883c5fa13394f2f6e459e30d26c061f5e99379945dc2493bfa0bacea2640d1b0d30e1961926552d8c83456bea7646046 +AUX zoneminder.service 212 BLAKE2B 4a7497025b8d315c5a77a6e1f0d80000c3eb363ced1f2285c6b594b871283eba941e267a4590fba5ea89fb3e1529dcec93a63d67025b569ba0411f9e42103680 SHA512 3824076594e18ee89ca28e622f87bf9bd51156d0ef9d71fe8d20d69b682ecf8c96fb779cbaf33f1709aec0ec9fd1b5448b8524c781510718549282e68c095a90 +DIST CakePHP-Enum-Behavior-master.zip 4418 BLAKE2B 79db2023af2344fbd41ff86760589d1f127e2bee26e79c0ec74290abbc540b859f8df72812ebf33842a26c2bfde3fd0d01e10ec4aa612880d9a3101cb9184c55 SHA512 4e74e4e83e98e2f53c483d8ba8d01053d27eea65db21424e0e6ca6cb3a422a789b9c98df9df60c7317737cf28200d46bef8c3ed32008898f10eeb00d09cea3cc +DIST Crud-3.0.zip 112362 BLAKE2B 9839113f73e3599971bd75dbc6777b8bc3b168b7ed2434ef390b3a23e02f9c40b7c0e98f52dca9b5b415ac90de0a3bc3bcf7bffd5d55fd0f8a4d641f73b15eb1 SHA512 cb2f0833c20a3e307ccfb14f63b4ed72ae5e92d130d56c1e5db2ee3b6821f4fc9b43808f301e7a3b26c6d5db6c8594a13543d9da3cbf3584ee916c975b4ff4d7 +DIST RtspServer-master.zip 1429816 BLAKE2B f213007a3046db8096443aeab4bf4f888847d94b0fe9f0957a046306a5ffff93064803d121a94d68d5f0bdb4b4a4c9adda2b6d56c4ba86ec363e52fdf2428004 SHA512 1fbf2758b7c555bf2d32c4acb269072b1cd8ce0cba9efc26fea6555755baa557cf8ce3e420dc2f324bccccc9c150a5f66ac521ae840ccc27c898c5b2fb52b585 +DIST zoneminder-1.36.19.tar.gz 11360512 BLAKE2B 8e913b63ee0d723326ad4c484a7fccda37ec8da40078d0c9d08143826a2d5d4a78d2bbbe50997338e97826c1f4744ca9ac6536c31a1e9f3920c9790d7f126c3d SHA512 50776c55d26cd63ec521faff64d84415b1c75cb7ed8c6317ddd9ce0c09327db8ac257fd39584b76e2e2f41644764837020d345edbe500e3524d7c9709ebea269 +DIST zoneminder-1.36.20.tar.gz 11351218 BLAKE2B b89f7908cd3f31db39a37b8cfc585368d5b5243250847635e888351e5ec48eab0bf1219078edb88ff040d3d478d5553d9c7dfa3705226af8d569d31df2a6007a SHA512 b869d6cdba362cd372898167143a8617a22639bd2c13dae21b605bbd528496269e4d67e10366ebadf5c010d858fe2fbbe7663d113134a4a826f894d720ce02a0 +DIST zoneminder-1.36.21.tar.gz 11352458 BLAKE2B 864f616abc6ce89a751b62eece927da423499e3a0c38693f5c12f2b4ed64c805c17b461254f8539f96a1177c159121b1d33e3fc7b374fb971bd0b86c09dd94a5 SHA512 294a3bea783cbdbe368751f2fa680b6edcc6d1cadf47450f4e0b64b568b565c615e28fec269f553a4942c5c8758cdccc8f95a092912ad3bbd36de2e056773d3a +DIST zoneminder-1.36.23.tar.gz 11351667 BLAKE2B 81ef9dae61853e8eb3418e242cf98f15b72d9605a0c85edfbb85ed282d6a8d0082da6071d2629aabf1b3809b2756132e02bbbc621e372fa31666e67297bf061a SHA512 d4d1b4c5f9b1afb7308d7c6db00ab209cdf542279d9e8df7ccd7466ef218ee395573faeacfb762067e2807f886424ccc29d8cfd50463d63b111fe0cd8be3428b +DIST zoneminder-1.36.24.tar.gz 11351695 BLAKE2B a4af790289b83561be622bfb32ae7148f5bb754a5f05f12d8162ec7b4ae0bbe10d991863f2f85c43b536658d0ba3c56b40e4ec6bf04bc681b3d95f464984018c SHA512 961e1a05bf3aa3545717896eaa05bdc90bdd78ae36a44560431d69a523fa8e575db6d12894958f7bc81bd4142d094b3f4722f9798519451ec1a39cda71bda4b1 +EBUILD zoneminder-1.36.19.ebuild 6560 BLAKE2B 2af5ace16251925e3be169de5df45eeeba9566a22d314d74a3d00c833fe6db1f8e2cc34f33a694d5480d1d505361c3cc2271fef38be44743ab8ce66b84dc45d2 SHA512 bef704c182757f9074855a3eb370299a20d4d2d661f1158c8639f310b7d89661b86cfee1cd20ba35f685cb64d141ff7d2fc289fa03aaa50b9d744cf9ffa64c57 +EBUILD zoneminder-1.36.20.ebuild 6507 BLAKE2B 3d182829b510415da678d18da0de50533d91a189b3509191f4188ca528dacf0558cb6e1177b07c26fea9e2cf1c68df481e1cd38322ba2745e676b2490f82fe11 SHA512 95a331ed8e0c67abfaa85faa9fe93b67b7d1300f795e2be92757dd574fb1cffd98114063c680a893eb47a9bddfd919ca2d9172e7ae8c5204350f4529964ab559 +EBUILD zoneminder-1.36.21.ebuild 6507 BLAKE2B 3d182829b510415da678d18da0de50533d91a189b3509191f4188ca528dacf0558cb6e1177b07c26fea9e2cf1c68df481e1cd38322ba2745e676b2490f82fe11 SHA512 95a331ed8e0c67abfaa85faa9fe93b67b7d1300f795e2be92757dd574fb1cffd98114063c680a893eb47a9bddfd919ca2d9172e7ae8c5204350f4529964ab559 +EBUILD zoneminder-1.36.23.ebuild 6507 BLAKE2B 3d182829b510415da678d18da0de50533d91a189b3509191f4188ca528dacf0558cb6e1177b07c26fea9e2cf1c68df481e1cd38322ba2745e676b2490f82fe11 SHA512 95a331ed8e0c67abfaa85faa9fe93b67b7d1300f795e2be92757dd574fb1cffd98114063c680a893eb47a9bddfd919ca2d9172e7ae8c5204350f4529964ab559 +EBUILD zoneminder-1.36.24.ebuild 6507 BLAKE2B 3d182829b510415da678d18da0de50533d91a189b3509191f4188ca528dacf0558cb6e1177b07c26fea9e2cf1c68df481e1cd38322ba2745e676b2490f82fe11 SHA512 95a331ed8e0c67abfaa85faa9fe93b67b7d1300f795e2be92757dd574fb1cffd98114063c680a893eb47a9bddfd919ca2d9172e7ae8c5204350f4529964ab559 +EBUILD zoneminder-9999.ebuild 6507 BLAKE2B 3d182829b510415da678d18da0de50533d91a189b3509191f4188ca528dacf0558cb6e1177b07c26fea9e2cf1c68df481e1cd38322ba2745e676b2490f82fe11 SHA512 95a331ed8e0c67abfaa85faa9fe93b67b7d1300f795e2be92757dd574fb1cffd98114063c680a893eb47a9bddfd919ca2d9172e7ae8c5204350f4529964ab559 +MISC metadata.xml 613 BLAKE2B d7ef97c303da7c4c5ece74882f0afd410eb36e4e9a310b67e90a27361a8a1a94590aafe4a5b48cb883fd1bf68bc5bea44074315362ed40a87c5a45b592e6ce21 SHA512 81bcd77bd6076c3750092f1e5564a242868eac7c3600c6cc0f68095b3fcf5dde64e07040a3c0fd80df428ac4da9abe1612499abf50e3b88c44290ce57db52498 diff --git a/www-misc/zoneminder/files/10_zoneminder.conf b/www-misc/zoneminder/files/10_zoneminder.conf new file mode 100644 index 0000000..fe39af5 --- /dev/null +++ b/www-misc/zoneminder/files/10_zoneminder.conf @@ -0,0 +1,52 @@ +# Remember to enable cgi mod (i.e. "a2enmod cgi"). +ScriptAlias /zm/cgi-bin/zms "/usr/libexec/zoneminder/cgi-bin/zms" +ScriptAlias /zm/cgi-bin/nph-zms "/usr/libexec/zoneminder/cgi-bin/nph-zms" + + + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + AllowOverride All + Require all granted + + + +# Order matters. This alias must come first. +Alias /zm/cache "/var/cache/zoneminder" + + Options -Indexes +FollowSymLinks + AllowOverride None + Require all granted + + +Alias /zoneminder "%ZM_WEBDIR%" +Alias /zm "%ZM_WEBDIR%" + + Options -Indexes +FollowSymLinks + DirectoryIndex index.php + AllowOverride None + Require all granted + + +# For better visibility, the following directives have been migrated from the +# default .htaccess files included with the CakePHP project. +# Parameters not set here are inherited from the parent directive above. + + RewriteEngine on + RewriteRule ^$ app/webroot/ [L] + RewriteRule (.*) app/webroot/$1 [L] + RewriteBase /zm/api + + + + RewriteEngine on + RewriteRule ^$ webroot/ [L] + RewriteRule (.*) webroot/$1 [L] + RewriteBase /zm/api + + + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + RewriteBase /zm/api + diff --git a/www-misc/zoneminder/files/README.gentoo b/www-misc/zoneminder/files/README.gentoo new file mode 100644 index 0000000..eb055f9 --- /dev/null +++ b/www-misc/zoneminder/files/README.gentoo @@ -0,0 +1,33 @@ +New Installation: + 1. If this is a new installation, you will need to create a MySQL + database for zoneminder to use + (see https://wiki.gentoo.org/wiki/MySQL/Startup_Guide). + E.g., when logged into mysql as root, + mysql> CREATE DATABASE zm; + mysql> grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass'; + mysql> flush privileges; + Once you completed that you should execute the following: + mysql -p < /usr/share/zoneminder/db/zm_create.sql + + 2. Set your database settings in /etc/zm/conf.d/99-local.conf, including above zmpass + ZM_DB_USER=zmuser + ZM_DB_PASS=zmpass + + 3. Verify zoneminder apache configuration /etc/apache2/vhosts.d/10_zoneminder.conf + for an example configuration snippet. + bzcat /usr/share/doc/zoneminder*/10_zoneminder.conf.bz2 + + 4. Enable PHP in your webserver configuration /etc/conf.d/apache2 + APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP -D PROXY" + + 5. set date.timezone in /etc/php/apache2-php*/php.ini + and restart/reload the webserver. + + 6. Start the zoneminder daemon: + /etc/init.d/zoneminder start + + 7. Finally point your browser to http://your.webserver/zm + + +Upgrading: + You will need to run the zmupdate.pl script diff --git a/www-misc/zoneminder/files/conf.d b/www-misc/zoneminder/files/conf.d new file mode 100644 index 0000000..d2e0336 --- /dev/null +++ b/www-misc/zoneminder/files/conf.d @@ -0,0 +1,6 @@ +ZM_SCRIPT=/usr/bin/zmpkg.pl + +# Commands for starting and stopping the server + +CMD_START="${ZM_SCRIPT} start" +CMD_STOP="${ZM_SCRIPT} stop" diff --git a/www-misc/zoneminder/files/init.d b/www-misc/zoneminder/files/init.d new file mode 100644 index 0000000..c921744 --- /dev/null +++ b/www-misc/zoneminder/files/init.d @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use mysql + need apache2 +} + +start_pre() { + checkpath -d -m 0775 -o apache:apache /var/run/zm + checkpath -d -m 0775 -o apache:apache /var/tmp/zm + checkpath -d -m 0775 -o apache:apache /var/cache/zoneminder +} + +start() { + ebegin "Starting zoneminder" + ${CMD_START} + eend $? +} + +stop() { + ebegin "Stopping zoneminder" + ${CMD_STOP} + eend $? +} diff --git a/www-misc/zoneminder/files/zoneminder-1.36.18-semaphore.patch b/www-misc/zoneminder/files/zoneminder-1.36.18-semaphore.patch new file mode 100644 index 0000000..5ab8614 --- /dev/null +++ b/www-misc/zoneminder/files/zoneminder-1.36.18-semaphore.patch @@ -0,0 +1,18 @@ +# semaphore retry introduced boolean issue breaking playback controls +# +# https://forums.zoneminder.com/viewtopic.php?p=126747 +# https://forums.zoneminder.com/viewtopic.php?p=126747 + +diff --git a/web/ajax/stream.php b/web/ajax/stream.php +index 02b78b238..3eff34fc8 100644 +--- a/web/ajax/stream.php ++++ b/web/ajax/stream.php +@@ -25,7 +25,7 @@ while ( $semaphore_tries ) { + usleep(100000); + $semaphore_tries -= 1; + } +-if ($have_semaphore) { ++if ($have_semaphore !== false) { + if ( !($socket = @socket_create(AF_UNIX, SOCK_DGRAM, 0)) ) { + ajaxError('socket_create() failed: '.socket_strerror(socket_last_error())); + } diff --git a/www-misc/zoneminder/files/zoneminder.service b/www-misc/zoneminder/files/zoneminder.service new file mode 100644 index 0000000..9ef5bc6 --- /dev/null +++ b/www-misc/zoneminder/files/zoneminder.service @@ -0,0 +1,11 @@ +[Unit] +Description=Video Security and Survellance System + +[Service] +Type=forking +ExecStart=/usr/bin/zmpkg.pl start +ExecReload=/usr/bin/zmpkg.pl reload +PIDFile=/run/zm/zm.pid + +[Install] +WantedBy=multi-user.target diff --git a/www-misc/zoneminder/metadata.xml b/www-misc/zoneminder/metadata.xml new file mode 100644 index 0000000..01d169d --- /dev/null +++ b/www-misc/zoneminder/metadata.xml @@ -0,0 +1,19 @@ + + + + + nic@boet.cc + + Oubliette - revived from last rites + https://bugs.gentoo.org/666607 + + + + Enable using net-misc/curl for streaming from cameras + ... + Enable using media-libs/vlc for streaming from cameras + + + ZoneMinder/ZoneMinder + + diff --git a/www-misc/zoneminder/zoneminder-1.36.19.ebuild b/www-misc/zoneminder/zoneminder-1.36.19.ebuild new file mode 100644 index 0000000..19b00a7 --- /dev/null +++ b/www-misc/zoneminder/zoneminder-1.36.19.ebuild @@ -0,0 +1,224 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit perl-functions readme.gentoo-r1 cmake flag-o-matic systemd + +MY_PN="ZoneMinder" +MY_CRUD_V="3.0" +MY_CAKEPHP_V="master" +MY_RTSP_V="master" + +DESCRIPTION="full-featured, open source, state-of-the-art video surveillance software system" +HOMEPAGE="http://www.zoneminder.com/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ZoneMinder/zoneminder" +else + SRC_URI=" + https://github.com/${MY_PN}/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/FriendsOfCake/crud/archive/refs/heads/${MY_CRUD_V}.zip -> Crud-${MY_CRUD_V}.zip + https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/refs/heads/${MY_CAKEPHP_V}.zip -> CakePHP-Enum-Behavior-${MY_CAKEPHP_V}.zip + https://github.com/ZoneMinder/RtspServer/archive/refs/heads/${MY_RTSP_V}.zip -> RtspServer-${MY_RTSP_V}.zip" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +IUSE="curl encode gcrypt gnutls +mmap +ssl vlc" +SLOT="0" +REQUIRED_USE=" + || ( ssl gnutls ) +" + +DEPEND=" +app-eselect/eselect-php[apache2] +dev-lang/perl:= +dev-lang/php:*[apache2,cgi,curl,gd,inifile,pdo,mysql,mysqli,sockets,sysvipc] +dev-libs/libpcre +dev-perl/Archive-Zip +dev-perl/Class-Std-Fast +dev-perl/Data-Dump +dev-perl/Date-Manip +dev-perl/Data-UUID +dev-perl/DBD-mysql +dev-perl/DBI +dev-perl/IO-Socket-Multicast +dev-perl/SOAP-WSDL +dev-perl/Sys-CPU +dev-perl/Sys-MemInfo +dev-perl/URI-Encode +dev-perl/libwww-perl +dev-perl/Number-Bytes-Human +dev-perl/JSON-MaybeXS +dev-perl/Crypt-Eksblowfish +dev-perl/Data-Entropy +dev-perl/HTTP-Lite +dev-perl/MIME-Lite +dev-perl/X10 +dev-perl/DateTime +dev-perl/Device-SerialPort +dev-php/pecl-apcu:* +sys-auth/polkit +sys-libs/zlib +media-video/ffmpeg[x264,x265,jpeg2k] +encode? ( media-libs/libmp4v2 ) +virtual/httpd-php:* +media-libs/openjpeg +virtual/perl-ExtUtils-MakeMaker +virtual/perl-Getopt-Long +virtual/perl-Sys-Syslog +virtual/perl-Time-HiRes +www-servers/apache +curl? ( net-misc/curl ) +gcrypt? ( dev-libs/libgcrypt:0= ) +gnutls? ( net-libs/gnutls ) +mmap? ( dev-perl/Sys-Mmap ) +ssl? ( dev-libs/openssl:0= ) +vlc? ( media-video/vlc[live] ) +" +RDEPEND="${DEPEND}" + +MY_ZM_WEBDIR=/usr/share/zoneminder/www + +PATCHES=( + "${FILESDIR}/${PN}-1.36.18-semaphore.patch" +) + +src_prepare() { + cmake_src_prepare + + rm "${WORKDIR}/${P}/conf.d/README" || die + + if [[ ${PV} != 9999 ]]; then + rmdir "${S}/web/api/app/Plugin/Crud" || die + mv "${WORKDIR}/crud-${MY_CRUD_V}" "${S}/web/api/app/Plugin/Crud" || die + + rmdir "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + mv "${WORKDIR}/CakePHP-Enum-Behavior-${MY_CAKEPHP_V}" "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + + rmdir "${S}/dep/RtspServer" || die + mv "${WORKDIR}/RtspServer-${MY_RTSP_V}" "${S}/dep/RtspServer" || die + fi +} + +src_configure() { + append-cxxflags -D__STDC_CONSTANT_MACROS + perl_set_version + export TZ=UTC # bug 630470 + mycmakeargs=( + -DZM_TMPDIR=/var/tmp/zm + -DZM_SOCKDIR=/var/run/zm + -DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" + -DZM_CONFIG_DIR="/etc/zm" + -DZM_CONFIG_SUBDIR="/etc/zm/conf.d" + -DZM_WEB_USER=apache + -DZM_WEB_GROUP=apache + -DZM_WEBDIR=${MY_ZM_WEBDIR} + -DZM_NO_MMAP="$(usex mmap OFF ON)" + -DZM_NO_X10=OFF + -DZM_NO_CURL="$(usex curl OFF ON)" + -DZM_NO_LIBVLC="$(usex vlc OFF ON)" + -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" + -DHAVE_LIBGNUTLS="$(usex gnutls ON OFF)" + -DHAVE_LIBGCRYPT="$(usex gcrypt ON OFF)" + ) + + cmake_src_configure + +} + +src_install() { + cmake_src_install + + docompress -x /usr/share/man + + # the log directory + keepdir /var/log/zm + fowners apache:apache /var/log/zm + + # the logrotate script + insinto /etc/logrotate.d + newins distros/ubuntu2004/zoneminder.logrotate zoneminder + + # now we duplicate the work of zmlinkcontent.sh + keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/zoneminder/api_tmp + fperms -R 0775 /var/lib/zoneminder + fowners -R apache:apache /var/lib/zoneminder + dosym ../../../../../../var/lib/zoneminder/api_tmp ${MY_ZM_WEBDIR}/api/app/tmp + + # bug 523058 + keepdir ${MY_ZM_WEBDIR}/temp + fowners -R apache:apache ${MY_ZM_WEBDIR}/temp + + # the configuration file + fperms 0640 /etc/zm/zm.conf + fowners root:apache /etc/zm/zm.conf + + # init scripts etc + newinitd "${FILESDIR}"/init.d zoneminder + newconfd "${FILESDIR}"/conf.d zoneminder + + # systemd unit file + systemd_dounit "${FILESDIR}"/zoneminder.service + + # apache2 conf file + cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf || die + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die + insinto /etc/apache2/vhosts.d + doins "${T}"/10_zoneminder.conf + + dodoc CHANGELOG.md CONTRIBUTING.md README.md "${T}"/10_zoneminder.conf + + perl_delete_packlist + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "Fresh installs of zoneminder require a few additional steps. Please read the README.gentoo" + else + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test ${PV} -gt ${v}; then + elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." + fi + done + fi + + # 2022-02-10 The original ebuild omitted ZM_CONFIG_* at build time + # Check if user needs to migrate configs from /etc to /etc/zm + local legacy="/etc/zm.conf /etc/conf.d/01-system-paths.conf /etc/conf.d/02-multiserver.conf /etc/conf.d/zmcustom.conf" + local lf + local lfwarn=0 + for lf in ${legacy}; do + if [[ -f "${lf}" ]]; then + ewarn "Found deprecated ZoneMinder config ${lf}" + lfwarn=1 + fi + done + if [ ${lfwarn} -ne 0 ]; then + ewarn "" + ewarn "Gentoo's ebuild previously installed ZoneMinder's configurations directly into /etc" + ewarn "This conflicts with OpenRC /etc/conf.d as ZoneMinder also has its own conf.d subdirectory" + ewarn "Your newly compiled ZoneMinder now looks for configurations under /etc/zm" + ewarn "" + ewarn " Please merge your local changes into /etc/zm/conf.d/99-local.conf" + ewarn " This includes any user created *.conf files for ZM within /etc/conf.d/" + ewarn " Then remove those old files to complete the migration." + ewarn "" + elog "" + elog "Remember to set appropriate permisions on user created files (i.e. /etc/zm/conf.d/*.conf):" + elog " chmod 640 local.conf" + elog " chown root:apache local.conf" + elog "" + ewarn "" + ewarn "ZoneMinder will **NO LONGER FUNCTION UNTIL** these configuration items have been migrated!" + ewarn "In particular, ensuring the database hostname and credentials are defined within the new locations." + ewarn "" + fi +} diff --git a/www-misc/zoneminder/zoneminder-1.36.20.ebuild b/www-misc/zoneminder/zoneminder-1.36.20.ebuild new file mode 100644 index 0000000..98a25d6 --- /dev/null +++ b/www-misc/zoneminder/zoneminder-1.36.20.ebuild @@ -0,0 +1,220 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit perl-functions readme.gentoo-r1 cmake flag-o-matic systemd + +MY_PN="ZoneMinder" +MY_CRUD_V="3.0" +MY_CAKEPHP_V="master" +MY_RTSP_V="master" + +DESCRIPTION="full-featured, open source, state-of-the-art video surveillance software system" +HOMEPAGE="http://www.zoneminder.com/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ZoneMinder/zoneminder" +else + SRC_URI=" + https://github.com/${MY_PN}/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/FriendsOfCake/crud/archive/refs/heads/${MY_CRUD_V}.zip -> Crud-${MY_CRUD_V}.zip + https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/refs/heads/${MY_CAKEPHP_V}.zip -> CakePHP-Enum-Behavior-${MY_CAKEPHP_V}.zip + https://github.com/ZoneMinder/RtspServer/archive/refs/heads/${MY_RTSP_V}.zip -> RtspServer-${MY_RTSP_V}.zip" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +IUSE="curl encode gcrypt gnutls +mmap +ssl vlc" +SLOT="0" +REQUIRED_USE=" + || ( ssl gnutls ) +" + +DEPEND=" +app-eselect/eselect-php[apache2] +dev-lang/perl:= +dev-lang/php:*[apache2,cgi,curl,gd,inifile,intl,pdo,mysql,mysqli,sockets,sysvipc] +dev-libs/libpcre +dev-perl/Archive-Zip +dev-perl/Class-Std-Fast +dev-perl/Data-Dump +dev-perl/Date-Manip +dev-perl/Data-UUID +dev-perl/DBD-mysql +dev-perl/DBI +dev-perl/IO-Socket-Multicast +dev-perl/SOAP-WSDL +dev-perl/Sys-CPU +dev-perl/Sys-MemInfo +dev-perl/URI-Encode +dev-perl/libwww-perl +dev-perl/Number-Bytes-Human +dev-perl/JSON-MaybeXS +dev-perl/Crypt-Eksblowfish +dev-perl/Data-Entropy +dev-perl/HTTP-Lite +dev-perl/MIME-Lite +dev-perl/X10 +dev-perl/DateTime +dev-perl/Device-SerialPort +dev-php/pecl-apcu:* +sys-auth/polkit +sys-libs/zlib +media-video/ffmpeg[x264,x265,jpeg2k] +encode? ( media-libs/libmp4v2 ) +virtual/httpd-php:* +media-libs/openjpeg +virtual/perl-ExtUtils-MakeMaker +virtual/perl-Getopt-Long +virtual/perl-Sys-Syslog +virtual/perl-Time-HiRes +www-servers/apache +curl? ( net-misc/curl ) +gcrypt? ( dev-libs/libgcrypt:0= ) +gnutls? ( net-libs/gnutls ) +mmap? ( dev-perl/Sys-Mmap ) +ssl? ( dev-libs/openssl:0= ) +vlc? ( media-video/vlc[live] ) +" +RDEPEND="${DEPEND}" + +MY_ZM_WEBDIR=/usr/share/zoneminder/www + +src_prepare() { + cmake_src_prepare + + rm "${WORKDIR}/${P}/conf.d/README" || die + + if [[ ${PV} != 9999 ]]; then + rmdir "${S}/web/api/app/Plugin/Crud" || die + mv "${WORKDIR}/crud-${MY_CRUD_V}" "${S}/web/api/app/Plugin/Crud" || die + + rmdir "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + mv "${WORKDIR}/CakePHP-Enum-Behavior-${MY_CAKEPHP_V}" "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + + rmdir "${S}/dep/RtspServer" || die + mv "${WORKDIR}/RtspServer-${MY_RTSP_V}" "${S}/dep/RtspServer" || die + fi +} + +src_configure() { + append-cxxflags -D__STDC_CONSTANT_MACROS + perl_set_version + export TZ=UTC # bug 630470 + mycmakeargs=( + -DZM_TMPDIR=/var/tmp/zm + -DZM_SOCKDIR=/var/run/zm + -DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" + -DZM_CONFIG_DIR="/etc/zm" + -DZM_CONFIG_SUBDIR="/etc/zm/conf.d" + -DZM_WEB_USER=apache + -DZM_WEB_GROUP=apache + -DZM_WEBDIR=${MY_ZM_WEBDIR} + -DZM_NO_MMAP="$(usex mmap OFF ON)" + -DZM_NO_X10=OFF + -DZM_NO_CURL="$(usex curl OFF ON)" + -DZM_NO_LIBVLC="$(usex vlc OFF ON)" + -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" + -DHAVE_LIBGNUTLS="$(usex gnutls ON OFF)" + -DHAVE_LIBGCRYPT="$(usex gcrypt ON OFF)" + ) + + cmake_src_configure + +} + +src_install() { + cmake_src_install + + docompress -x /usr/share/man + + # the log directory + keepdir /var/log/zm + fowners apache:apache /var/log/zm + + # the logrotate script + insinto /etc/logrotate.d + newins distros/ubuntu2004/zoneminder.logrotate zoneminder + + # now we duplicate the work of zmlinkcontent.sh + keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/zoneminder/api_tmp + fperms -R 0775 /var/lib/zoneminder + fowners -R apache:apache /var/lib/zoneminder + dosym ../../../../../../var/lib/zoneminder/api_tmp ${MY_ZM_WEBDIR}/api/app/tmp + + # bug 523058 + keepdir ${MY_ZM_WEBDIR}/temp + fowners -R apache:apache ${MY_ZM_WEBDIR}/temp + + # the configuration file + fperms 0640 /etc/zm/zm.conf + fowners root:apache /etc/zm/zm.conf + + # init scripts etc + newinitd "${FILESDIR}"/init.d zoneminder + newconfd "${FILESDIR}"/conf.d zoneminder + + # systemd unit file + systemd_dounit "${FILESDIR}"/zoneminder.service + + # apache2 conf file + cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf || die + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die + insinto /etc/apache2/vhosts.d + doins "${T}"/10_zoneminder.conf + + dodoc CHANGELOG.md CONTRIBUTING.md README.md "${T}"/10_zoneminder.conf + + perl_delete_packlist + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "Fresh installs of zoneminder require a few additional steps. Please read the README.gentoo" + else + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test ${PV} -gt ${v}; then + elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." + fi + done + fi + + # 2022-02-10 The original ebuild omitted ZM_CONFIG_* at build time + # Check if user needs to migrate configs from /etc to /etc/zm + local legacy="/etc/zm.conf /etc/conf.d/01-system-paths.conf /etc/conf.d/02-multiserver.conf /etc/conf.d/zmcustom.conf" + local lf + local lfwarn=0 + for lf in ${legacy}; do + if [[ -f "${lf}" ]]; then + ewarn "Found deprecated ZoneMinder config ${lf}" + lfwarn=1 + fi + done + if [ ${lfwarn} -ne 0 ]; then + ewarn "" + ewarn "Gentoo's ebuild previously installed ZoneMinder's configurations directly into /etc" + ewarn "This conflicts with OpenRC /etc/conf.d as ZoneMinder also has its own conf.d subdirectory" + ewarn "Your newly compiled ZoneMinder now looks for configurations under /etc/zm" + ewarn "" + ewarn " Please merge your local changes into /etc/zm/conf.d/99-local.conf" + ewarn " This includes any user created *.conf files for ZM within /etc/conf.d/" + ewarn " Then remove those old files to complete the migration." + ewarn "" + elog "" + elog "Remember to set appropriate permisions on user created files (i.e. /etc/zm/conf.d/*.conf):" + elog " chmod 640 local.conf" + elog " chown root:apache local.conf" + elog "" + ewarn "" + ewarn "ZoneMinder will **NO LONGER FUNCTION UNTIL** these configuration items have been migrated!" + ewarn "In particular, ensuring the database hostname and credentials are defined within the new locations." + ewarn "" + fi +} diff --git a/www-misc/zoneminder/zoneminder-1.36.21.ebuild b/www-misc/zoneminder/zoneminder-1.36.21.ebuild new file mode 100644 index 0000000..98a25d6 --- /dev/null +++ b/www-misc/zoneminder/zoneminder-1.36.21.ebuild @@ -0,0 +1,220 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit perl-functions readme.gentoo-r1 cmake flag-o-matic systemd + +MY_PN="ZoneMinder" +MY_CRUD_V="3.0" +MY_CAKEPHP_V="master" +MY_RTSP_V="master" + +DESCRIPTION="full-featured, open source, state-of-the-art video surveillance software system" +HOMEPAGE="http://www.zoneminder.com/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ZoneMinder/zoneminder" +else + SRC_URI=" + https://github.com/${MY_PN}/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/FriendsOfCake/crud/archive/refs/heads/${MY_CRUD_V}.zip -> Crud-${MY_CRUD_V}.zip + https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/refs/heads/${MY_CAKEPHP_V}.zip -> CakePHP-Enum-Behavior-${MY_CAKEPHP_V}.zip + https://github.com/ZoneMinder/RtspServer/archive/refs/heads/${MY_RTSP_V}.zip -> RtspServer-${MY_RTSP_V}.zip" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +IUSE="curl encode gcrypt gnutls +mmap +ssl vlc" +SLOT="0" +REQUIRED_USE=" + || ( ssl gnutls ) +" + +DEPEND=" +app-eselect/eselect-php[apache2] +dev-lang/perl:= +dev-lang/php:*[apache2,cgi,curl,gd,inifile,intl,pdo,mysql,mysqli,sockets,sysvipc] +dev-libs/libpcre +dev-perl/Archive-Zip +dev-perl/Class-Std-Fast +dev-perl/Data-Dump +dev-perl/Date-Manip +dev-perl/Data-UUID +dev-perl/DBD-mysql +dev-perl/DBI +dev-perl/IO-Socket-Multicast +dev-perl/SOAP-WSDL +dev-perl/Sys-CPU +dev-perl/Sys-MemInfo +dev-perl/URI-Encode +dev-perl/libwww-perl +dev-perl/Number-Bytes-Human +dev-perl/JSON-MaybeXS +dev-perl/Crypt-Eksblowfish +dev-perl/Data-Entropy +dev-perl/HTTP-Lite +dev-perl/MIME-Lite +dev-perl/X10 +dev-perl/DateTime +dev-perl/Device-SerialPort +dev-php/pecl-apcu:* +sys-auth/polkit +sys-libs/zlib +media-video/ffmpeg[x264,x265,jpeg2k] +encode? ( media-libs/libmp4v2 ) +virtual/httpd-php:* +media-libs/openjpeg +virtual/perl-ExtUtils-MakeMaker +virtual/perl-Getopt-Long +virtual/perl-Sys-Syslog +virtual/perl-Time-HiRes +www-servers/apache +curl? ( net-misc/curl ) +gcrypt? ( dev-libs/libgcrypt:0= ) +gnutls? ( net-libs/gnutls ) +mmap? ( dev-perl/Sys-Mmap ) +ssl? ( dev-libs/openssl:0= ) +vlc? ( media-video/vlc[live] ) +" +RDEPEND="${DEPEND}" + +MY_ZM_WEBDIR=/usr/share/zoneminder/www + +src_prepare() { + cmake_src_prepare + + rm "${WORKDIR}/${P}/conf.d/README" || die + + if [[ ${PV} != 9999 ]]; then + rmdir "${S}/web/api/app/Plugin/Crud" || die + mv "${WORKDIR}/crud-${MY_CRUD_V}" "${S}/web/api/app/Plugin/Crud" || die + + rmdir "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + mv "${WORKDIR}/CakePHP-Enum-Behavior-${MY_CAKEPHP_V}" "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + + rmdir "${S}/dep/RtspServer" || die + mv "${WORKDIR}/RtspServer-${MY_RTSP_V}" "${S}/dep/RtspServer" || die + fi +} + +src_configure() { + append-cxxflags -D__STDC_CONSTANT_MACROS + perl_set_version + export TZ=UTC # bug 630470 + mycmakeargs=( + -DZM_TMPDIR=/var/tmp/zm + -DZM_SOCKDIR=/var/run/zm + -DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" + -DZM_CONFIG_DIR="/etc/zm" + -DZM_CONFIG_SUBDIR="/etc/zm/conf.d" + -DZM_WEB_USER=apache + -DZM_WEB_GROUP=apache + -DZM_WEBDIR=${MY_ZM_WEBDIR} + -DZM_NO_MMAP="$(usex mmap OFF ON)" + -DZM_NO_X10=OFF + -DZM_NO_CURL="$(usex curl OFF ON)" + -DZM_NO_LIBVLC="$(usex vlc OFF ON)" + -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" + -DHAVE_LIBGNUTLS="$(usex gnutls ON OFF)" + -DHAVE_LIBGCRYPT="$(usex gcrypt ON OFF)" + ) + + cmake_src_configure + +} + +src_install() { + cmake_src_install + + docompress -x /usr/share/man + + # the log directory + keepdir /var/log/zm + fowners apache:apache /var/log/zm + + # the logrotate script + insinto /etc/logrotate.d + newins distros/ubuntu2004/zoneminder.logrotate zoneminder + + # now we duplicate the work of zmlinkcontent.sh + keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/zoneminder/api_tmp + fperms -R 0775 /var/lib/zoneminder + fowners -R apache:apache /var/lib/zoneminder + dosym ../../../../../../var/lib/zoneminder/api_tmp ${MY_ZM_WEBDIR}/api/app/tmp + + # bug 523058 + keepdir ${MY_ZM_WEBDIR}/temp + fowners -R apache:apache ${MY_ZM_WEBDIR}/temp + + # the configuration file + fperms 0640 /etc/zm/zm.conf + fowners root:apache /etc/zm/zm.conf + + # init scripts etc + newinitd "${FILESDIR}"/init.d zoneminder + newconfd "${FILESDIR}"/conf.d zoneminder + + # systemd unit file + systemd_dounit "${FILESDIR}"/zoneminder.service + + # apache2 conf file + cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf || die + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die + insinto /etc/apache2/vhosts.d + doins "${T}"/10_zoneminder.conf + + dodoc CHANGELOG.md CONTRIBUTING.md README.md "${T}"/10_zoneminder.conf + + perl_delete_packlist + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "Fresh installs of zoneminder require a few additional steps. Please read the README.gentoo" + else + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test ${PV} -gt ${v}; then + elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." + fi + done + fi + + # 2022-02-10 The original ebuild omitted ZM_CONFIG_* at build time + # Check if user needs to migrate configs from /etc to /etc/zm + local legacy="/etc/zm.conf /etc/conf.d/01-system-paths.conf /etc/conf.d/02-multiserver.conf /etc/conf.d/zmcustom.conf" + local lf + local lfwarn=0 + for lf in ${legacy}; do + if [[ -f "${lf}" ]]; then + ewarn "Found deprecated ZoneMinder config ${lf}" + lfwarn=1 + fi + done + if [ ${lfwarn} -ne 0 ]; then + ewarn "" + ewarn "Gentoo's ebuild previously installed ZoneMinder's configurations directly into /etc" + ewarn "This conflicts with OpenRC /etc/conf.d as ZoneMinder also has its own conf.d subdirectory" + ewarn "Your newly compiled ZoneMinder now looks for configurations under /etc/zm" + ewarn "" + ewarn " Please merge your local changes into /etc/zm/conf.d/99-local.conf" + ewarn " This includes any user created *.conf files for ZM within /etc/conf.d/" + ewarn " Then remove those old files to complete the migration." + ewarn "" + elog "" + elog "Remember to set appropriate permisions on user created files (i.e. /etc/zm/conf.d/*.conf):" + elog " chmod 640 local.conf" + elog " chown root:apache local.conf" + elog "" + ewarn "" + ewarn "ZoneMinder will **NO LONGER FUNCTION UNTIL** these configuration items have been migrated!" + ewarn "In particular, ensuring the database hostname and credentials are defined within the new locations." + ewarn "" + fi +} diff --git a/www-misc/zoneminder/zoneminder-1.36.23.ebuild b/www-misc/zoneminder/zoneminder-1.36.23.ebuild new file mode 100644 index 0000000..98a25d6 --- /dev/null +++ b/www-misc/zoneminder/zoneminder-1.36.23.ebuild @@ -0,0 +1,220 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit perl-functions readme.gentoo-r1 cmake flag-o-matic systemd + +MY_PN="ZoneMinder" +MY_CRUD_V="3.0" +MY_CAKEPHP_V="master" +MY_RTSP_V="master" + +DESCRIPTION="full-featured, open source, state-of-the-art video surveillance software system" +HOMEPAGE="http://www.zoneminder.com/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ZoneMinder/zoneminder" +else + SRC_URI=" + https://github.com/${MY_PN}/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/FriendsOfCake/crud/archive/refs/heads/${MY_CRUD_V}.zip -> Crud-${MY_CRUD_V}.zip + https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/refs/heads/${MY_CAKEPHP_V}.zip -> CakePHP-Enum-Behavior-${MY_CAKEPHP_V}.zip + https://github.com/ZoneMinder/RtspServer/archive/refs/heads/${MY_RTSP_V}.zip -> RtspServer-${MY_RTSP_V}.zip" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +IUSE="curl encode gcrypt gnutls +mmap +ssl vlc" +SLOT="0" +REQUIRED_USE=" + || ( ssl gnutls ) +" + +DEPEND=" +app-eselect/eselect-php[apache2] +dev-lang/perl:= +dev-lang/php:*[apache2,cgi,curl,gd,inifile,intl,pdo,mysql,mysqli,sockets,sysvipc] +dev-libs/libpcre +dev-perl/Archive-Zip +dev-perl/Class-Std-Fast +dev-perl/Data-Dump +dev-perl/Date-Manip +dev-perl/Data-UUID +dev-perl/DBD-mysql +dev-perl/DBI +dev-perl/IO-Socket-Multicast +dev-perl/SOAP-WSDL +dev-perl/Sys-CPU +dev-perl/Sys-MemInfo +dev-perl/URI-Encode +dev-perl/libwww-perl +dev-perl/Number-Bytes-Human +dev-perl/JSON-MaybeXS +dev-perl/Crypt-Eksblowfish +dev-perl/Data-Entropy +dev-perl/HTTP-Lite +dev-perl/MIME-Lite +dev-perl/X10 +dev-perl/DateTime +dev-perl/Device-SerialPort +dev-php/pecl-apcu:* +sys-auth/polkit +sys-libs/zlib +media-video/ffmpeg[x264,x265,jpeg2k] +encode? ( media-libs/libmp4v2 ) +virtual/httpd-php:* +media-libs/openjpeg +virtual/perl-ExtUtils-MakeMaker +virtual/perl-Getopt-Long +virtual/perl-Sys-Syslog +virtual/perl-Time-HiRes +www-servers/apache +curl? ( net-misc/curl ) +gcrypt? ( dev-libs/libgcrypt:0= ) +gnutls? ( net-libs/gnutls ) +mmap? ( dev-perl/Sys-Mmap ) +ssl? ( dev-libs/openssl:0= ) +vlc? ( media-video/vlc[live] ) +" +RDEPEND="${DEPEND}" + +MY_ZM_WEBDIR=/usr/share/zoneminder/www + +src_prepare() { + cmake_src_prepare + + rm "${WORKDIR}/${P}/conf.d/README" || die + + if [[ ${PV} != 9999 ]]; then + rmdir "${S}/web/api/app/Plugin/Crud" || die + mv "${WORKDIR}/crud-${MY_CRUD_V}" "${S}/web/api/app/Plugin/Crud" || die + + rmdir "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + mv "${WORKDIR}/CakePHP-Enum-Behavior-${MY_CAKEPHP_V}" "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + + rmdir "${S}/dep/RtspServer" || die + mv "${WORKDIR}/RtspServer-${MY_RTSP_V}" "${S}/dep/RtspServer" || die + fi +} + +src_configure() { + append-cxxflags -D__STDC_CONSTANT_MACROS + perl_set_version + export TZ=UTC # bug 630470 + mycmakeargs=( + -DZM_TMPDIR=/var/tmp/zm + -DZM_SOCKDIR=/var/run/zm + -DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" + -DZM_CONFIG_DIR="/etc/zm" + -DZM_CONFIG_SUBDIR="/etc/zm/conf.d" + -DZM_WEB_USER=apache + -DZM_WEB_GROUP=apache + -DZM_WEBDIR=${MY_ZM_WEBDIR} + -DZM_NO_MMAP="$(usex mmap OFF ON)" + -DZM_NO_X10=OFF + -DZM_NO_CURL="$(usex curl OFF ON)" + -DZM_NO_LIBVLC="$(usex vlc OFF ON)" + -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" + -DHAVE_LIBGNUTLS="$(usex gnutls ON OFF)" + -DHAVE_LIBGCRYPT="$(usex gcrypt ON OFF)" + ) + + cmake_src_configure + +} + +src_install() { + cmake_src_install + + docompress -x /usr/share/man + + # the log directory + keepdir /var/log/zm + fowners apache:apache /var/log/zm + + # the logrotate script + insinto /etc/logrotate.d + newins distros/ubuntu2004/zoneminder.logrotate zoneminder + + # now we duplicate the work of zmlinkcontent.sh + keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/zoneminder/api_tmp + fperms -R 0775 /var/lib/zoneminder + fowners -R apache:apache /var/lib/zoneminder + dosym ../../../../../../var/lib/zoneminder/api_tmp ${MY_ZM_WEBDIR}/api/app/tmp + + # bug 523058 + keepdir ${MY_ZM_WEBDIR}/temp + fowners -R apache:apache ${MY_ZM_WEBDIR}/temp + + # the configuration file + fperms 0640 /etc/zm/zm.conf + fowners root:apache /etc/zm/zm.conf + + # init scripts etc + newinitd "${FILESDIR}"/init.d zoneminder + newconfd "${FILESDIR}"/conf.d zoneminder + + # systemd unit file + systemd_dounit "${FILESDIR}"/zoneminder.service + + # apache2 conf file + cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf || die + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die + insinto /etc/apache2/vhosts.d + doins "${T}"/10_zoneminder.conf + + dodoc CHANGELOG.md CONTRIBUTING.md README.md "${T}"/10_zoneminder.conf + + perl_delete_packlist + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "Fresh installs of zoneminder require a few additional steps. Please read the README.gentoo" + else + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test ${PV} -gt ${v}; then + elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." + fi + done + fi + + # 2022-02-10 The original ebuild omitted ZM_CONFIG_* at build time + # Check if user needs to migrate configs from /etc to /etc/zm + local legacy="/etc/zm.conf /etc/conf.d/01-system-paths.conf /etc/conf.d/02-multiserver.conf /etc/conf.d/zmcustom.conf" + local lf + local lfwarn=0 + for lf in ${legacy}; do + if [[ -f "${lf}" ]]; then + ewarn "Found deprecated ZoneMinder config ${lf}" + lfwarn=1 + fi + done + if [ ${lfwarn} -ne 0 ]; then + ewarn "" + ewarn "Gentoo's ebuild previously installed ZoneMinder's configurations directly into /etc" + ewarn "This conflicts with OpenRC /etc/conf.d as ZoneMinder also has its own conf.d subdirectory" + ewarn "Your newly compiled ZoneMinder now looks for configurations under /etc/zm" + ewarn "" + ewarn " Please merge your local changes into /etc/zm/conf.d/99-local.conf" + ewarn " This includes any user created *.conf files for ZM within /etc/conf.d/" + ewarn " Then remove those old files to complete the migration." + ewarn "" + elog "" + elog "Remember to set appropriate permisions on user created files (i.e. /etc/zm/conf.d/*.conf):" + elog " chmod 640 local.conf" + elog " chown root:apache local.conf" + elog "" + ewarn "" + ewarn "ZoneMinder will **NO LONGER FUNCTION UNTIL** these configuration items have been migrated!" + ewarn "In particular, ensuring the database hostname and credentials are defined within the new locations." + ewarn "" + fi +} diff --git a/www-misc/zoneminder/zoneminder-1.36.24.ebuild b/www-misc/zoneminder/zoneminder-1.36.24.ebuild new file mode 100644 index 0000000..98a25d6 --- /dev/null +++ b/www-misc/zoneminder/zoneminder-1.36.24.ebuild @@ -0,0 +1,220 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit perl-functions readme.gentoo-r1 cmake flag-o-matic systemd + +MY_PN="ZoneMinder" +MY_CRUD_V="3.0" +MY_CAKEPHP_V="master" +MY_RTSP_V="master" + +DESCRIPTION="full-featured, open source, state-of-the-art video surveillance software system" +HOMEPAGE="http://www.zoneminder.com/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ZoneMinder/zoneminder" +else + SRC_URI=" + https://github.com/${MY_PN}/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/FriendsOfCake/crud/archive/refs/heads/${MY_CRUD_V}.zip -> Crud-${MY_CRUD_V}.zip + https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/refs/heads/${MY_CAKEPHP_V}.zip -> CakePHP-Enum-Behavior-${MY_CAKEPHP_V}.zip + https://github.com/ZoneMinder/RtspServer/archive/refs/heads/${MY_RTSP_V}.zip -> RtspServer-${MY_RTSP_V}.zip" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +IUSE="curl encode gcrypt gnutls +mmap +ssl vlc" +SLOT="0" +REQUIRED_USE=" + || ( ssl gnutls ) +" + +DEPEND=" +app-eselect/eselect-php[apache2] +dev-lang/perl:= +dev-lang/php:*[apache2,cgi,curl,gd,inifile,intl,pdo,mysql,mysqli,sockets,sysvipc] +dev-libs/libpcre +dev-perl/Archive-Zip +dev-perl/Class-Std-Fast +dev-perl/Data-Dump +dev-perl/Date-Manip +dev-perl/Data-UUID +dev-perl/DBD-mysql +dev-perl/DBI +dev-perl/IO-Socket-Multicast +dev-perl/SOAP-WSDL +dev-perl/Sys-CPU +dev-perl/Sys-MemInfo +dev-perl/URI-Encode +dev-perl/libwww-perl +dev-perl/Number-Bytes-Human +dev-perl/JSON-MaybeXS +dev-perl/Crypt-Eksblowfish +dev-perl/Data-Entropy +dev-perl/HTTP-Lite +dev-perl/MIME-Lite +dev-perl/X10 +dev-perl/DateTime +dev-perl/Device-SerialPort +dev-php/pecl-apcu:* +sys-auth/polkit +sys-libs/zlib +media-video/ffmpeg[x264,x265,jpeg2k] +encode? ( media-libs/libmp4v2 ) +virtual/httpd-php:* +media-libs/openjpeg +virtual/perl-ExtUtils-MakeMaker +virtual/perl-Getopt-Long +virtual/perl-Sys-Syslog +virtual/perl-Time-HiRes +www-servers/apache +curl? ( net-misc/curl ) +gcrypt? ( dev-libs/libgcrypt:0= ) +gnutls? ( net-libs/gnutls ) +mmap? ( dev-perl/Sys-Mmap ) +ssl? ( dev-libs/openssl:0= ) +vlc? ( media-video/vlc[live] ) +" +RDEPEND="${DEPEND}" + +MY_ZM_WEBDIR=/usr/share/zoneminder/www + +src_prepare() { + cmake_src_prepare + + rm "${WORKDIR}/${P}/conf.d/README" || die + + if [[ ${PV} != 9999 ]]; then + rmdir "${S}/web/api/app/Plugin/Crud" || die + mv "${WORKDIR}/crud-${MY_CRUD_V}" "${S}/web/api/app/Plugin/Crud" || die + + rmdir "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + mv "${WORKDIR}/CakePHP-Enum-Behavior-${MY_CAKEPHP_V}" "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + + rmdir "${S}/dep/RtspServer" || die + mv "${WORKDIR}/RtspServer-${MY_RTSP_V}" "${S}/dep/RtspServer" || die + fi +} + +src_configure() { + append-cxxflags -D__STDC_CONSTANT_MACROS + perl_set_version + export TZ=UTC # bug 630470 + mycmakeargs=( + -DZM_TMPDIR=/var/tmp/zm + -DZM_SOCKDIR=/var/run/zm + -DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" + -DZM_CONFIG_DIR="/etc/zm" + -DZM_CONFIG_SUBDIR="/etc/zm/conf.d" + -DZM_WEB_USER=apache + -DZM_WEB_GROUP=apache + -DZM_WEBDIR=${MY_ZM_WEBDIR} + -DZM_NO_MMAP="$(usex mmap OFF ON)" + -DZM_NO_X10=OFF + -DZM_NO_CURL="$(usex curl OFF ON)" + -DZM_NO_LIBVLC="$(usex vlc OFF ON)" + -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" + -DHAVE_LIBGNUTLS="$(usex gnutls ON OFF)" + -DHAVE_LIBGCRYPT="$(usex gcrypt ON OFF)" + ) + + cmake_src_configure + +} + +src_install() { + cmake_src_install + + docompress -x /usr/share/man + + # the log directory + keepdir /var/log/zm + fowners apache:apache /var/log/zm + + # the logrotate script + insinto /etc/logrotate.d + newins distros/ubuntu2004/zoneminder.logrotate zoneminder + + # now we duplicate the work of zmlinkcontent.sh + keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/zoneminder/api_tmp + fperms -R 0775 /var/lib/zoneminder + fowners -R apache:apache /var/lib/zoneminder + dosym ../../../../../../var/lib/zoneminder/api_tmp ${MY_ZM_WEBDIR}/api/app/tmp + + # bug 523058 + keepdir ${MY_ZM_WEBDIR}/temp + fowners -R apache:apache ${MY_ZM_WEBDIR}/temp + + # the configuration file + fperms 0640 /etc/zm/zm.conf + fowners root:apache /etc/zm/zm.conf + + # init scripts etc + newinitd "${FILESDIR}"/init.d zoneminder + newconfd "${FILESDIR}"/conf.d zoneminder + + # systemd unit file + systemd_dounit "${FILESDIR}"/zoneminder.service + + # apache2 conf file + cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf || die + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die + insinto /etc/apache2/vhosts.d + doins "${T}"/10_zoneminder.conf + + dodoc CHANGELOG.md CONTRIBUTING.md README.md "${T}"/10_zoneminder.conf + + perl_delete_packlist + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "Fresh installs of zoneminder require a few additional steps. Please read the README.gentoo" + else + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test ${PV} -gt ${v}; then + elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." + fi + done + fi + + # 2022-02-10 The original ebuild omitted ZM_CONFIG_* at build time + # Check if user needs to migrate configs from /etc to /etc/zm + local legacy="/etc/zm.conf /etc/conf.d/01-system-paths.conf /etc/conf.d/02-multiserver.conf /etc/conf.d/zmcustom.conf" + local lf + local lfwarn=0 + for lf in ${legacy}; do + if [[ -f "${lf}" ]]; then + ewarn "Found deprecated ZoneMinder config ${lf}" + lfwarn=1 + fi + done + if [ ${lfwarn} -ne 0 ]; then + ewarn "" + ewarn "Gentoo's ebuild previously installed ZoneMinder's configurations directly into /etc" + ewarn "This conflicts with OpenRC /etc/conf.d as ZoneMinder also has its own conf.d subdirectory" + ewarn "Your newly compiled ZoneMinder now looks for configurations under /etc/zm" + ewarn "" + ewarn " Please merge your local changes into /etc/zm/conf.d/99-local.conf" + ewarn " This includes any user created *.conf files for ZM within /etc/conf.d/" + ewarn " Then remove those old files to complete the migration." + ewarn "" + elog "" + elog "Remember to set appropriate permisions on user created files (i.e. /etc/zm/conf.d/*.conf):" + elog " chmod 640 local.conf" + elog " chown root:apache local.conf" + elog "" + ewarn "" + ewarn "ZoneMinder will **NO LONGER FUNCTION UNTIL** these configuration items have been migrated!" + ewarn "In particular, ensuring the database hostname and credentials are defined within the new locations." + ewarn "" + fi +} diff --git a/www-misc/zoneminder/zoneminder-9999.ebuild b/www-misc/zoneminder/zoneminder-9999.ebuild new file mode 100644 index 0000000..98a25d6 --- /dev/null +++ b/www-misc/zoneminder/zoneminder-9999.ebuild @@ -0,0 +1,220 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit perl-functions readme.gentoo-r1 cmake flag-o-matic systemd + +MY_PN="ZoneMinder" +MY_CRUD_V="3.0" +MY_CAKEPHP_V="master" +MY_RTSP_V="master" + +DESCRIPTION="full-featured, open source, state-of-the-art video surveillance software system" +HOMEPAGE="http://www.zoneminder.com/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ZoneMinder/zoneminder" +else + SRC_URI=" + https://github.com/${MY_PN}/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/FriendsOfCake/crud/archive/refs/heads/${MY_CRUD_V}.zip -> Crud-${MY_CRUD_V}.zip + https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/refs/heads/${MY_CAKEPHP_V}.zip -> CakePHP-Enum-Behavior-${MY_CAKEPHP_V}.zip + https://github.com/ZoneMinder/RtspServer/archive/refs/heads/${MY_RTSP_V}.zip -> RtspServer-${MY_RTSP_V}.zip" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-2" +IUSE="curl encode gcrypt gnutls +mmap +ssl vlc" +SLOT="0" +REQUIRED_USE=" + || ( ssl gnutls ) +" + +DEPEND=" +app-eselect/eselect-php[apache2] +dev-lang/perl:= +dev-lang/php:*[apache2,cgi,curl,gd,inifile,intl,pdo,mysql,mysqli,sockets,sysvipc] +dev-libs/libpcre +dev-perl/Archive-Zip +dev-perl/Class-Std-Fast +dev-perl/Data-Dump +dev-perl/Date-Manip +dev-perl/Data-UUID +dev-perl/DBD-mysql +dev-perl/DBI +dev-perl/IO-Socket-Multicast +dev-perl/SOAP-WSDL +dev-perl/Sys-CPU +dev-perl/Sys-MemInfo +dev-perl/URI-Encode +dev-perl/libwww-perl +dev-perl/Number-Bytes-Human +dev-perl/JSON-MaybeXS +dev-perl/Crypt-Eksblowfish +dev-perl/Data-Entropy +dev-perl/HTTP-Lite +dev-perl/MIME-Lite +dev-perl/X10 +dev-perl/DateTime +dev-perl/Device-SerialPort +dev-php/pecl-apcu:* +sys-auth/polkit +sys-libs/zlib +media-video/ffmpeg[x264,x265,jpeg2k] +encode? ( media-libs/libmp4v2 ) +virtual/httpd-php:* +media-libs/openjpeg +virtual/perl-ExtUtils-MakeMaker +virtual/perl-Getopt-Long +virtual/perl-Sys-Syslog +virtual/perl-Time-HiRes +www-servers/apache +curl? ( net-misc/curl ) +gcrypt? ( dev-libs/libgcrypt:0= ) +gnutls? ( net-libs/gnutls ) +mmap? ( dev-perl/Sys-Mmap ) +ssl? ( dev-libs/openssl:0= ) +vlc? ( media-video/vlc[live] ) +" +RDEPEND="${DEPEND}" + +MY_ZM_WEBDIR=/usr/share/zoneminder/www + +src_prepare() { + cmake_src_prepare + + rm "${WORKDIR}/${P}/conf.d/README" || die + + if [[ ${PV} != 9999 ]]; then + rmdir "${S}/web/api/app/Plugin/Crud" || die + mv "${WORKDIR}/crud-${MY_CRUD_V}" "${S}/web/api/app/Plugin/Crud" || die + + rmdir "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + mv "${WORKDIR}/CakePHP-Enum-Behavior-${MY_CAKEPHP_V}" "${S}/web/api/app/Plugin/CakePHP-Enum-Behavior" || die + + rmdir "${S}/dep/RtspServer" || die + mv "${WORKDIR}/RtspServer-${MY_RTSP_V}" "${S}/dep/RtspServer" || die + fi +} + +src_configure() { + append-cxxflags -D__STDC_CONSTANT_MACROS + perl_set_version + export TZ=UTC # bug 630470 + mycmakeargs=( + -DZM_TMPDIR=/var/tmp/zm + -DZM_SOCKDIR=/var/run/zm + -DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" + -DZM_CONFIG_DIR="/etc/zm" + -DZM_CONFIG_SUBDIR="/etc/zm/conf.d" + -DZM_WEB_USER=apache + -DZM_WEB_GROUP=apache + -DZM_WEBDIR=${MY_ZM_WEBDIR} + -DZM_NO_MMAP="$(usex mmap OFF ON)" + -DZM_NO_X10=OFF + -DZM_NO_CURL="$(usex curl OFF ON)" + -DZM_NO_LIBVLC="$(usex vlc OFF ON)" + -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" + -DHAVE_LIBGNUTLS="$(usex gnutls ON OFF)" + -DHAVE_LIBGCRYPT="$(usex gcrypt ON OFF)" + ) + + cmake_src_configure + +} + +src_install() { + cmake_src_install + + docompress -x /usr/share/man + + # the log directory + keepdir /var/log/zm + fowners apache:apache /var/log/zm + + # the logrotate script + insinto /etc/logrotate.d + newins distros/ubuntu2004/zoneminder.logrotate zoneminder + + # now we duplicate the work of zmlinkcontent.sh + keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/zoneminder/api_tmp + fperms -R 0775 /var/lib/zoneminder + fowners -R apache:apache /var/lib/zoneminder + dosym ../../../../../../var/lib/zoneminder/api_tmp ${MY_ZM_WEBDIR}/api/app/tmp + + # bug 523058 + keepdir ${MY_ZM_WEBDIR}/temp + fowners -R apache:apache ${MY_ZM_WEBDIR}/temp + + # the configuration file + fperms 0640 /etc/zm/zm.conf + fowners root:apache /etc/zm/zm.conf + + # init scripts etc + newinitd "${FILESDIR}"/init.d zoneminder + newconfd "${FILESDIR}"/conf.d zoneminder + + # systemd unit file + systemd_dounit "${FILESDIR}"/zoneminder.service + + # apache2 conf file + cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf || die + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die + insinto /etc/apache2/vhosts.d + doins "${T}"/10_zoneminder.conf + + dodoc CHANGELOG.md CONTRIBUTING.md README.md "${T}"/10_zoneminder.conf + + perl_delete_packlist + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "Fresh installs of zoneminder require a few additional steps. Please read the README.gentoo" + else + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test ${PV} -gt ${v}; then + elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." + fi + done + fi + + # 2022-02-10 The original ebuild omitted ZM_CONFIG_* at build time + # Check if user needs to migrate configs from /etc to /etc/zm + local legacy="/etc/zm.conf /etc/conf.d/01-system-paths.conf /etc/conf.d/02-multiserver.conf /etc/conf.d/zmcustom.conf" + local lf + local lfwarn=0 + for lf in ${legacy}; do + if [[ -f "${lf}" ]]; then + ewarn "Found deprecated ZoneMinder config ${lf}" + lfwarn=1 + fi + done + if [ ${lfwarn} -ne 0 ]; then + ewarn "" + ewarn "Gentoo's ebuild previously installed ZoneMinder's configurations directly into /etc" + ewarn "This conflicts with OpenRC /etc/conf.d as ZoneMinder also has its own conf.d subdirectory" + ewarn "Your newly compiled ZoneMinder now looks for configurations under /etc/zm" + ewarn "" + ewarn " Please merge your local changes into /etc/zm/conf.d/99-local.conf" + ewarn " This includes any user created *.conf files for ZM within /etc/conf.d/" + ewarn " Then remove those old files to complete the migration." + ewarn "" + elog "" + elog "Remember to set appropriate permisions on user created files (i.e. /etc/zm/conf.d/*.conf):" + elog " chmod 640 local.conf" + elog " chown root:apache local.conf" + elog "" + ewarn "" + ewarn "ZoneMinder will **NO LONGER FUNCTION UNTIL** these configuration items have been migrated!" + ewarn "In particular, ensuring the database hostname and credentials are defined within the new locations." + ewarn "" + fi +}