From 468dde31d7865052011e4e0bff49b21407f6f1b3 Mon Sep 17 00:00:00 2001 From: "Andreas K. Hüttel" Date: Sat, 10 Dec 2016 21:42:58 +0100 Subject: www-misc/zoneminder: Version bump, fixing bug 546842, bug 564278, and bug 574006 In addition a lot of QA cleanup and an EAPI bump has been done. Thanks to * Russell Knighton * Jason Oliveira * Aaron Burnett for their contributions. Package-Manager: portage-2.3.2 --- www-misc/zoneminder/Manifest | 2 + .../zoneminder-1.28.1-mysql_include_path.patch | 20 +++ www-misc/zoneminder/files/zoneminder.service | 11 ++ www-misc/zoneminder/zoneminder-1.30.0.ebuild | 173 +++++++++++++++++++++ 4 files changed, 206 insertions(+) create mode 100644 www-misc/zoneminder/files/zoneminder-1.28.1-mysql_include_path.patch create mode 100644 www-misc/zoneminder/files/zoneminder.service create mode 100644 www-misc/zoneminder/zoneminder-1.30.0.ebuild (limited to 'www-misc') diff --git a/www-misc/zoneminder/Manifest b/www-misc/zoneminder/Manifest index 23834a15a24b..8f9296362ec3 100644 --- a/www-misc/zoneminder/Manifest +++ b/www-misc/zoneminder/Manifest @@ -1,2 +1,4 @@ +DIST Crud-3.0.10.tar.gz 72960 SHA256 462d05e21d17cc6b11cdc441971d1a7f07688512b5f7903217a574c6c39efd91 SHA512 2f60557f2c783bb448e06c1ca40b536a1d7d5f3caf0626fa6716a28f808492d4799e238f16c022571be96921105b074b6763920fd7b9cc77b76d17ceadae2040 WHIRLPOOL 6c8d78dd30e8373a2b014fe4f6d17a4e2ec1051a6dc09d8b0759c6cd76ae78cb633e2c1eaab125aa29e66903de201337da979b3e412e8861a2431588251d817b DIST zoneminder-1.28.0.tar.gz 2804199 SHA256 b9ee65635753e094dcad6cdb480acc42bff8b8f023ee008790883a4308273ca2 SHA512 ac2a036adac436d76db8bb0b161d063111cc7cc7f6bcb9ca1b46862cfb0285b291926df716df645c0be47b7465bbbf3b1050c85529ff5068bdcc34f1c8ba6df1 WHIRLPOOL 012a088ab6411cf7a1ec1e0c4d9c9f1e61889c3729ea736baafb5174a20f61a82c280b7c5bfd669e031b3e1844abe1de0a577e73f82295b080d88b4ae43b627b DIST zoneminder-1.28.1.tar.gz 3864811 SHA256 e55fa6ce1fd6c27912cd1de67fca3f80fad579f330020a384dc82838704d11ba SHA512 0ae29870e12b7ad0852510a17439df49dd35245aa1486a5d0ff71e17dbf89840d08c65b4485c93739f1fbcc253599162e28e0382c28927aa84cd734248587ea1 WHIRLPOOL 62a52810437c0360fb83eb6f8210d6f089448bc6b9cf7b46e6ad8db7f952c3e3ba9832f2e25be65a476655991e3dd7ae70ed83198c7a4563cff68283e7f06226 +DIST zoneminder-1.30.0.tar.gz 9757409 SHA256 e7c964c339305f42a044ca8e34fa4e6a33c452fdaf33642458735daf8b864325 SHA512 cbff14447a568648a0475e878be5cd19cb694c65814fe33c20774752410e31f3f4ff9e5695667d4d50634b3193dc50aaca2d950efc151bbb968d3f9609d35db4 WHIRLPOOL af901055bb1ac9ae668fae23f80aff20632d6ee785e0fe5ab6f71f86fe6e1a8ca2e4dae919c1754ac84025f7bc614cc9cea7470209b2a7a35d3b27746eb9a46b 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.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/zoneminder-1.30.0.ebuild b/www-misc/zoneminder/zoneminder-1.30.0.ebuild new file mode 100644 index 000000000000..60f391573c1c --- /dev/null +++ b/www-misc/zoneminder/zoneminder-1.30.0.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# 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 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 myold=${REPLACING_VERSIONS} + [ "${myold}" = ${PV} ] || elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script." +} -- cgit v1.2.3-65-gdbad