Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %bcond_without tainted
- %bcond_with debug
- %define name zoneminder
- %define version 1.24.4
- %define release %mkrel 0
- %define zmuid apache
- %define zmgid apache
- %define initdir /etc/rc.d/init.d
- Name: %{name}
- Version: %{version}
- Release: %{release}
- Summary: Video Camera and CCTV Security with Motion Detection
- Group: Video
- License: GPLv2+ and LGPLv2+ and MIT
- # jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/old/
- # Mootools is under the MIT license: http://mootools.net/
- URL: http://www.zoneminder.com/
- Source: http://www.zoneminder.com/fileadmin/downloads/ZoneMinder-%{version}.tar.gz
- Source1: cambozola.jar
- Source2: zoneminder.conf
- Source3: redalert.wav
- Source4: README.Mageia
- Source5: http://downloads.sourceforge.net/jscalendar/jscalendar-1.0.zip
- Source6: http://mootools.net/download/get/mootools-1.2.3-core-yc.js
- Source7: zmsetup
- Source8: zm_perf.sql
- Patch1: zm_1_24_4-perfpatch_v1m.patch
- Patch2: zm_1_24_4-zm_image.h.patch
- Patch3: zm_1_24_4-chown.patch
- Patch4: zm_1_24_4-zm_create.sql.patch
- BuildRequires: automake gnutls-devel
- BuildRequires: mysql-devel pcre-devel perl-DBD-mysql perl-Date-Manip
- BuildRequires: ffmpeg ffmpeg-devel perl-Device-SerialPort perl-Archive-Zip
- BuildRequires: perl-MIME-Lite perl-MIME-tools perl-Archive-Tar perl-libwww-perl
- BuildRequires: perl-PHP-Serialization perl-Sys-Mmap libjpeg-static-devel
- Requires: apache mysql php php-mysql apache-mod_php
- Requires: perl-DBD-mysql perl-Archive-Tar perl-Archive-Zip perl-Date-Manip
- Requires: perl-Net-FTP-Common perl-MIME-Lite perl-Sys-Mmap
- %if %{with tainted}
- Requires: ffmpeg lame
- %endif
- %description
- ZoneMinder is intended for use in single or multi-camera video security applications,
- including commercial or home CCTV. It supports capture, analysis, recording, and monitoring
- of video data coming from one or more video or network cameras attached to a Linux system.
- ZoneMinder also supports web and semi-automatic control of Pan/Tilt/Zoom cameras using a
- variety of protocols.
- It is designed to run on distributions which support the Video For Linux (V4L) interface
- and has been tested with video cameras attached to BTTV cards, various USB cameras and also
- supports most IP network cameras. This package includes cambozola.jar and the performance patch by Kfir Itzhak.
- %pre
- cat /proc/cpuinfo | grep -q sse2
- if [[ $? != 0 ]]; then
- echo "This package requires a cpu with sse2 support"
- exit 1
- fi
- %prep
- %setup -q -n ZoneMinder-%{version}
- # Unpack jscalendar and move some files around
- %setup -q -D -T -a 5 -n ZoneMinder-%{version}
- mkdir jscalendar-doc
- pushd jscalendar-1.0
- mv *html *php doc/* README ../jscalendar-doc
- rmdir doc
- popd
- %patch1 -p1 -b .zm_1_24_4-perfpatch_v1m.patch
- %patch2 -p0 -b .zm_1_24_4-zm_image.h.patch
- %patch3 -p1 -b .zm_1_24_4-chown.patch
- %patch4 -p0 -b .zm_1_24_4-zm_create.sql.patch
- cp %{SOURCE4} README.Mageia
- %build
- aclocal
- autoconf
- automake
- ./configure \
- --prefix=%{_prefix} \
- --mandir=%{_datadir}/man \
- --infodir=%{_datadir}/info \
- --datadir=%{_datadir} \
- --sysconfdir=%{_sysconfdir} \
- --localstatedir=%{_localstatedir}/lib \
- --with-libarch=lib \
- --with-mysql=%{_prefix} \
- --with-webdir=%{_localstatedir}/www/html/zm \
- --with-cgidir=%{_localstatedir}/www/cgi-bin \
- --with-webuser=%{zmuid} \
- --with-webgroup=%{zmgid} \
- --enable-mmap=yes \
- %if %{with debug}
- --enable-debug=yes \
- --enable-crashtrace=yes \
- %else
- --disable-debug \
- --disable-crashtrace \
- %endif
- %if %{with tainted}
- --with-ffmpeg=%{_prefix} \
- --with-extralibs="-lmp3lame" \
- %endif
- CPPFLAGS="-D__STDC_CONSTANT_MACROS -msse2" \
- LDFLAGS="$LDFLAGS -Wl,--build-id"
- %make
- %{__perl} -pi -e 's/(ZM_WEB_USER=).*$/${1}%{zmuid}/;' \
- -e 's/(ZM_WEB_GROUP=).*$/${1}%{zmgid}/;' zm.conf
- %install
- rm -rf $RPM_BUILD_ROOT
- install -d $RPM_BUILD_ROOT/var/run
- make install DESTDIR=$RPM_BUILD_ROOT INSTALLDIRS=vendor
- rm -rf $RPM_BUILD_ROOT%{perl_vendorarch} $RPM_BUILD_ROOT%{perl_archlib}
- rm -f $RPM_BUILD_ROOT%{_bindir}/zmx10.pl
- for dir in events images temp
- do
- install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/www/html/zm/$dir
- done
- install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_localstatedir}/www/html/zm/cambozola.jar
- install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/log/zoneminder
- install -D -m 755 scripts/zm $RPM_BUILD_ROOT%{initdir}/zoneminder
- install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
- install -D -m 755 db/zm_create.sql $RPM_BUILD_ROOT%{_datadir}/%{name}/zm_create.sql
- install -D -m 755 %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/%{name}/zm_perf.sql
- install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/zoneminder.conf
- install -D -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_localstatedir}/www/html/zm/sounds/redalert.wav
- install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/log/zm
- install -D -m 755 %{SOURCE7} $RPM_BUILD_ROOT%{_bindir}/zmsetup
- # Install jscalendar
- install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/www/jscalendar
- cp -rp jscalendar-1.0/* $RPM_BUILD_ROOT%{_localstatedir}/www/jscalendar
- # Install mootools
- pushd $RPM_BUILD_ROOT%{_localstatedir}/www/html/zm
- install -m 644 %{SOURCE6} mootools-1.2.3-core-yc.js
- ln -s mootools-1.2.3-core-yc.js mootools.js
- popd
- %post
- /sbin/chkconfig --add zoneminder
- %preun
- if [ $1 -eq 0 ]; then
- /sbin/service zoneminder stop > /dev/null 2>&1 || :
- /sbin/chkconfig --del zoneminder
- fi
- %postun
- if [ $1 -ge 1 ]; then
- /sbin/service zoneminder condrestart > /dev/null 2>&1 || :
- fi
- %files
- %doc AUTHORS COPYING README README.Mageia jscalendar-doc
- %config(noreplace) %attr(640,root,%{zmgid}) %{_sysconfdir}/zm.conf
- %config(noreplace) %attr(644,root,root) %{_sysconfdir}/httpd/conf.d/zoneminder.conf
- %{_bindir}/zma
- %{_bindir}/zmaudit.pl
- %{_bindir}/zmc
- %{_bindir}/zmcontrol.pl
- %{_bindir}/zmdc.pl
- %{_bindir}/zmf
- %{_bindir}/zmfilter.pl
- %attr(4755,root,root) %{_bindir}/zmfix
- %{_bindir}/zmpkg.pl
- %{_bindir}/zmtrack.pl
- %{_bindir}/zmtrigger.pl
- %{_bindir}/zmu
- %{_bindir}/zmupdate.pl
- %{_bindir}/zmvideo.pl
- %{_bindir}/zmwatch.pl
- %{_bindir}/zmstreamer
- %{_bindir}/zmsetup
- %{perl_vendorlib}/ZoneMinder*
- %{_mandir}/man*/*
- %{_localstatedir}/www/cgi-bin
- %{_datadir}/%{name}
- %attr(755,%{zmuid},%{zmgid}) %{_localstatedir}/www/jscalendar
- %attr(755,%{zmuid},%{zmgid}) %{_localstatedir}/www/html/zm
- %dir %attr(755,%{zmuid},%{zmgid}) %{_localstatedir}/log/zm
- %attr(755,root,root) %{initdir}/zoneminder
- # Uncomment to keep buildroot
- # %clean
- %changelog
- * Thu Sep 8 2011 Barry Jackson <zen25000@zen.co.uk> - 1.24.4-0
- - Complete re-package (using some elements of a Fedora spec)
- - and version update for Mageia.
- - Includes the performance patch by Kfir Itzhak :-
- - http://www.zoneminder.com/forums/viewtopic.php?f=9&t=17652
- * Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
- - Mass rebuild with perl-5.12.0
- * Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
- - rebuild against perl 5.10.1
- - use Perl vendorarch and archlib variables correctly
- * Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
- * Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
- - Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
- * Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
- - Initial update to 1.24.2.
- - Rebase patches.
- - Update mootools download location.
- - Update to mootools 1.2.3.
- - Add additional dependencies for some optional features.
- * Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
- - Remove unused Sys::Mmap perl dependency RPM is finding
- * Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
- - Update gcc44 patch to disable -frepo, seems to be broken with gcc44
- - Added noffmpeg patch to make building outside mock easier
- * Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
- - Patch for gcc 4.4 compilation errors
- - Upgrade to 1.24.1
- * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
- - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
- * Sat Jan 24 2009 Caolรกn McNamara <caolanm@redhat.com> - 1.23.3-3
- - rebuild for dependencies
- * Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
- - Fix permissions on zm.conf
- * Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
- - Initial attempt at packaging 1.23.
- * Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
- - Add perl module compat dependency, bz #453590
- * Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
- - Remove default runlevel, bz #441315
- * Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
- - Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
- * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
- - Autorebuild for GCC 4.3
- * Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
- - Fix compilation on gcc 4.3
- * Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
- - Rebuild for new openssl
- * Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
- - Fix licence tag
- * Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
- - Fixes from testing by Jitz including missing dependencies and database creation
- * Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
- - Disable crashtrace on ppc
- * Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
- - Fix uid for directories in /var/lib/zoneminder
- * Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
- - Added perl Archive::Tar dependency
- - Disabled web interface due to lack of access control on the event images
- * Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
- - Changes recommended in review by Jason Tibbitts
- * Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
- - Standardised on package name of zoneminder
- * Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
- - First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement