python-systemd/python-systemd.spec

80 lines
2.4 KiB
RPMSpec
Raw Normal View History

2015-07-08 19:26:34 +00:00
Name: python-systemd
Version: 230
Release: 1%{?dist}
Summary: Python module wrapping systemd functionality
License: LGPLv2+
URL: https://github.com/systemd/python-systemd
2015-07-08 19:55:48 +00:00
#Source0: https://github.com/systemd/python-systemd/archive/v%%{version}.tar.gz
# 'make dist' output from https://github.com/systemd/python-systemd/
Source0: python-systemd-%{version}.tar.gz
2015-07-08 19:26:34 +00:00
BuildRequires: systemd-devel
2015-07-08 19:55:48 +00:00
BuildRequires: python2-devel
2015-07-09 00:27:45 +00:00
BuildRequires: web-assets-devel
Requires: js-jquery
2015-07-08 19:26:34 +00:00
Provides: systemd-python = %{version}-%{release}
Provides: systemd-python%{?_isa} = %{version}-%{release}
Obsoletes: systemd-python < 230
%global _docdir_fmt %{name}
%description
Python module for native access to the systemd facilities.
Functionality includes sending of structured messages to the journal
and reading journal files, querying machine and boot identifiers and a
lists of message identifiers provided by systemd. Other functionality
provided by libsystemd is also wrapped.
This is the version for Python 2.
%package -n python3-systemd
Summary: %{summary}
BuildRequires: python3-devel
2015-07-08 19:55:48 +00:00
BuildRequires: python3-sphinx
2015-07-08 19:26:34 +00:00
Provides: systemd-python3 = %{version}-%{release}
Provides: systemd-python3%{?_isa} = %{version}-%{release}
Obsoletes: systemd-python3 < 230
%description -n python3-systemd
Python module for native access to the systemd facilities.
Functionality includes sending of structured messages to the journal
and reading journal files, querying machine and boot identifiers and a
lists of message identifiers provided by systemd. Other functionality
provided by libsystemd is also wrapped.
This is the version for Python 3.
%prep
%autosetup
%build
2015-07-08 19:55:48 +00:00
make PYTHON=%{__python2} build
make PYTHON=%{__python3} build
make PYTHON=%{__python3} SPHINX_BUILD=sphinx-build-3 sphinx-html
rm -r build/html/.buildinfo build/html/.doctrees
2015-07-08 19:26:34 +00:00
%install
2015-07-08 19:55:48 +00:00
%make_install PYTHON=%{__python2}
%make_install PYTHON=%{__python3}
2015-07-09 00:27:45 +00:00
mkdir -p %{buildroot}%{_pkgdocdir}
cp -rv build/html %{buildroot}%{_pkgdocdir}/
ln -vsf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{_pkgdocdir}/html/_static/jquery.js
2015-07-09 17:26:08 +00:00
cp -p README.md %{buildroot}%{_pkgdocdir}
2015-07-08 19:26:34 +00:00
%files
%license LICENSE.txt
2015-07-09 00:27:45 +00:00
%doc %{_pkgdocdir}
2015-07-08 19:26:34 +00:00
%{python2_sitearch}/*
%files -n python3-systemd
%license LICENSE.txt
2015-07-08 19:55:48 +00:00
%doc %{_pkgdocdir}
2015-07-08 19:26:34 +00:00
%{python3_sitearch}/*
%changelog
* Mon Jul 6 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@laptop> - 230-1
- Initial packaging