[packages/apparmor-utils] - added pysetup patch, pass PLD-specific purelib path

qboosh qboosh at pld-linux.org
Tue Apr 26 19:38:28 CEST 2016


commit 9af55ceb051f6cd13dcb12ae211d677fb6467b38
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Apr 26 19:39:01 2016 +0200

    - added pysetup patch, pass PLD-specific purelib path

 apparmor-utils-pysetup.patch | 11 +++++++++++
 apparmor-utils.spec          | 21 +++++++++++++--------
 2 files changed, 24 insertions(+), 8 deletions(-)
---
diff --git a/apparmor-utils.spec b/apparmor-utils.spec
index 8e03e84..f34b29c 100644
--- a/apparmor-utils.spec
+++ b/apparmor-utils.spec
@@ -1,4 +1,5 @@
-
+#
+# Conditional build:
 %bcond_with	python3	# use Python 3 instead of Python 2
 
 Summary:	AppArmor userlevel utilities that are useful in creating AppArmor profiles
@@ -11,6 +12,7 @@ License:	GPL v2
 Group:		Base
 Source0:	http://launchpad.net/apparmor/2.10/%{version}/+download/apparmor-%{version}.tar.gz
 # Source0-md5:	c9d82e04d699b0530b12dec15136027d
+Patch0:		%{name}-pysetup.patch
 URL:		http://wiki.apparmor.net/
 BuildRequires:	gettext-tools
 %if %{with python3}
@@ -53,6 +55,7 @@ Obsługa plików AppArmor dla Vima.
 
 %prep
 %setup -q -n apparmor-%{version}
+%patch0 -p1
 
 %if %{with python3}
 %{__sed} -i -e '1s, */usr/bin/env python,%{__python3},' utils/aa-*
@@ -67,8 +70,10 @@ cd utils
 %{__make} install \
 %if %{with python3}
 	PYTHON="%{__python3}" \
+	PYSETUP_INSTALL_ARGS="--install-purelib=%{py3_sitescriptdir}" \
 %else
 	PYTHON="%{__python}" \
+	PYSETUP_INSTALL_ARGS="--install-purelib=%{py_sitescriptdir}" \
 %endif
 	DESTDIR=$RPM_BUILD_ROOT \
 	BINDIR=$RPM_BUILD_ROOT%{_sbindir} \
@@ -107,14 +112,14 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_datadir}/apparmor
 %{_datadir}/apparmor/easyprof
 %if %{with python3}
-%{py3_sitedir}/apparmor
-%{py3_sitedir}/apparmor-%{version}-py*.egg-info
+%{py3_sitescriptdir}/apparmor
+%{py3_sitescriptdir}/apparmor-%{version}-py*.egg-info
 %else
-%dir %{py_sitedir}/apparmor
-%{py_sitedir}/apparmor/*.py[co]
-%dir %{py_sitedir}/apparmor/rule
-%{py_sitedir}/apparmor/rule/*.py[co]
-%{py_sitedir}/apparmor-%{version}-py*.egg-info
+%dir %{py_sitescriptdir}/apparmor
+%{py_sitescriptdir}/apparmor/*.py[co]
+%dir %{py_sitescriptdir}/apparmor/rule
+%{py_sitescriptdir}/apparmor/rule/*.py[co]
+%{py_sitescriptdir}/apparmor-%{version}-py*.egg-info
 %endif
 %{_mandir}/man5/logprof.conf.5*
 %{_mandir}/man8/aa-*.8*
diff --git a/apparmor-utils-pysetup.patch b/apparmor-utils-pysetup.patch
new file mode 100644
index 0000000..0684471
--- /dev/null
+++ b/apparmor-utils-pysetup.patch
@@ -0,0 +1,11 @@
+--- apparmor-2.10.1/utils/Makefile.orig	2015-11-18 21:29:25.000000000 +0100
++++ apparmor-2.10.1/utils/Makefile	2016-04-26 18:56:36.173658050 +0200
+@@ -57,7 +57,7 @@
+ 	$(MAKE) install_manpages DESTDIR=${DESTDIR}
+ 	$(MAKE) -C vim install DESTDIR=${DESTDIR}
+ 	ln -sf aa-status.8 ${DESTDIR}/${MANDIR}/man8/apparmor_status.8
+-	${PYTHON} ${PYSETUP} install --prefix=${PYPREFIX} --root=${DESTDIR} --version=${VERSION}
++	${PYTHON} ${PYSETUP} install --prefix=${PYPREFIX} --root=${DESTDIR} $(PYSETUP_INSTALL_ARGS) --version=${VERSION}
+ 
+ .PHONY: clean
+ ifndef VERBOSE
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apparmor-utils.git/commitdiff/9af55ceb051f6cd13dcb12ae211d677fb6467b38



More information about the pld-cvs-commit mailing list