[packages/diamond] Comments and not used macros removed.

matkor matkor at pld-linux.org
Wed Dec 2 22:51:21 CET 2015


commit 405853f4f099a5879c4859730de9a7c6e80d2a79
Author: Mateusz Korniak <matkor at pld-linux.org>
Date:   Wed Dec 2 22:51:08 2015 +0100

    Comments and not used macros removed.

 diamond.spec | 66 ++----------------------------------------------------------
 1 file changed, 2 insertions(+), 64 deletions(-)
---
diff --git a/diamond.spec b/diamond.spec
index b736469..6a13c1d 100644
--- a/diamond.spec
+++ b/diamond.spec
@@ -1,8 +1,4 @@
-# Conditional build:
-# %bcond_with	doc	# don't build doc
-# %bcond_with	tests	# do not perform "make test"
-%bcond_without	python2 # CPython 2.x module
-# %bcond_with	python3 # CPython 3.x module
+%bcond_with	tests	# do not perform "make test"
 
 %define 	module	diamond
 Summary:	Python daemon that collects system metrics and publishes them to Graphite (and others).
@@ -10,7 +6,7 @@ Summary(pl.UTF-8):	Demon napisany w Pythonie, zbierający statystyki i publikuj
 # Name must match the python module/package name (as in 'import' statement)
 Name:		diamond
 Version:	4.0.195
-Release:	0.6
+Release:	1
 License:	MIT
 Group:		Libraries/Python
 # https://github.com/python-diamond/Diamond/archive/v4.0.tar.gz
@@ -26,17 +22,7 @@ URL:		https://github.com/python-diamond/Diamond
 BuildRequires:	rpm-pythonprov
 # for the py_build, py_install macros
 BuildRequires:	rpmbuild(macros) >= 1.710
-%if %{with python2}
 BuildRequires:	python-modules
-#BuildRequires:	python-setuptools
-%endif
-# %if %{with python3}
-# #BuildRequires:	python3-setuptools
-# BuildRequires:	python3-modules
-# %endif
-# when using /usr/bin/env or other in-place substitutions
-#BuildRequires:	sed >= 4.0
-# replace with other requires if defined in setup.py
 Requires:	python-configobj >= 5.0.6
 Requires:	python-modules
 Suggests:	python-setproctitle
@@ -67,50 +53,24 @@ Zbieracz statystyk dla bazdy danych Postgresql
 %prep
 %setup -q -n %{module}-%{version}
 
-# fix #!%{_bindir}/env python -> #!%{_bindir}/python:
-#%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py
-
 %build
-%if %{with python2}
 %py_build %{?with_tests:test}
-%endif
-
-# %if %{with python3}
-# %%py3_build %{?with_tests:test}
-# %endif
-
-# %if %{with doc}
-# cd docs
-# %{__make} -j1 html
-# rm -rf _build/html/_sources
-# %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %py_install
 %py_postclean
-%endif
-# %if %{with python3}
-# %%py3_install
-# %endif
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{module}
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{module}/collectors
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{module}/handlers
 ## install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{module}/configs
 install -p %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/%{module}/diamond.conf
-
 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/%{module}
-# install -d $RPM_BUILD_ROOT%{_localstatedir}/run/carbon
-# install -d $RPM_BUILD_ROOT%{_sharedstatedir}/carbon
-
 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/diamond
-
 install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/%{module}/collectors
 
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -120,24 +80,19 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add diamond
-## %systemd_post diamond.service 
 
 %preun
 if [ "$1" = "0" ]; then
 	%service diamond stop
 	/sbin/chkconfig --del diamond
 fi
-%systemd_preun diamond.service
 
 %postun
 if [ "$1" = "0" ]; then
 	%userremove diamond
 	%groupremove diamond
 fi
-%systemd_reload
 
-
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc README.md LICENSE
@@ -148,7 +103,6 @@ fi
 %attr(755,root,root) %{_bindir}/diamond
 %attr(755,root,root) %{_bindir}/diamond-setup
 %{py_sitescriptdir}/%{module}
-# %{py_sitescriptdir}/%{module}/collectors
 %{_datadir}/diamond/
 %attr(750,diamond,diamond) /var/log/diamond
 %attr(754,root,root) /etc/rc.d/init.d/diamond
@@ -156,22 +110,6 @@ fi
 %if "%{py_ver}" > "2.4"
 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
 %endif
-%endif
-
-# %if %{with python3}
-# %files -n python3-%{module}
-# %defattr(644,root,root,755)
-# %doc AUTHORS CHANGES LICENSE
-# %{py3_sitescriptdir}/%{module}
-# %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
-# %{_examplesdir}/python3-%{module}-%{version}
-# %endif
-#
-# %if %{with doc}
-# %files apidocs
-# %defattr(644,root,root,755)
-# %doc docs/_build/html/*
-# %endif
 
 %files -n %{module}-collector-postgresql
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/diamond.git/commitdiff/405853f4f099a5879c4859730de9a7c6e80d2a79



More information about the pld-cvs-commit mailing list