summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Iooss2017-06-05 10:24:44 +0200
committerNicolas Iooss2017-06-05 10:24:44 +0200
commit73b62d1e9315d65e4bdd00e78cbe2dfebaa1c551 (patch)
tree5c20ed009e6ee6631c6be0b46360e49baaa860d0
parenteafc1ef9c47cb1268345abcb00cdee875898bc7f (diff)
downloadaur-73b62d1e9315d65e4bdd00e78cbe2dfebaa1c551.tar.gz
libselinux: use full path to ruby and python interpreters
When makepkg is run in a shell environment with rvm or vitualenv, ruby or python can have a version which mismatches the system's one. Use the interpreter from /usr/bin in order to avoid build issues. This issue has been reported in: https://aur.archlinux.org/packages/libselinux/#comment-598645
-rw-r--r--PKGBUILD16
1 files changed, 8 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6f32cd7d5dd1..715bc2c33fd0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -44,9 +44,9 @@ build() {
make swigify
make all
- make PYTHON=python2 pywrap
- make PYTHON=python3 pywrap
- make rubywrap
+ make PYTHON=/usr/bin/python2 pywrap
+ make PYTHON=/usr/bin/python3 pywrap
+ make RUBY=/usr/bin/ruby rubywrap
}
package(){
@@ -55,11 +55,11 @@ package(){
export DISABLE_RPM=y
make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install
- make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=python2 install-pywrap
- make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=python3 install-pywrap
- make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install-rubywrap
- python2 -m compileall "${pkgdir}/$(python2 -c 'import site; print(site.getsitepackages()[0])')"
- python3 -m compileall "${pkgdir}/$(python3 -c 'import site; print(site.getsitepackages()[0])')"
+ make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=/usr/bin/python2 install-pywrap
+ make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib PYTHON=/usr/bin/python3 install-pywrap
+ make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib RUBY=/usr/bin/ruby install-rubywrap
+ /usr/bin/python2 -m compileall "${pkgdir}/$(/usr/bin/python2 -c 'import site; print(site.getsitepackages()[0])')"
+ /usr/bin/python3 -m compileall "${pkgdir}/$(/usr/bin/python3 -c 'import site; print(site.getsitepackages()[0])')"
install -Dm 0644 "${srcdir}"/libselinux.tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/libselinux.conf
}