rpm build tweaks based on rpmfusion feedback

This commit is contained in:
Andy Bauer 2017-01-03 13:12:12 -06:00
parent 2a1ec2beb1
commit b4f537c5d3
4 changed files with 11 additions and 6 deletions

View File

@ -49,10 +49,8 @@ endif("${unzip_jsc}" STREQUAL "")
file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events images temp)
# Install the empty folders
#install(DIRECTORY run DESTINATION /var DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_WRITE WORLD_READ WORLD_EXECUTE)
install(DIRECTORY sock swap DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(DIRECTORY zoneminder DESTINATION /var/log DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(DIRECTORY zoneminder DESTINATION /run DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(DIRECTORY zoneminder-upload DESTINATION /var/spool DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(DIRECTORY events images temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

View File

@ -8,12 +8,15 @@ Requires=mariadb.service nginx.service php-fpm.service fcgiwrap.service
[Service]
User=@WEB_USER@
Group=@WEB_GROUP@
Type=forking
ExecStart=@BINDIR@/zmpkg.pl start
ExecReload=@BINDIR@/zmpkg.pl restart
ExecStop=@BINDIR@/zmpkg.pl stop
PIDFile=@ZM_RUNDIR@/zm.pid
Environment=TZ=/etc/localtime
RuntimeDirectory=zoneminder
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target

View File

@ -7,12 +7,15 @@ Requires=mariadb.service httpd.service
[Service]
User=@WEB_USER@
Group=@WEB_GROUP@
Type=forking
ExecStart=@BINDIR@/zmpkg.pl start
ExecReload=@BINDIR@/zmpkg.pl restart
ExecStop=@BINDIR@/zmpkg.pl stop
PIDFile=@ZM_RUNDIR@/zm.pid
Environment=TZ=/etc/localtime
RuntimeDirectory=zoneminder
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target

View File

@ -5,10 +5,10 @@
%{!?make_build: %global make_build %{__make} %{?_smp_mflags} }
%if "%{zmuid_final}" == "nginx"
%global with_nginx 1
%global wwwconfdir /etc/nginx/default.d
%global with_nginx 1
%global wwwconfdir /etc/nginx/default.d
%else
%global wwwconfdir /etc/httpd/conf.d
%global wwwconfdir /etc/httpd/conf.d
%endif
%global sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt
@ -50,6 +50,7 @@ Source: ZoneMinder-%{version}.tar.gz
%{?with_init_systemd:BuildRequires: systemd-devel mariadb-devel perl-podlators}
%{?with_init_sysv:BuildRequires: mysql-devel}
BuildRequires: cmake >= 2.8.7
BuildRequires: perl-generators
BuildRequires: gnutls-devel bzip2-devel
BuildRequires: pcre-devel libjpeg-turbo-devel
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
@ -301,7 +302,7 @@ rm -rf %{_docdir}/%{name}-%{version}
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/temp
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %ghost /run/zoneminder
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %ghost /var/run/zoneminder
%changelog
* Wed Dec 28 2016 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.30.1-2