]> git.pld-linux.org Git - packages/apparmor-utils.git/commitdiff
- added pysetup patch, pass PLD-specific purelib path
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 26 Apr 2016 17:39:01 +0000 (19:39 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 26 Apr 2016 17:39:01 +0000 (19:39 +0200)
apparmor-utils-pysetup.patch [new file with mode: 0644]
apparmor-utils.spec

diff --git a/apparmor-utils-pysetup.patch b/apparmor-utils-pysetup.patch
new file mode 100644 (file)
index 0000000..0684471
--- /dev/null
@@ -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
index 8e03e84251455ee590924872131d713ba5045777..f34b29ca81feebd0bec7670a35247230d83753bf 100644 (file)
@@ -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*
This page took 0.045061 seconds and 4 git commands to generate.