]> git.pld-linux.org Git - packages/pg_activity.git/blobdiff - pg_activity.spec
cleanup template leftovers
[packages/pg_activity.git] / pg_activity.spec
index a8dac78562e5046d55fc88dc40b9467bda1184ca..7f68ee7269d7c2591a7e9cb38621640caf76c3d9 100644 (file)
@@ -7,15 +7,10 @@
 #  Are modules used by other soft? If not just switch to py 3.x when there is release available
 
 # Conditional build:
-%bcond_with    doc             # don't build doc
 %bcond_without tests   # do not perform "make test"
-%bcond_without python2 # CPython 2.x module
-%bcond_with    python3 # CPython 3.x module
 
 %define        module  pgactivity
-Summary:       -
-Summary(pl.UTF-8):     -
-# Name must match the python module/package name (as in 'import' statement)
+Summary:       A top like application for PostgreSQL server activity monitoring
 Name:          pg_activity
 Version:       1.2.0
 Release:       0.1
@@ -24,28 +19,11 @@ Group:              Libraries/Python
 Source0:       https://github.com/julmon/pg_activity/archive/v%{version}.tar.gz
 # Source0-md5: 1c75bdc026312b322e24fe6492ce6b5f
 URL:           https://github.com/julmon/pg_activity
-BuildRequires: rpm-pythonprov
-# remove BR: python-devel for 'noarch' packages.
-# if py_postclean is used
-BuildRequires: rpmbuild(macros) >= 1.219
-# if py3* macros are used
-BuildRequires: rpmbuild(macros) >= 1.612
-# when using /usr/bin/env or other in-place substitutions
-#BuildRequires:        sed >= 4.0
-# when python3 present
-%if %{with python2}
 BuildRequires: python-psutil
 BuildRequires: python-psycopg2 >= 2.2.1
 BuildRequires: python-setuptools
-%endif
-%if %{with python3}
-BuildRequires: python3-modules
-BuildRequires: python3-psutil
-BuildRequires: python3-psycopg2 >= 2.2.1
-BuildRequires: python3-setuptools
-%endif
-# Below Rs only work for main package (python2)
-#Requires:             python-libs
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.612
 Requires:      python-modules
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -56,98 +34,29 @@ htop like application for PostgreSQL server activity monitoring
 %description -l pl.UTF-8
 Podobna do htop aplikacja monitorująca aktywność PostgresSQL
 
-%package -n python3-%{module}
-Summary:       -
-Summary(pl.UTF-8):     -
-Group:         Libraries/Python
-Requires:      python3-modules
-
-%description -n python3-%{module}
-
-%description -n python3-%{module} -l pl.UTF-8
-
-%package apidocs
-Summary:       %{module} API documentation
-Summary(pl.UTF-8):     Dokumentacja API %{module}
-Group:         Documentation
-
-%description apidocs
-API documentation for %{module}.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API %{module}.
-
 %prep
-# %setup -q -n %{module}-%{version}
 %setup -q
 
-# setup copy of source in py3 dir
-set -- *
-install -d py3
-cp -a "$@" py3
-
 %build
-%if %{with python2}
-%{__python} setup.py build --build-base build-2 %{?with_tests:test} --with-man
-%endif
-
-%if %{with python3}
-%{__python3} setup.py build --build-base build-3 %{?with_tests:test} --with-man
-%endif
-
-%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
-%endif
+%{__python} setup.py build %{?with_tests:test} \
+       --with-man
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%{__python} setup.py \
-       build --build-base build-2 \
-       install --skip-build \
+%{__python} setup.py install \
+       --skip-build \
        --optimize=2 \
        --root=$RPM_BUILD_ROOT
 
 %py_postclean
-%endif
-
-%if %{with python3}
-%{__python3} setup.py \
-       build --build-base build-3 \
-       install --skip-build \
-       --optimize=2 \
-       --root=$RPM_BUILD_ROOT
-%endif
-
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc README.md docs
+%doc README.md
+%attr(755,root,root) %{_bindir}/pg_activity
 %dir %{py_sitescriptdir}/%{module}
 %{py_sitescriptdir}//%{module}/*.py[co]
-%attr(755,root,root) %{_bindir}/pg_activity
-%if "%{py_ver}" > "2.4"
 %{py_sitescriptdir}/%{name}-%{version}-py*.egg-info
-%endif
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc README.md docs
-%{py3_sitescriptdir}/%{module}
-%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/_build/html/*
-%endif
This page took 0.200296 seconds and 4 git commands to generate.