Cacti 1.0.x spec file improvements
This commit is contained in:
parent
7bbc140dde
commit
5de7921dc7
76
cacti.spec
76
cacti.spec
@ -1,6 +1,6 @@
|
||||
Name: cacti
|
||||
Version: 1.0.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: An rrd based graphing tool
|
||||
License: GPLv2+
|
||||
URL: http://www.cacti.net/
|
||||
@ -8,9 +8,9 @@ Source0: http://www.cacti.net/downloads/%{name}-%{version}.tar.gz
|
||||
Source1: cacti-httpd.conf
|
||||
Source2: cacti.logrotate
|
||||
Source3: cacti.README.fedora
|
||||
Source7: %{name}.cron
|
||||
Source4: %{name}.cron
|
||||
|
||||
Requires: php, php-mysqlnd, php-snmp, php-pdo, php-xml, mariadb, httpd, rrdtool, net-snmp
|
||||
Requires: php, php-mysqlnd, php-snmp, php-pdo, php-ldap, php-xml, mariadb, httpd, rrdtool, net-snmp
|
||||
Requires: net-snmp-utils
|
||||
Requires: crontabs
|
||||
Requires(pre): shadow-utils
|
||||
@ -39,20 +39,23 @@ driven.
|
||||
# cacti's build is a noop
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}
|
||||
install -d -m 0755 %{buildroot}/%{_pkgdocdir}
|
||||
install -d -m 0755 %{buildroot}/%{_datadir}/%{name}/
|
||||
install -m 0644 *.php %{buildroot}/%{_datadir}/%{name}/
|
||||
install -d -m 0775 log/ %{buildroot}/%{_localstatedir}/log/%{name}/
|
||||
install -m 0664 log/* %{buildroot}/%{_localstatedir}/log/%{name}/
|
||||
install -d -m 0755 rra/ %{buildroot}/%{_localstatedir}/lib/%{name}/rra/
|
||||
install -d -m 0755 scripts/ %{buildroot}/%{_localstatedir}/lib//%{name}/scripts/
|
||||
install -m 0755 scripts/* %{buildroot}/%{_localstatedir}/lib/%{name}/scripts/
|
||||
install -d -m 0755 cli/ %{buildroot}/%{_localstatedir}/lib//%{name}/cli/
|
||||
install -m 0755 cli/* %{buildroot}/%{_localstatedir}/lib/%{name}/cli/
|
||||
install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_sysconfdir}/cron.d/%{name}
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/cacti.conf
|
||||
install -D -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/cacti
|
||||
%{__mkdir} -p %{buildroot}/%{_sysconfdir}/%{name}
|
||||
%{__install} -d -m 0755 %{buildroot}/%{_pkgdocdir}
|
||||
%{__install} -d -m 0755 %{buildroot}/%{_datadir}/%{name}/
|
||||
%{__install} -d -m 0755 cache/ %{buildroot}/%{_localstatedir}/lib/%{name}/cache
|
||||
%{__install} -d -m 0755 cli/ %{buildroot}/%{_localstatedir}/lib/%{name}/cli
|
||||
%{__install} -d -m 0775 log/ %{buildroot}/%{_localstatedir}/log/%{name}/
|
||||
%{__install} -d -m 0755 rra/ %{buildroot}/%{_localstatedir}/lib/%{name}/rra/
|
||||
%{__install} -d -m 0755 scripts/ %{buildroot}/%{_localstatedir}/lib/%{name}/scripts/
|
||||
%{__mv} *.php %{buildroot}/%{_datadir}/%{name}/
|
||||
%{__mv} cache/ %{buildroot}/%{_localstatedir}/lib/%{name}/
|
||||
%{__mv} cli/ %{buildroot}/%{_localstatedir}/lib/%{name}/
|
||||
%{__mv} log/* %{buildroot}/%{_localstatedir}/log/%{name}/
|
||||
%{__mv} rra/ %{buildroot}/%{_localstatedir}/lib/%{name}/
|
||||
%{__mv} scripts/ %{buildroot}/%{_localstatedir}/lib/%{name}/
|
||||
%{__install} -p -D -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/cron.d/%{name}
|
||||
%{__install} -D -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/cacti.conf
|
||||
%{__install} -D -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/cacti
|
||||
|
||||
# The su parameter will trip up older logrotate versions.
|
||||
# Conditionally remove it here.
|
||||
@ -60,15 +63,16 @@ install -D -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/cacti
|
||||
sed -i %{buildroot}/%{_sysconfdir}/logrotate.d/cacti -e '/^[ \t]*su /d'
|
||||
%endif
|
||||
|
||||
cp -ar formats/ images/ include/ install/ lib/ locales/ mibs/ plugins/ resource/ %{buildroot}%{_datadir}/%{name}
|
||||
cp %{SOURCE3} ./docs/README.fedora
|
||||
cp -a docs/ %{buildroot}/%{_pkgdocdir}
|
||||
mv %{buildroot}/%{_datadir}/%{name}/include/config.php %{buildroot}/%{_sysconfdir}/%{name}/db.php
|
||||
chmod +x %{buildroot}/%{_datadir}/%{name}/cmd.php %{buildroot}/%{_datadir}/%{name}/poller.php
|
||||
%{__cp} -ar formats/ images/ include/ install/ lib/ locales/ mibs/ plugins/ resource/ %{buildroot}%{_datadir}/%{name}
|
||||
%{__cp} %{SOURCE3} ./docs/README.fedora
|
||||
%{__cp} -a docs/ %{buildroot}/%{_pkgdocdir}
|
||||
%{__mv} %{buildroot}/%{_datadir}/%{name}/include/config.php %{buildroot}/%{_sysconfdir}/%{name}/db.php
|
||||
%{__chmod} +x %{buildroot}/%{_datadir}/%{name}/cmd.php %{buildroot}/%{_datadir}/%{name}/poller.php
|
||||
ln -s %{_localstatedir}/lib/%{name}/cache %{buildroot}/%{_datadir}/%{name}/
|
||||
ln -s %{_localstatedir}/lib/%{name}/cli %{buildroot}/%{_datadir}/%{name}/
|
||||
ln -s %{_sysconfdir}/%{name}/db.php %{buildroot}/%{_datadir}/%{name}/include/config.php
|
||||
ln -s %{_localstatedir}/lib/%{name}/rra %{buildroot}/%{_datadir}/%{name}/
|
||||
ln -s %{_localstatedir}/lib/%{name}/scripts %{buildroot}/%{_datadir}/%{name}/
|
||||
ln -s %{_localstatedir}/lib/%{name}/cli %{buildroot}/%{_datadir}/%{name}/
|
||||
ln -s %{_localstatedir}/log/%{name}/ %{buildroot}/%{_datadir}/%{name}/log
|
||||
ln -s %{_datadir}/%{name}/lib %{buildroot}/%{_localstatedir}/lib/%{name}/
|
||||
ln -s %{_datadir}/%{name}/include %{buildroot}/%{_localstatedir}/lib/%{name}/
|
||||
@ -85,18 +89,21 @@ fi
|
||||
%systemd_postun_with_restart httpd.service
|
||||
|
||||
%files
|
||||
%doc docs/ README.md cacti.sql
|
||||
%license LICENSE
|
||||
%dir %{_sysconfdir}/%{name}
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_localstatedir}/lib/%{name}
|
||||
%dir %{_localstatedir}/lib/%{name}/cli
|
||||
%dir %{_localstatedir}/lib/%{name}/scripts
|
||||
%doc docs/ README.md cacti.sql
|
||||
%license LICENSE
|
||||
%dir %attr(-,apache,apache) %{_localstatedir}/lib/%{name}/scripts
|
||||
%dir %attr(-,cacti,apache) %{_localstatedir}/log/%{name}/
|
||||
%config(noreplace) %{_sysconfdir}/cron.d/cacti
|
||||
%config(noreplace) %{_sysconfdir}/httpd/conf.d/cacti.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%attr(0640,cacti,apache) %config(noreplace) %{_sysconfdir}/%{name}/db.php
|
||||
%{_datadir}/%{name}/*.php
|
||||
%{_datadir}/%{name}/cache
|
||||
%{_datadir}/%{name}/cli
|
||||
%{_datadir}/%{name}/formats/
|
||||
%{_datadir}/%{name}/images/
|
||||
%{_datadir}/%{name}/include/
|
||||
@ -106,20 +113,23 @@ fi
|
||||
%{_datadir}/%{name}/log
|
||||
%{_datadir}/%{name}/mibs
|
||||
%{_datadir}/%{name}/plugins/
|
||||
%{_datadir}/%{name}/resource/
|
||||
%{_datadir}/%{name}/rra
|
||||
%{_datadir}/%{name}/scripts
|
||||
%{_datadir}/%{name}/cli
|
||||
%{_localstatedir}/lib/%{name}/scripts/*[^p]
|
||||
%dir %attr(-,cacti,apache) %{_localstatedir}/log/%{name}/
|
||||
%attr(-,root,root) %{_localstatedir}/lib/%{name}/scripts/*.php
|
||||
%attr(-,apache,apache) %{_datadir}/%{name}/resource/
|
||||
%attr(-,cacti,apache) %{_localstatedir}/log/%{name}/%{name}.log
|
||||
%attr(-,cacti,root) %{_localstatedir}/lib/%{name}/rra/
|
||||
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/scripts/*php
|
||||
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/cli/*php
|
||||
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/include
|
||||
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib
|
||||
%attr(-,apache,apache) %{_localstatedir}/lib/%{name}/cache/
|
||||
%attr(-,root,root) %{_localstatedir}/lib/%{name}/cli/*php
|
||||
%attr(-,root,root) %{_localstatedir}/lib/%{name}/cli/.htaccess
|
||||
%attr(-,root,root) %{_localstatedir}/lib/%{name}/include
|
||||
%attr(-,root,root) %{_localstatedir}/lib/%{name}/lib
|
||||
|
||||
%changelog
|
||||
* Sat Feb 18 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.0.3-2
|
||||
- Cacti 1.0.x spec file improvements
|
||||
|
||||
* Thu Feb 16 2017 Morten Stevens <mstevens@fedoraproject.org> - 1.0.3-1
|
||||
- Update to 1.0.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user