From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- www-misc/zoneminder/Manifest | 19 +++ www-misc/zoneminder/files/10_zoneminder.conf | 18 +++ www-misc/zoneminder/files/10_zoneminder.conf-r1 | 17 ++ www-misc/zoneminder/files/README.gentoo | 27 ++++ www-misc/zoneminder/files/conf.d | 6 + www-misc/zoneminder/files/init.d | 25 +++ .../files/zoneminder-1.26.5-automagic.patch | 34 ++++ .../zoneminder-1.28.1-mysql_include_path.patch | 20 +++ .../files/zoneminder-1.30.2-diskspace.patch | 15 ++ www-misc/zoneminder/files/zoneminder.service | 11 ++ www-misc/zoneminder/metadata.xml | 16 ++ www-misc/zoneminder/zoneminder-1.30.0.ebuild | 176 ++++++++++++++++++++ www-misc/zoneminder/zoneminder-1.30.2-r1.ebuild | 177 +++++++++++++++++++++ www-misc/zoneminder/zoneminder-1.30.2.ebuild | 176 ++++++++++++++++++++ 14 files changed, 737 insertions(+) create mode 100644 www-misc/zoneminder/Manifest create mode 100644 www-misc/zoneminder/files/10_zoneminder.conf create mode 100644 www-misc/zoneminder/files/10_zoneminder.conf-r1 create mode 100644 www-misc/zoneminder/files/README.gentoo create mode 100644 www-misc/zoneminder/files/conf.d create mode 100644 www-misc/zoneminder/files/init.d create mode 100644 www-misc/zoneminder/files/zoneminder-1.26.5-automagic.patch create mode 100644 www-misc/zoneminder/files/zoneminder-1.28.1-mysql_include_path.patch create mode 100644 www-misc/zoneminder/files/zoneminder-1.30.2-diskspace.patch create mode 100644 www-misc/zoneminder/files/zoneminder.service create mode 100644 www-misc/zoneminder/metadata.xml create mode 100644 www-misc/zoneminder/zoneminder-1.30.0.ebuild create mode 100644 www-misc/zoneminder/zoneminder-1.30.2-r1.ebuild create mode 100644 www-misc/zoneminder/zoneminder-1.30.2.ebuild (limited to 'www-misc/zoneminder') diff --git a/www-misc/zoneminder/Manifest b/www-misc/zoneminder/Manifest new file mode 100644 index 000000000000..3cb50f26c1c6 --- /dev/null +++ b/www-misc/zoneminder/Manifest @@ -0,0 +1,19 @@ +AUX 10_zoneminder.conf 444 SHA256 a8e3642eb6abbbbccd3dca354eef53314d10e9cba98bb886e9ac8efb1d9c6d65 SHA512 e8e13da2c6c9262fe52eb4de59c0f0b56ee51d7ef21596c36215b237f8379cb9a365afc19913b231262082b0792f8e9673626b95c3927e6e56f3d54b22ffa635 WHIRLPOOL c3f12e51e10e9c06210ffc634d79504d135cfb74b6cf19d8c89c5bbcda21c36f1b71c292ed37733d637c3250d4a88cf1ae329abd4fad198bce5a030a9ada178a +AUX 10_zoneminder.conf-r1 370 SHA256 8157bd7d04c50d28fe801d165a322e2b648b237c27230395c95375cad5b64c99 SHA512 8e0117a2d3f7b5b2266850d5965280fec3787c8769e278c65e5d34edcdc81b1e7fe0ad34b2315f23e3dd8cdec03c4555e594e184efcac0ed2028b8f62c346b25 WHIRLPOOL d1229b06e8ff9464efb76e26c2eb9f76b701f1cb228a07385f724f5897e82f9d1032e4e3a24bb8b5327b3b66cf8bbc975e1c1bb498115d4bff02ebb485643ad0 +AUX README.gentoo 1140 SHA256 d603fabbaa5e81275c3705fb85fa47f45a64e0d7e4e3848527a0c751198d5130 SHA512 302973faebe204fcd75910b8f03eed3d13f5ff733be376849487af1e6f39e834e4d6646c0750c3b9f182fdf098560de9780518aee46e524aaecbf1d950268dd2 WHIRLPOOL 796255267bcab57999515908366f1bf3d6fd5e8e153bf7606d1783eea6b8d380512a9c2427c129185c6be990009c97171165422e6d7560b677edd31ee35a04c3 +AUX conf.d 138 SHA256 65e935cb63bf3d072b9317842944d808550ef3f933d834bb95aaacf3253bd85c SHA512 66a3447869a5c7ed613a90a81ae3b0464836a8d1804b195770dd4832e61e89f826998f58dba1ce42d7d411c543d485290e670b0bf929646ad99f48a996bc609a WHIRLPOOL 9e2326d83fd63bd1ad38485024017813ff18c73d6b173c4f38506247dbbead97f5fbcde805966f3056131cb75bac250d74f7c048ac2d7bac54e78ef66faa65c7 +AUX init.d 415 SHA256 1c934962f7b6f5dfcd038e5f6045776a178cae119f0ee3137219112dee6cdd67 SHA512 97ab5d9ddf450241513be6a778bcb346e449b3dab4d6b3d55be41dfe7bb48233a08a598f4306e2f9b35336ab14021b2a2b0e68ddef83bb121f720e11cfcd0bb5 WHIRLPOOL 9baa3f1e0a5f6d6dad622ca1e073f5433315848717b553568a18f4c04012d06bdd05f0588d10443581ad007180a657ff4d70111012c0899369f05ff17ff3d49e +AUX zoneminder-1.26.5-automagic.patch 1064 SHA256 44b88912f3f98b7e9eddeb78890bef3dffe44c7475ebd3b7ec70354db4f0f33f SHA512 3bd257233d7b5a376418fed1285bd82aa69e83461251bd941a756acbf87189e23fe3b82c56105d12b90fd5d294ce9708dc8895440fc0f154f4590385fa42e657 WHIRLPOOL 3f495ada57e73d918784eb17bddd770898c1aa4f13294b600b5740b3d6fd5a1113a984b2c3de92cf2790ff1bba23ecd7646f36716951701fdb461bfb0e70de7c +AUX zoneminder-1.28.1-mysql_include_path.patch 774 SHA256 6b6a7901dc4e13ee4052d8047c829cd15fab1f41eb8e9447404efeca5c05342c SHA512 98088b9578bee1343621231c4f4142d5c82a559177ba359911ff1919328ba1032f52bf820acf5a15e8d7f331187d7d62e3efd578e62b83a465b26a3c7d4d5a28 WHIRLPOOL 90c085f4882e55e1189cf3f87a0586ef5830c33fe8211047763e1319c40bfc7772ce752b89fa136b18d3ec2ad38895ae860bcd4b4c5cd6852bb42d7d25e6a2c1 +AUX zoneminder-1.30.2-diskspace.patch 709 SHA256 80540517427b3b0be9b26e0340cd052f4eeeee99f76696c424a051970343d53d SHA512 e6fee1a1c1319fe55f271abf729f06d75bcdb97abe2fab3e426b51698b79384f894d48501b1f47c274425bc09e56ad59fb780ab5e51bc8b8f31cd9c8f152392a WHIRLPOOL 44f19fb0540bbc5859c21392d7e0a8bfea263ec4c325d747636cef9b6b63131bd4acb898204c6efc92b73416d81f8363f8b71f8d3d5aa7c689d51e3e7f7c5e07 +AUX zoneminder.service 212 SHA256 4dff49a15f4a926bf0cfe7be5600cce3047c9e223fe2d300455cfdb41b18021a SHA512 3824076594e18ee89ca28e622f87bf9bd51156d0ef9d71fe8d20d69b682ecf8c96fb779cbaf33f1709aec0ec9fd1b5448b8524c781510718549282e68c095a90 WHIRLPOOL 83ad97950652136f1b4c9fbd5377f75a1dd083a726285700fb9708f640f0e968a747e4eb9ace2dfb440eaf9beeddc5696173df44cf9d96fd930a22cef882674f +DIST Crud-3.0.10.tar.gz 72960 SHA256 462d05e21d17cc6b11cdc441971d1a7f07688512b5f7903217a574c6c39efd91 SHA512 2f60557f2c783bb448e06c1ca40b536a1d7d5f3caf0626fa6716a28f808492d4799e238f16c022571be96921105b074b6763920fd7b9cc77b76d17ceadae2040 WHIRLPOOL 6c8d78dd30e8373a2b014fe4f6d17a4e2ec1051a6dc09d8b0759c6cd76ae78cb633e2c1eaab125aa29e66903de201337da979b3e412e8861a2431588251d817b +DIST Crud-3.1.0.tar.gz 72993 SHA256 e30a916c04ca282509c728c0b0e48fa62a3036f2d735cc9b7ea810947d81259f SHA512 7ec84afaa336b1bd582b7f39724f77081bdb3008947c4124ad96e4bc7755a03fbe31e01666d4d1939ebe17b342db37bf3766a42d88fbed0e99706807ff5b9d01 WHIRLPOOL 8be4760c112bc8f0b08bf2b5f274113ef2203c8b21da39a1aa9f85c89e30077fb5c697700b5e6e3ec02c77b302089773cdd3be0612cd75d25bca2a8326d496b5 +DIST zoneminder-1.30.0.tar.gz 9757409 SHA256 e7c964c339305f42a044ca8e34fa4e6a33c452fdaf33642458735daf8b864325 SHA512 cbff14447a568648a0475e878be5cd19cb694c65814fe33c20774752410e31f3f4ff9e5695667d4d50634b3193dc50aaca2d950efc151bbb968d3f9609d35db4 WHIRLPOOL af901055bb1ac9ae668fae23f80aff20632d6ee785e0fe5ab6f71f86fe6e1a8ca2e4dae919c1754ac84025f7bc614cc9cea7470209b2a7a35d3b27746eb9a46b +DIST zoneminder-1.30.2.tar.gz 9931753 SHA256 499277b295bdcc2bb38b562a9061fac171236536b88b590f948f4f41ad1f7b5c SHA512 98bd6d42ecc19bcd317a30e1a9c57bd6bd295593bcc6c12e2fbe1beddfe43fb0301e042323a88969fd5f7da1dc45a1c01324878837633e5a5ed4fa54bed8690a WHIRLPOOL 98b4882dcf6fddb25bc912f22766ad1cc7c374bfb74e76ceceb8c4392d7408057460ab07e4a3d370b1fb646d10f489d81685c8a7904f43c3756ed64fd46f194f +EBUILD zoneminder-1.30.0.ebuild 4523 SHA256 7ca2e28832dd4467138beccdaa11bfc3893e84ba67bd79b1724af2f5296c3d7e SHA512 9724891d672b12f7c216f767d882ff102940b21159612d0589b2e100a55977633a59a3f5970ca718d4ba8f536588641bd1caa410df42c0de37b0e80877d5cf8b WHIRLPOOL 0f48aad807b2efaca57a2a5dcaf435c72aa33d7c3f01938376bdc28eb43be54a316fe1ba1a9a6a8e9e04c173bfe3da1de746db2c4dd1d12cfd6e6e08468a078c +EBUILD zoneminder-1.30.2-r1.ebuild 4576 SHA256 d435256adbccc242679dd22415a4a6a0a06c93b82612b11639d21260f8e7218a SHA512 4e7ec33807f651d3d26a6ea6fb302d0b3ec82d070f80c2931ccfdb16653c86a7d6830d9492b89a50b2452ced89c71985afb1ab6912d4b087db26ee5882e9dfb5 WHIRLPOOL 3b67f8282a4010a19cd48f1d3a1c09d76f81dc0a3fdadd987646f9a8578dabe9d0465f63f072ac0b2fcdede5d15df99c066ff1486807f247b32d7912fd8380f2 +EBUILD zoneminder-1.30.2.ebuild 4521 SHA256 ac8ec3668a7faf94a185c8c805d9b9a8a70f41eb3af777213b0efe72a9609b58 SHA512 5ae0532f791ca26688714a6d6831a8c9b6af1411a95656ec8300c67121db563e173a752cdca6e8de94b3bd6228e80434f60f799e2a2ec76d5f4875d4e308b5d0 WHIRLPOOL dafac410ea7242f1a656eb4ea1db1a007c7874b1f6fbff72018ccb26addbdb4604e31218254c9ecb78016958c9e1e35ea20fed0241528f9c67ba0c63a7671b54 +MISC ChangeLog 4064 SHA256 3b8e9508a0cdebbad7c4d67e299cd141f6fdcef1038c46d0fb451957707501ad SHA512 ccabf9b8f93c4164b28f61db8d8cf979616a1345872dcbcc8e9eb232e15b5a75951061e9fddb0a695a603dd8c66221aeb7936a3027c3c19adb181f45b70a6fb9 WHIRLPOOL fa1debad5320d689814aa90a5fdfdfecc4252e9ca8ad254ca7d9736acab2526355631c90bdf3756604999fd69e0b6f97c99d1852186d1f9ae3137a2063538cce +MISC ChangeLog-2015 1340 SHA256 36c81f29e41d094defb8e75e6a51b6e4e3dd5fb90f14c04a392ce1cfc50bd744 SHA512 1a256e8d7701c11f6ee287ed904c38ef71cd6242d972bede05e64aaf5338a03535b1c5738e60d375e216f831dbd087dd9c609f268bd586c4dcd9996bc2cc2a32 WHIRLPOOL 803d704393f689ecc8c72a1f69e80ed2740db53045ff088f65f4451794096b4e50e1472ba8d93e40c5a883d697dc1dff03bfc8e7b56daa06e2453ee467dfad7f +MISC metadata.xml 550 SHA256 2c432fa716659641f1add09467f937161f7f5a0d588b1f0f3a9ca76198a0d757 SHA512 4b284af6cef7a77e824517e45fabcadabb7162e37c5fb39daeff99656697b340c421949e8508483c3fb209fa1db723383e751da79ddc3b7bfbea1af1de0310b1 WHIRLPOOL 2a588801b0050ca0c14e24676045d47aaa6c2d247969ca527b933e414320bd21d5b316fbe15b0004437c649f3cf22bffd907c8e43b5c19d9eb0c6e7384a01ef5 diff --git a/www-misc/zoneminder/files/10_zoneminder.conf b/www-misc/zoneminder/files/10_zoneminder.conf new file mode 100644 index 000000000000..277d680d24b4 --- /dev/null +++ b/www-misc/zoneminder/files/10_zoneminder.conf @@ -0,0 +1,18 @@ +ScriptAlias /cgi-bin/zms "/usr/libexec/zoneminder/cgi-bin/zms" +ScriptAlias /cgi-bin/nph-zms "/usr/libexec/zoneminder/cgi-bin/nph-zms" + + + AllowOverride All + Options ExecCGI + Order allow,deny + Allow from all + + +Alias /zoneminder "%ZM_WEBDIR%" + + + Options -Indexes MultiViews FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all + diff --git a/www-misc/zoneminder/files/10_zoneminder.conf-r1 b/www-misc/zoneminder/files/10_zoneminder.conf-r1 new file mode 100644 index 000000000000..441c793d1890 --- /dev/null +++ b/www-misc/zoneminder/files/10_zoneminder.conf-r1 @@ -0,0 +1,17 @@ +ScriptAlias /zm/cgi-bin/ "/usr/libexec/zoneminder/cgi-bin/" + + + AllowOverride All + Options ExecCGI + Order allow,deny + Allow from all + + +Alias /zoneminder "%ZM_WEBDIR%" + + + Options -Indexes MultiViews FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all + diff --git a/www-misc/zoneminder/files/README.gentoo b/www-misc/zoneminder/files/README.gentoo new file mode 100644 index 000000000000..07995214d1cf --- /dev/null +++ b/www-misc/zoneminder/files/README.gentoo @@ -0,0 +1,27 @@ +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 ALL ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'topsecretpassword'; + Once you completed that you should execute the following: + cd /usr/share/zoneminder + mysql -u zmuser -p < db/zm_create.sql + +2. Set your database settings in /etc/zm.conf, including above topsecretpassword + +3. Configure apache to use zoneminder, see /usr/share/doc/zoneminder*/10_zoneminder.conf + for an example configuration snippet. + +4. Enable PHP in your webserver configuration, + enable short_open_tags in php.ini (likely on by default now) + set the time zone in php.ini, + and restart/reload the webserver. + +5. Start the zoneminder daemon: + /etc/init.d/zoneminder start + +6. Finally point your browser to http://your.webserver/zm + +If you are upgrading, you will need to run the zmupdate.pl script: + /usr/bin/zmupdate.pl --version=oldversionnumber [--user=zmuser --pass=topsecretpassword] diff --git a/www-misc/zoneminder/files/conf.d b/www-misc/zoneminder/files/conf.d new file mode 100644 index 000000000000..d2e03363867a --- /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 000000000000..6ee8a160155e --- /dev/null +++ b/www-misc/zoneminder/files/init.d @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need 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 +} + +start() { + ebegin "Starting zoneminder" + ${CMD_START} + eend $? +} + +stop() { + ebegin "Stopping zoneminder" + ${CMD_STOP} + eend $? +} diff --git a/www-misc/zoneminder/files/zoneminder-1.26.5-automagic.patch b/www-misc/zoneminder/files/zoneminder-1.26.5-automagic.patch new file mode 100644 index 000000000000..266bd649baa6 --- /dev/null +++ b/www-misc/zoneminder/files/zoneminder-1.26.5-automagic.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 83e9d81..8619c8b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -171,6 +171,7 @@ else(PCRE_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} PCRE") + endif(PCRE_LIBRARIES) + ++if(HAVE_GCRYPT) + # gcrypt (using find_library and find_path) + find_library(GCRYPT_LIBRARIES gcrypt) + if(GCRYPT_LIBRARIES) +@@ -187,7 +188,11 @@ if(GCRYPT_LIBRARIES) + else(GCRYPT_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} GCrypt") + endif(GCRYPT_LIBRARIES) ++else(HAVE_GCRYPT) ++ set(optlibsnotfound "${optlibsnotfound} GCrypt") ++endif(HAVE_GCRYPT) + ++if(HAVE_GNUTLS) + # gnutls (using find_library and find_path) + find_library(GNUTLS_LIBRARIES gnutls) + if(GNUTLS_LIBRARIES) +@@ -205,6 +210,9 @@ if(GNUTLS_LIBRARIES) + else(GNUTLS_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} GnuTLS") + endif(GNUTLS_LIBRARIES) ++else(HAVE_GNUTLS) ++ set(optlibsnotfound "${optlibsnotfound} GnuTLS") ++endif(HAVE_GNUTLS) + + # mysqlclient (using find_library and find_path) + find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql) diff --git a/www-misc/zoneminder/files/zoneminder-1.28.1-mysql_include_path.patch b/www-misc/zoneminder/files/zoneminder-1.28.1-mysql_include_path.patch new file mode 100644 index 000000000000..cb645528c051 --- /dev/null +++ b/www-misc/zoneminder/files/zoneminder-1.28.1-mysql_include_path.patch @@ -0,0 +1,20 @@ +--- a/CMakeLists.txt 2015-10-27 17:28:48.059203421 +0000 ++++ b/CMakeLists.txt 2015-10-27 17:30:11.951226715 +0000 +@@ -255,7 +255,16 @@ + if(MYSQLCLIENT_LIBRARIES) + set(HAVE_LIBMYSQLCLIENT 1) + list(APPEND ZM_BIN_LIBS "${MYSQLCLIENT_LIBRARIES}") +- find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql.h) ++ find_file(MYSQL_CONFIG mysql_config) ++ if(MYSQL_CONFIG) ++ execute_process(COMMAND ${MYSQL_CONFIG} ++ --variable=pkgincludedir OUTPUT_VARIABLE ++ MYSQLCLIENT_INCLUDE_DIR) ++ STRING(REGEX REPLACE "\n" "" MYSQLCLIENT_INCLUDE_DIR ++ ${MYSQLCLIENT_INCLUDE_DIR}) ++ else() ++ find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql.h) ++ endif() + if(MYSQLCLIENT_INCLUDE_DIR) + include_directories("${MYSQLCLIENT_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${MYSQLCLIENT_INCLUDE_DIR}") diff --git a/www-misc/zoneminder/files/zoneminder-1.30.2-diskspace.patch b/www-misc/zoneminder/files/zoneminder-1.30.2-diskspace.patch new file mode 100644 index 000000000000..fee5b783c356 --- /dev/null +++ b/www-misc/zoneminder/files/zoneminder-1.30.2-diskspace.patch @@ -0,0 +1,15 @@ +https://forums.zoneminder.com/viewtopic.php?t=24534 +& personal message by simon@rustyspoon.co_m + +diff -ruN ZoneMinder-1.30.2.orig/web/includes/functions.php ZoneMinder-1.30.2/web/includes/functions.php +--- ZoneMinder-1.30.2.orig/web/includes/functions.php 2017-03-30 20:43:06.000000000 +0200 ++++ ZoneMinder-1.30.2/web/includes/functions.php 2017-04-16 21:13:43.841371345 +0200 +@@ -1442,7 +1442,7 @@ + return( $load[0] ); + } + +-function getDiskPercent($path = ZM_DIR_EVENTS) { ++function getDiskPercent($path = ZM_PATH_WEB.'/'.ZM_DIR_EVENTS) { + $total = disk_total_space($path); + if ( $total === false ) { + Error("disk_total_space returned false. Verify the web account user has access to " . $path ); diff --git a/www-misc/zoneminder/files/zoneminder.service b/www-misc/zoneminder/files/zoneminder.service new file mode 100644 index 000000000000..9ef5bc6ee552 --- /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 000000000000..7c8aa13b6d80 --- /dev/null +++ b/www-misc/zoneminder/metadata.xml @@ -0,0 +1,16 @@ + + + + + dilfridge@gentoo.org + Andreas K. Huettel + + + 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.30.0.ebuild b/www-misc/zoneminder/zoneminder-1.30.0.ebuild new file mode 100644 index 000000000000..2698565ed30b --- /dev/null +++ b/www-misc/zoneminder/zoneminder-1.30.0.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# TO DO: +# * dependencies of unknown status: +# dev-perl/Device-SerialPort +# dev-perl/MIME-Lite +# dev-perl/MIME-tools +# dev-perl/PHP-Serialization +# virtual/perl-Archive-Tar +# virtual/perl-libnet +# virtual/perl-Module-Load + +EAPI=6 + +inherit versionator perl-functions readme.gentoo-r1 cmake-utils depend.apache flag-o-matic systemd + +MY_PN="ZoneMinder" + +MY_CRUD_VERSION="3.0.10" + +DESCRIPTION="Capture, analyse, record and monitor any cameras attached to your system" +HOMEPAGE="http://www.zoneminder.com/" +SRC_URI=" + https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/FriendsOfCake/crud/archive/v${MY_CRUD_VERSION}.tar.gz -> Crud-${MY_CRUD_VERSION}.tar.gz +" + +LICENSE="GPL-2" +KEYWORDS="~amd64" +IUSE="curl ffmpeg gcrypt gnutls +mmap +ssl libressl 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] + 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 + sys-auth/polkit + sys-libs/zlib + virtual/ffmpeg + virtual/httpd-php:* + virtual/jpeg:0 + virtual/mysql + 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? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + vlc? ( media-video/vlc[live] ) +" +RDEPEND="${DEPEND}" + +# we cannot use need_httpd_cgi here, since we need to setup permissions for the +# webserver in global scope (/etc/zm.conf etc), so we hardcode apache here. +need_apache + +S=${WORKDIR}/${MY_PN}-${PV} + +PATCHES=( + "${FILESDIR}/${PN}-1.26.5"-automagic.patch + "${FILESDIR}/${PN}-1.28.1"-mysql_include_path.patch +) + +MY_ZM_WEBDIR=/usr/share/zoneminder/www + +src_prepare() { + cmake-utils_src_prepare + + rmdir "${S}/web/api/app/Plugin/Crud" || die + mv "${WORKDIR}/crud-${MY_CRUD_VERSION}" "${S}/web/api/app/Plugin/Crud" || die +} + +src_configure() { + append-cxxflags -D__STDC_CONSTANT_MACROS + perl_set_version + + mycmakeargs=( + -DZM_PERL_SUBPREFIX=${VENDOR_LIB#/usr} + -DZM_TMPDIR=/var/tmp/zm + -DZM_SOCKDIR=/var/run/zm + -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_FFMPEG="$(usex ffmpeg OFF ON)" + -DZM_NO_CURL="$(usex curl OFF ON)" + -DZM_NO_LIBVLC="$(usex vlc OFF ON)" + -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" + -DHAVE_GNUTLS="$(usex gnutls ON OFF)" + -DHAVE_GCRYPT="$(usex gcrypt ON OFF)" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # the log directory + keepdir /var/log/zm + fowners apache:apache /var/log/zm + + # the logrotate script + insinto /etc/logrotate.d + newins distros/ubuntu1204/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/images ${MY_ZM_WEBDIR}/images + dosym /var/lib/zoneminder/events ${MY_ZM_WEBDIR}/events + 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.conf + fowners root:apache /etc/zm.conf + + # init scripts etc + newinitd "${FILESDIR}"/init.d zoneminder + newconfd "${FILESDIR}"/conf.d zoneminder + + # systemd unit file + systemd_dounit "${FILESDIR}"/zoneminder.service + + cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" + + dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README.md TODO "${T}"/10_zoneminder.conf + + perl_delete_packlist + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least ${PV} ${v}; then + elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." + fi + done +} diff --git a/www-misc/zoneminder/zoneminder-1.30.2-r1.ebuild b/www-misc/zoneminder/zoneminder-1.30.2-r1.ebuild new file mode 100644 index 000000000000..d37f30cc0bf8 --- /dev/null +++ b/www-misc/zoneminder/zoneminder-1.30.2-r1.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# TO DO: +# * dependencies of unknown status: +# dev-perl/Device-SerialPort +# dev-perl/MIME-Lite +# dev-perl/MIME-tools +# dev-perl/PHP-Serialization +# virtual/perl-Archive-Tar +# virtual/perl-libnet +# virtual/perl-Module-Load + +EAPI=6 + +inherit versionator perl-functions readme.gentoo-r1 cmake-utils depend.apache flag-o-matic systemd + +MY_PN="ZoneMinder" + +MY_CRUD_VERSION="3.1.0" + +DESCRIPTION="Capture, analyse, record and monitor any cameras attached to your system" +HOMEPAGE="http://www.zoneminder.com/" +SRC_URI=" + https://github.com/${MY_PN}/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/FriendsOfCake/crud/archive/v${MY_CRUD_VERSION}.tar.gz -> Crud-${MY_CRUD_VERSION}.tar.gz +" + +LICENSE="GPL-2" +KEYWORDS="" +IUSE="curl ffmpeg gcrypt gnutls +mmap +ssl libressl 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] + 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 + sys-auth/polkit + sys-libs/zlib + virtual/ffmpeg + virtual/httpd-php:* + virtual/jpeg:0 + virtual/mysql + 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? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + vlc? ( media-video/vlc[live] ) +" +RDEPEND="${DEPEND}" + +# we cannot use need_httpd_cgi here, since we need to setup permissions for the +# webserver in global scope (/etc/zm.conf etc), so we hardcode apache here. +need_apache + +S=${WORKDIR}/${MY_PN}-${PV} + +PATCHES=( + "${FILESDIR}/${PN}-1.26.5"-automagic.patch + "${FILESDIR}/${PN}-1.28.1"-mysql_include_path.patch + "${FILESDIR}/${PN}-1.30.2"-diskspace.patch +) + +MY_ZM_WEBDIR=/usr/share/zoneminder/www + +src_prepare() { + cmake-utils_src_prepare + + rmdir "${S}/web/api/app/Plugin/Crud" || die + mv "${WORKDIR}/crud-${MY_CRUD_VERSION}" "${S}/web/api/app/Plugin/Crud" || die +} + +src_configure() { + append-cxxflags -D__STDC_CONSTANT_MACROS + perl_set_version + + mycmakeargs=( + -DZM_PERL_SUBPREFIX=${VENDOR_LIB#/usr} + -DZM_TMPDIR=/var/tmp/zm + -DZM_SOCKDIR=/var/run/zm + -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_FFMPEG="$(usex ffmpeg OFF ON)" + -DZM_NO_CURL="$(usex curl OFF ON)" + -DZM_NO_LIBVLC="$(usex vlc OFF ON)" + -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" + -DHAVE_GNUTLS="$(usex gnutls ON OFF)" + -DHAVE_GCRYPT="$(usex gcrypt ON OFF)" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # the log directory + keepdir /var/log/zm + fowners apache:apache /var/log/zm + + # the logrotate script + insinto /etc/logrotate.d + newins distros/ubuntu1204/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/images ${MY_ZM_WEBDIR}/images + dosym /var/lib/zoneminder/events ${MY_ZM_WEBDIR}/events + 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.conf + fowners root:apache /etc/zm.conf + + # init scripts etc + newinitd "${FILESDIR}"/init.d zoneminder + newconfd "${FILESDIR}"/conf.d zoneminder + + # systemd unit file + systemd_dounit "${FILESDIR}"/zoneminder.service + + cp "${FILESDIR}"/10_zoneminder.conf-r1 "${T}"/10_zoneminder.conf || die + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die + + dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README.md TODO "${T}"/10_zoneminder.conf + + perl_delete_packlist + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least ${PV} ${v}; then + elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." + fi + done +} diff --git a/www-misc/zoneminder/zoneminder-1.30.2.ebuild b/www-misc/zoneminder/zoneminder-1.30.2.ebuild new file mode 100644 index 000000000000..74bea7e3cbfd --- /dev/null +++ b/www-misc/zoneminder/zoneminder-1.30.2.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# TO DO: +# * dependencies of unknown status: +# dev-perl/Device-SerialPort +# dev-perl/MIME-Lite +# dev-perl/MIME-tools +# dev-perl/PHP-Serialization +# virtual/perl-Archive-Tar +# virtual/perl-libnet +# virtual/perl-Module-Load + +EAPI=6 + +inherit versionator perl-functions readme.gentoo-r1 cmake-utils depend.apache flag-o-matic systemd + +MY_PN="ZoneMinder" + +MY_CRUD_VERSION="3.1.0" + +DESCRIPTION="Capture, analyse, record and monitor any cameras attached to your system" +HOMEPAGE="http://www.zoneminder.com/" +SRC_URI=" + https://github.com/${MY_PN}/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/FriendsOfCake/crud/archive/v${MY_CRUD_VERSION}.tar.gz -> Crud-${MY_CRUD_VERSION}.tar.gz +" + +LICENSE="GPL-2" +KEYWORDS="~amd64" +IUSE="curl ffmpeg gcrypt gnutls +mmap +ssl libressl 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] + 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 + sys-auth/polkit + sys-libs/zlib + virtual/ffmpeg + virtual/httpd-php:* + virtual/jpeg:0 + virtual/mysql + 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? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + vlc? ( media-video/vlc[live] ) +" +RDEPEND="${DEPEND}" + +# we cannot use need_httpd_cgi here, since we need to setup permissions for the +# webserver in global scope (/etc/zm.conf etc), so we hardcode apache here. +need_apache + +S=${WORKDIR}/${MY_PN}-${PV} + +PATCHES=( + "${FILESDIR}/${PN}-1.26.5"-automagic.patch + "${FILESDIR}/${PN}-1.28.1"-mysql_include_path.patch +) + +MY_ZM_WEBDIR=/usr/share/zoneminder/www + +src_prepare() { + cmake-utils_src_prepare + + rmdir "${S}/web/api/app/Plugin/Crud" || die + mv "${WORKDIR}/crud-${MY_CRUD_VERSION}" "${S}/web/api/app/Plugin/Crud" || die +} + +src_configure() { + append-cxxflags -D__STDC_CONSTANT_MACROS + perl_set_version + + mycmakeargs=( + -DZM_PERL_SUBPREFIX=${VENDOR_LIB#/usr} + -DZM_TMPDIR=/var/tmp/zm + -DZM_SOCKDIR=/var/run/zm + -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_FFMPEG="$(usex ffmpeg OFF ON)" + -DZM_NO_CURL="$(usex curl OFF ON)" + -DZM_NO_LIBVLC="$(usex vlc OFF ON)" + -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)" + -DHAVE_GNUTLS="$(usex gnutls ON OFF)" + -DHAVE_GCRYPT="$(usex gcrypt ON OFF)" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # the log directory + keepdir /var/log/zm + fowners apache:apache /var/log/zm + + # the logrotate script + insinto /etc/logrotate.d + newins distros/ubuntu1204/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/images ${MY_ZM_WEBDIR}/images + dosym /var/lib/zoneminder/events ${MY_ZM_WEBDIR}/events + 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.conf + fowners root:apache /etc/zm.conf + + # init scripts etc + newinitd "${FILESDIR}"/init.d zoneminder + newconfd "${FILESDIR}"/conf.d zoneminder + + # systemd unit file + systemd_dounit "${FILESDIR}"/zoneminder.service + + cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" + + dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README.md TODO "${T}"/10_zoneminder.conf + + perl_delete_packlist + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least ${PV} ${v}; then + elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." + fi + done +} -- cgit v1.2.3