]> git.pld-linux.org Git - packages/pg_activity.git/blame_incremental - pg_activity.spec
- make sure installs are consistent and macthing internal deps
[packages/pg_activity.git] / pg_activity.spec
... / ...
CommitLineData
1# TODO:
2# Move man dir to proper place ?
3
4# NOTE:
5# Not sure if should be build as separate packages for py 3.x / 2.x with different binaries? Same conflicting binaries?
6# Are modules used by other soft? If not, just switch to py 3.x ?
7
8# Conditional build:
9%bcond_without tests # do not perform "make test"
10%bcond_without python2 # CPython 2.x module
11%bcond_without python3 # CPython 3.x module
12
13%define module pgactivity
14Summary: A top like application for PostgreSQL server activity monitoring
15Name: pg_activity
16Version: 1.3.0
17Release: 3
18License: distributable
19Group: Libraries/Python
20Source0: https://github.com/julmon/pg_activity/archive/v%{version}.tar.gz
21# Source0-md5: 88096354973c38761f056d04e550f58b
22URL: https://github.com/julmon/pg_activity
23BuildRequires: rpm-pythonprov
24BuildRequires: rpmbuild(macros) >= 1.710
25# when using /usr/bin/env or other in-place substitutions
26#BuildRequires: sed >= 4.0
27# when python3 present
28%if %{with python2}
29BuildRequires: python-psutil
30BuildRequires: python-psycopg2 >= 2.2.1
31BuildRequires: python-setuptools
32%endif
33%if %{with python3}
34BuildRequires: python3-modules
35BuildRequires: python3-psutil
36BuildRequires: python3-psycopg2 >= 2.2.1
37BuildRequires: python3-setuptools
38%endif
39# Below Rs only work for main package (python2)
40Requires: python-modules
41Requires: python-psutil
42Requires: python-psycopg2
43BuildArch: noarch
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47htop like application for PostgreSQL server activity monitoring
48
49%description -l pl.UTF-8
50Podobna do htop aplikacja monitorująca aktywność PostgresSQL
51
52%package -n python3-%{module}
53Summary: -
54Summary(pl.UTF-8): -
55Group: Libraries/Python
56Requires: python3-modules
57Requires: python3-psutil
58Requires: python3-psycopg2
59
60%description -n python3-%{module}
61
62%description -n python3-%{module} -l pl.UTF-8
63
64%package apidocs
65Summary: %{module} API documentation
66Summary(pl.UTF-8): Dokumentacja API %{module}
67Group: Documentation
68
69%description apidocs
70API documentation for %{module}.
71
72%description apidocs -l pl.UTF-8
73Dokumentacja API %{module}.
74
75%prep
76%setup -q
77
78%build
79%if %{with python2}
80%py_build
81%endif
82
83%if %{with python3}
84%py3_build
85%endif
86
87%if %{with doc}
88cd docs
89%{__make} -j1 html
90rm -rf _build/html/_sources
91%endif
92
93%install
94rm -rf $RPM_BUILD_ROOT
95%if %{with python3}
96%py3_install
97%endif
98
99%if %{with python2}
100rm -r $RPM_BUILD_ROOT%{_bindir}
101%py_install
102%py_postclean
103%endif
104
105%clean
106rm -rf $RPM_BUILD_ROOT
107
108%if %{with python2}
109%files
110%defattr(644,root,root,755)
111%doc README.md
112%attr(755,root,root) %{_bindir}/pg_activity
113%dir %{py_sitescriptdir}/%{module}
114%{py_sitescriptdir}//%{module}/*.py[co]
115%{py_sitescriptdir}/%{name}-%{version}-py*.egg-info
116%endif
117
118%if %{with python3}
119%files -n python3-%{module}
120%defattr(644,root,root,755)
121%doc README.md docs
122%{py3_sitescriptdir}/%{module}
123%{py3_sitescriptdir}/%{name}-%{version}-py*.egg-info
124%endif
125
126%if %{with doc}
127%files apidocs
128%defattr(644,root,root,755)
129%doc docs/_build/html/*
130%endif
This page took 0.132413 seconds and 4 git commands to generate.