]> git.pld-linux.org Git - packages/pg_activity.git/blame - pg_activity.spec
- make sure installs are consistent and macthing internal deps
[packages/pg_activity.git] / pg_activity.spec
CommitLineData
d4085243 1# TODO:
d4085243
MK
2# Move man dir to proper place ?
3
4# NOTE:
ab906c73
MK
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 ?
d4085243
MK
7
8# Conditional build:
d4085243
MK
9%bcond_without tests # do not perform "make test"
10%bcond_without python2 # CPython 2.x module
ab906c73 11%bcond_without python3 # CPython 3.x module
d4085243 12
a1c7cd73 13%define module pgactivity
c48ae21a 14Summary: A top like application for PostgreSQL server activity monitoring
d4085243 15Name: pg_activity
ab906c73 16Version: 1.3.0
a1c7cd73 17Release: 3
d4085243
MK
18License: distributable
19Group: Libraries/Python
20Source0: https://github.com/julmon/pg_activity/archive/v%{version}.tar.gz
ab906c73 21# Source0-md5: 88096354973c38761f056d04e550f58b
d4085243
MK
22URL: https://github.com/julmon/pg_activity
23BuildRequires: rpm-pythonprov
ba3901fe 24BuildRequires: rpmbuild(macros) >= 1.710
d4085243
MK
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)
d4085243 40Requires: python-modules
ab906c73
MK
41Requires: python-psutil
42Requires: python-psycopg2
d4085243
MK
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
ab906c73
MK
57Requires: python3-psutil
58Requires: python3-psycopg2
d4085243
MK
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
d4085243
MK
76%setup -q
77
d4085243
MK
78%build
79%if %{with python2}
ba3901fe 80%py_build
d4085243
MK
81%endif
82
83%if %{with python3}
ba3901fe 84%py3_build
d4085243
MK
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
a1c7cd73
JR
95%if %{with python3}
96%py3_install
97%endif
98
d4085243 99%if %{with python2}
a1c7cd73 100rm -r $RPM_BUILD_ROOT%{_bindir}
ba3901fe 101%py_install
d4085243
MK
102%py_postclean
103%endif
d4085243 104
d4085243
MK
105%clean
106rm -rf $RPM_BUILD_ROOT
107
108%if %{with python2}
109%files
110%defattr(644,root,root,755)
c48ae21a
ER
111%doc README.md
112%attr(755,root,root) %{_bindir}/pg_activity
d4085243
MK
113%dir %{py_sitescriptdir}/%{module}
114%{py_sitescriptdir}//%{module}/*.py[co]
d4085243
MK
115%{py_sitescriptdir}/%{name}-%{version}-py*.egg-info
116%endif
d4085243
MK
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}
ab906c73 123%{py3_sitescriptdir}/%{name}-%{version}-py*.egg-info
d4085243
MK
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.494449 seconds and 4 git commands to generate.