Merge pull request #284 from knnniggett/zmfix

Specfile changes related to zmfix
pull/292/head
Andrew Bauer 2013-12-26 11:12:26 -08:00
commit 4854c495a2
4 changed files with 50 additions and 35 deletions

View File

@ -3,6 +3,10 @@
%define zmuid_final apache
%define zmgid_final apache
### Delete the lines below to build with ffmpeg and/or x10
%define _without_ffmpeg 1
%define _without_x10 1
Name: zoneminder
Version: 1.26.5
Release: 1%{?dist}
@ -17,8 +21,6 @@ URL: http://www.zoneminder.com/
Source: ZoneMinder-%{version}.tar.gz
Patch1: zoneminder-1.26.0-defaults.patch
# Enable this patch to disable ffmpeg support
#Patch2: zoneminder-1.26.3-noffmpeg.patch
BuildRequires: cmake gnutls-devel systemd-units bzip2-devel
BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel
@ -30,17 +32,16 @@ BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
BuildRequires: perl(Expect)
BuildRequires: gcc gcc-c++
# Comment out for no ffmpeg
BuildRequires: ffmpeg-devel
# Uncomment for X10 support
#BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
Requires: httpd php php-mysql cambozola
Requires: libjpeg-turbo ffmpeg
Requires: libjpeg-turbo
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
Requires: perl(LWP::Protocol::https)
%{!?_without_ffmpeg:Requires: ffmpeg}
Requires(post): systemd-units systemd-sysv
Requires(post): /usr/bin/gpasswd
@ -64,7 +65,12 @@ too much degradation of performance.
#%patch2 -p0 -b .noffmpeg
%build
%cmake -DZM_TARGET_DISTRO="f19" -DZM_NO_X10=ON -DZM_NO_FFMPEG=ON -DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` .
%cmake \
-DZM_TARGET_DISTRO="f19" \
-DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
%{?_without_x10:-DZM_NO_X10=ON} \
.
make %{?_smp_mflags}
@ -78,8 +84,9 @@ if [ $1 -eq 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
# Allow zoneminder access to local video sources
/usr/bin/gpasswd -a %zmuid_final video
# Allow zoneminder access to local video sources, serial ports, and x10
/usr/bin/gpasswd -a %{zmuid_final} video
/usr/bin/gpasswd -a %{zmuid_final} dialout
# Display the README for post installation instructions
/usr/bin/less %{_docdir}/%{name}-%{version}/README.Fedora
@ -126,6 +133,8 @@ fi
%{_bindir}/zmdc.pl
%{_bindir}/zmf
%{_bindir}/zmfilter.pl
# zmfix removed from zoneminder 1.26.6
#%attr(4755,root,root) %{_bindir}/zmfix
%{_bindir}/zmpkg.pl
%{_bindir}/zmstreamer
%{_bindir}/zmtrack.pl
@ -134,8 +143,7 @@ fi
%{_bindir}/zmupdate.pl
%{_bindir}/zmvideo.pl
%{_bindir}/zmwatch.pl
# Uncomment this for x10 support
#%{_bindir}/zmx10.pl
%{!?_without_x10:%{_bindir}/zmx10.pl}
%{perl_vendorlib}/ZoneMinder*
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*

View File

@ -7,6 +7,10 @@
%define zmuid_final apache
%define zmgid_final apache
### Delete the lines below to build with ffmpeg and/or x10
%define _without_ffmpeg 1
%define _without_x10 1
Name: zoneminder
Version: 1.26.5
Release: 1%{?dist}
@ -28,11 +32,9 @@ Source2: jscalendar-%{jscrev}.zip
# here.
#Source3: http://mootools.net/download/get/mootools-core-%{moorev}-full-compat-yc.js
#Patch1: zoneminder-1.26.4-dbinstall.patch
Patch2: zoneminder-1.24.3-runlevel.patch
Patch3: zoneminder-1.26.0-defaults.patch
# Enable this patch to disable ffmpeg support
#Patch4: zoneminder-1.26.3-noffmpeg.patch
Patch1: zoneminder-1.24.3-runlevel.patch
Patch2: zoneminder-1.26.0-defaults.patch
%{?_without_ffmpeg:Patch3: zoneminder-1.26.3-noffmpeg.patch}
BuildRequires: automake gnutls-devel systemd-units
BuildRequires: libtool bzip2-devel
@ -46,10 +48,8 @@ BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
BuildRequires: perl(Expect) perl(Sys::Syslog)
BuildRequires: gcc gcc-c++
BuildRequires: autoconf autoconf-archive
# Comment out for no ffmpeg
BuildRequires: ffmpeg-devel
# Uncomment for X10 support
#BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
Requires: httpd php php-mysql cambozola
Requires: libjpeg-turbo ffmpeg
@ -84,10 +84,9 @@ mv *html *php doc/* README ../jscalendar-doc
rmdir doc
popd
#%patch1 -p0 -b .dbinstall
%patch2 -p0 -b .runlevel
%patch3 -p0 -b .defaults
#%patch4 -p0 -b .noffmpeg
%patch1 -p0 -b .runlevel
%patch2 -p0 -b .defaults
%{?_without_ffmpeg:%patch3 -p0 -b .noffmpeg}
chmod -x src/zm_event.cpp src/zm_user.h
@ -132,8 +131,7 @@ install -d %{buildroot}/%{_localstatedir}/run
make install DESTDIR=%{buildroot} \
INSTALLDIRS=vendor
rm -rf %{buildroot}/%{perl_vendorarch} %{buildroot}/%{perl_archlib}
# Comment out for x10 support
rm -f %{buildroot}/%{_bindir}/zmx10.pl
%{?_without_x10:%{__rm} -f %{buildroot}/%{_bindir}/zmx10.pl}
install -m 755 -d %{buildroot}/var/log/zoneminder
for dir in events images temp
@ -159,7 +157,7 @@ cp -rp jscalendar-1.0/* %{buildroot}/%{_datadir}/zoneminder/www/jscalendar
# Set up cambozola
pushd %{buildroot}/%{_datadir}/zoneminder/www
ln -s ../../java/cambozola.jar
%{__ln_s} ../../java/cambozola.jar
popd
# Set up mootools
@ -180,8 +178,9 @@ if [ $1 -eq 1 ] ; then
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
# Allow zoneminder access to local video sources
/usr/bin/gpasswd -a %zmuid_final video
# Allow zoneminder access to local video sources, serial ports, and x10
/usr/bin/gpasswd -a %{zmuid_final} video
/usr/bin/gpasswd -a %{zmuid_final} dialout
# Display the README for post installation instructions
/usr/bin/less %{_docdir}/%{name}-%{version}/README.Fedora
@ -228,6 +227,8 @@ fi
%{_bindir}/zmdc.pl
%{_bindir}/zmf
%{_bindir}/zmfilter.pl
# zmfix removed from zoneminder 1.26.6
#%attr(4755,root,root) %{_bindir}/zmfix
%{_bindir}/zmpkg.pl
%{_bindir}/zmstreamer
%{_bindir}/zmtrack.pl
@ -236,7 +237,7 @@ fi
%{_bindir}/zmupdate.pl
%{_bindir}/zmvideo.pl
%{_bindir}/zmwatch.pl
#%{_bindir}/zmx10.pl
%{!?_without_x10:%{_bindir}/zmx10.pl}
%{perl_vendorlib}/ZoneMinder*
%{_mandir}/man*/*

View File

@ -78,9 +78,10 @@ make install
/sbin/chkconfig --add zoneminder
/sbin/chkconfig zoneminder on
# Allow zoneminder access to local video sources
# Allow zoneminder access to local video sources, serial ports, and x10
echo
/usr/bin/gpasswd -a apache video
/usr/bin/gpasswd -a %{zmuid_final} video
/usr/bin/gpasswd -a %{zmuid_final} dialout
# Create and load zoneminder selinux policy module
echo -e "\nCreating and installing a ZoneMinder SELinux policy module. Please wait.\n"
@ -124,6 +125,8 @@ rm -rf %{_docdir}/%{name}-%{version}
%{_bindir}/zmdc.pl
%{_bindir}/zmf
%{_bindir}/zmfilter.pl
# zmfix removed from zoneminder 1.26.6
#%attr(4755,root,root) %{_bindir}/zmfix
%{_bindir}/zmpkg.pl
%{_bindir}/zmstreamer
%{_bindir}/zmtrack.pl

View File

@ -190,9 +190,10 @@ popd
/sbin/chkconfig --add zoneminder
/sbin/chkconfig zoneminder on
# Allow zoneminder access to local video sources
# Allow zoneminder access to local video sources, serial ports, and x10
echo
/usr/bin/gpasswd -a apache video
/usr/bin/gpasswd -a %{zmuid_final} video
/usr/bin/gpasswd -a %{zmuid_final} dialout
# Create and load zoneminder selinux policy module
echo -e "\nCreating and installing a ZoneMinder SELinux policy module. Please wait.\n"
@ -233,6 +234,8 @@ fi
%{_bindir}/zmdc.pl
%{_bindir}/zmf
%{_bindir}/zmfilter.pl
# zmfix removed from zoneminder 1.26.6
#%attr(4755,root,root) %{_bindir}/zmfix
%{_bindir}/zmpkg.pl
%{_bindir}/zmstreamer
%{_bindir}/zmtrack.pl