From ce361e1cc5540706ddf3d9d01011d4021deab747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 8 Jul 2015 15:55:48 -0400 Subject: [PATCH] Also build documentation --- .gitignore | 1 + python-systemd.spec | 23 +++++++++++++---------- sources | 1 + 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index e69de29..f33bb3c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/python-systemd-230.tar.gz diff --git a/python-systemd.spec b/python-systemd.spec index 9630419..eb79712 100644 --- a/python-systemd.spec +++ b/python-systemd.spec @@ -5,10 +5,12 @@ Summary: Python module wrapping systemd functionality License: LGPLv2+ URL: https://github.com/systemd/python-systemd -Source0: https://github.com/systemd/python-systemd/archive/v%{version}.tar.gz +#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 -BuildRequires: python2-devel BuildRequires: systemd-devel +BuildRequires: python2-devel Provides: systemd-python = %{version}-%{release} Provides: systemd-python%{?_isa} = %{version}-%{release} @@ -28,6 +30,7 @@ This is the version for Python 2. %package -n python3-systemd Summary: %{summary} BuildRequires: python3-devel +BuildRequires: python3-sphinx Provides: systemd-python3 = %{version}-%{release} Provides: systemd-python3%{?_isa} = %{version}-%{release} @@ -46,23 +49,23 @@ This is the version for Python 3. %autosetup %build -sed -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' \ - systemd/id128-constants.h -%{__python2} setup.py build -%{__python3} setup.py build +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 %install -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} +%make_install PYTHON=%{__python2} +%make_install PYTHON=%{__python3} %files %license LICENSE.txt -%doc README.md +%doc README.md build/html %{python2_sitearch}/* %files -n python3-systemd %license LICENSE.txt -%doc README.md +%doc %{_pkgdocdir} %{python3_sitearch}/* %changelog diff --git a/sources b/sources index e69de29..13e4dd9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +9ead70ab71bf42fb99e94e8af1ed78a5 python-systemd-230.tar.gz