forked from pool/python-py3c
- Add destdir.patch to fix pc file and includes install
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py3c?expand=0&rev=3
This commit is contained in:
committed by
Git OBS Bridge
parent
d85d16e4f7
commit
b5927d85ef
35
destdir.patch
Normal file
35
destdir.patch
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
From eef6c4abaeaba4ee2cb84b2c639ce04de8a20b71 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?=
|
||||||
|
<45601387+jcourreges@users.noreply.github.com>
|
||||||
|
Date: Thu, 4 Jun 2020 11:57:07 +0200
|
||||||
|
Subject: [PATCH] Add DESTDIR for staged installations
|
||||||
|
|
||||||
|
For reference: https://www.gnu.org/prep/standards/html_node/DESTDIR.html
|
||||||
|
|
||||||
|
https://github.com/encukou/py3c/pull/29
|
||||||
|
---
|
||||||
|
Makefile | 10 +++++-----
|
||||||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 761304d..4b04f7c 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -42,12 +42,12 @@ py3c.pc: py3c.pc.in $(includedir)
|
||||||
|
sed -e's:@includedir@:$(realpath $(includedir)):' $< > $@
|
||||||
|
|
||||||
|
install: py3c.pc
|
||||||
|
- mkdir -p -m 0755 $(includedir)/py3c
|
||||||
|
- install -m 0644 include/py3c.h $(includedir)/py3c.h
|
||||||
|
- install -m 0644 $(wildcard include/py3c/*.h) $(includedir)/py3c/
|
||||||
|
+ mkdir -p -m 0755 $(DESTDIR)$(includedir)/py3c
|
||||||
|
+ install -m 0644 include/py3c.h $(DESTDIR)$(includedir)/py3c.h
|
||||||
|
+ install -m 0644 $(wildcard include/py3c/*.h) $(DESTDIR)$(includedir)/py3c/
|
||||||
|
|
||||||
|
- mkdir -p -m 0755 $(pkgconfigdir)
|
||||||
|
- install -m 0644 py3c.pc $(pkgconfigdir)/
|
||||||
|
+ mkdir -p -m 0755 $(DESTDIR)$(pkgconfigdir)
|
||||||
|
+ install -m 0644 py3c.pc $(DESTDIR)$(pkgconfigdir)/
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm py3c.pc ||:
|
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 11 08:32:54 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add destdir.patch to fix pc file and includes install
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 11 08:06:18 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
Thu Jun 11 08:06:18 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@@ -25,6 +25,7 @@ License: MIT
|
|||||||
URL: http://py3c.readthedocs.io/
|
URL: http://py3c.readthedocs.io/
|
||||||
Source: https://github.com/encukou/py3c/archive/v%{version}.tar.gz#/py3c-%{version}.tar.gz
|
Source: https://github.com/encukou/py3c/archive/v%{version}.tar.gz#/py3c-%{version}.tar.gz
|
||||||
Source99: python-py3c-rpmlintrc
|
Source99: python-py3c-rpmlintrc
|
||||||
|
Patch0: destdir.patch
|
||||||
# Needed for test build
|
# Needed for test build
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
@@ -40,14 +41,24 @@ py3c helps you port C extensions to Python 3.
|
|||||||
It provides a detailed guide, and a set of macros to make porting easy
|
It provides a detailed guide, and a set of macros to make porting easy
|
||||||
and reduce boilerplate.
|
and reduce boilerplate.
|
||||||
|
|
||||||
|
%package -n py3c-devel
|
||||||
|
Summary: Development files for py3c
|
||||||
|
|
||||||
|
%description -n py3c-devel
|
||||||
|
py3c helps you port C extensions to Python 3.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n py3c-%{version}
|
%setup -q -n py3c-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
|
# we will use the make install to deploy includes
|
||||||
|
rm -r %{buildroot}%{_includedir}
|
||||||
|
%make_install prefix=%{_prefix}
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -72,8 +83,16 @@ popd
|
|||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
%dir %{_includedir}/python%{python_bin_suffix}
|
|
||||||
%dir %{_includedir}/python%{python_bin_suffix}/py3c
|
%files -n py3c-devel
|
||||||
%{_includedir}/python%{python_bin_suffix}/py3c/*.h
|
%{_includedir}/py3c.h
|
||||||
|
%dir %{_includedir}/py3c
|
||||||
|
%{_includedir}/py3c/capsulethunk.h
|
||||||
|
%{_includedir}/py3c/comparison.h
|
||||||
|
%{_includedir}/py3c/compat.h
|
||||||
|
%{_includedir}/py3c/fileshim.h
|
||||||
|
%{_includedir}/py3c/py3shims.h
|
||||||
|
%{_includedir}/py3c/tpflags.h
|
||||||
|
%{_datadir}/pkgconfig/py3c.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user