From 58ee672743a1e7005b10a6fb53775b60606a44b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 27 Feb 2017 20:19:00 +0100 Subject: [PATCH] rpm: add packaging QubesOS/qubes-issues#853 --- .gitignore | 1 + Makefile | 12 +++++ Makefile.builder | 2 + rpm_spec/qubes-core-mgmt-client.spec | 65 ++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 Makefile create mode 100644 Makefile.builder create mode 100644 rpm_spec/qubes-core-mgmt-client.spec diff --git a/.gitignore b/.gitignore index dfa5806..d215ebf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pyc *.pyo build/ +pkgs/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cf4a533 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +.PHONY: all +all: build + +PYTHON ?= python + +.PHONY: build +build: + $(PYTHON) setup.py build + +.PHONY: install +install: + $(PYTHON) setup.py install -O1 --skip-build $(PYTHON_PREFIX_ARG) --root $(DESTDIR) diff --git a/Makefile.builder b/Makefile.builder new file mode 100644 index 0000000..930d3fa --- /dev/null +++ b/Makefile.builder @@ -0,0 +1,2 @@ + +RPM_SPEC_FILES := rpm_spec/qubes-core-mgmt-client.spec diff --git a/rpm_spec/qubes-core-mgmt-client.spec b/rpm_spec/qubes-core-mgmt-client.spec new file mode 100644 index 0000000..6d0a38a --- /dev/null +++ b/rpm_spec/qubes-core-mgmt-client.spec @@ -0,0 +1,65 @@ +Name: qubes-core-mgmt-client +Version: %(cat version) +Release: 0.1%{?dist} +Summary: Qubes OS management client tools + +Group: Qubes +License: LGPLv2.1+ +URL: https://www.qubes-os.org + +BuildRequires: python2-setuptools +BuildRequires: python3-setuptools +BuildRequires: python2-devel +BuildRequires: python3-devel +Requires: python3-qubesmgmt +BuildArch: noarch + +%if 0%{?qubes_builder} +%define _builddir %(pwd) +%endif + +%description +This package include managemt tools, like qvm-*. + +%package -n python2-qubesmgmt +Summary: Python2 module qubesmgmt + +%description -n python2-qubesmgmt +Python2 module qubesmgmt. + +%package -n python3-qubesmgmt +Summary: Python3 module qubesmgmt + +%description -n python3-qubesmgmt +Python3 module qubesmgmt. + +%prep +%if !0%{?qubes_builder} +%setup -q +%endif + + +%build +make %{?_smp_mflags} PYTHON=%{__python2} +make %{?_smp_mflags} PYTHON=%{__python3} + + +%install +%make_install PYTHON=%{__python2} +%make_install PYTHON=%{__python3} + + +%files +%doc LICENSE + +%files -n python2-qubesmgmt +%{python_sitelib}/qubesmgmt-*egg-info +%{python_sitelib}/qubesmgmt + +%files -n python3-qubesmgmt +%{python3_sitelib}/qubesmgmt-*egg-info +%{python3_sitelib}/qubesmgmt + + +%changelog +