summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-06-11 17:18:31 +0200
committerbartus2020-06-11 17:21:01 +0200
commita00285abd67a19cfdbd9ba794bba58c6fb1d98ee (patch)
tree3f6ce830d94df4a9e36d8a5c596bccb876462d5c
parent3c292425485b86a901c3d15a9acab15b56af9467 (diff)
downloadaur-a00285abd67a19cfdbd9ba794bba58c6fb1d98ee.tar.gz
Refactor.
* Remove pkgname from description. * Fix shellcheck warnings. * Unify _pyver.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD27
2 files changed, 14 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0a474d00973..2d392e41891 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = luxcorerender
- pkgdesc = LuxCoreRender is a physically correct, unbiased rendering engine.
+ pkgdesc = Physically correct, unbiased rendering engine.
pkgver = 2.2
pkgrel = 3
epoch = 2
diff --git a/PKGBUILD b/PKGBUILD
index 1e8b0a4bf5d..513dba4118c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ _name=LuxCore-${pkgname}_v${pkgver}
[ -n "${_rel}" ] && _pkgver=${pkgver}${_rel} && pkgver+=".${_rel}" || _pkgver=${pkgver}
pkgrel=3
epoch=2
-pkgdesc="LuxCoreRender is a physically correct, unbiased rendering engine."
+pkgdesc="Physically correct, unbiased rendering engine."
arch=('x86_64')
url="https://www.luxcorerender.org/"
license=('Apache')
@@ -35,33 +35,32 @@ sha256sums=('35b74e5d3e682dc2826d939c66a1c225354c5eb137c86f10930d1caf70a4629b'
'495d183aef045e53ec8c53aa08cdcc082fb4e69ccb0857693cb0cf2684db0760')
prepare() {
- cd ${srcdir}/${_name}
- for patch in ${srcdir}/*.patch; do
+ for patch in "${srcdir}"/*.patch; do
msg2 "apply $patch..."
- patch -Np1 -i $patch
+ patch -Np1 -d "${srcdir}"/${_name} -i "$patch"
done
}
build() {
- _pyver=$(python -c "from sys import version_info; print(\"%d%d\" % (version_info[0],version_info[1]))")
+ _pyver=$(python -c "from sys import version_info; print(\"%d%d\" % (version_info.major,version_info.minor))")
CMAKE_FLAGS+=("-DPYTHON_V=${_pyver}")
cmake "${CMAKE_FLAGS[@]}" -S "${srcdir}"/${_name} -B build -G Ninja
ninja "$(grep -oP -- '-+[A-z]+ ?[0-9]*'<<<"${MAKEFLAGS:--j1}")" -C "${srcdir}/build"
}
package() {
- cd ${srcdir}/build
+ cd "${srcdir}"/build
- install -d -m755 ${pkgdir}/usr/{bin,include,lib}
- install -m755 bin/* ${pkgdir}/usr/bin
- install -m644 lib/* ${pkgdir}/usr/lib
- cp -a ${srcdir}/${_name}/include ${pkgdir}/usr
- for file in ${pkgdir}/usr/include/*/*.in; do mv $file ${file%.in}; done
+ install -d -m755 "${pkgdir}"/usr/{bin,include,lib}
+ install -m755 bin/* "${pkgdir}"/usr/bin
+ install -m644 lib/* "${pkgdir}"/usr/lib
+ cp -a "${srcdir}"/${_name}/include "${pkgdir}"/usr
+ for file in "${pkgdir}"/usr/include/*/*.in; do mv "$file" "${file%.in}"; done
# install pyluxcore to the Python search path
# _pypath=`pacman -Ql python | sed -n '/\/usr\/lib\/python[^\/]*\/$/p' | cut -d" " -f 2`
- _pypath=`python -c 'import sys;print("/usr/lib/python{}.{}".format(sys.version_info.major,sys.version_info.minor))'`
- install -d -m755 ${pkgdir}/${_pypath}
- mv ${pkgdir}/usr/lib/pyluxcore.so ${pkgdir}/${_pypath}
+ _pypath=$(python -c 'from sys import version_info;print("/usr/lib/python{}.{}".format(version_info.major,version_info.minor))')
+ install -d -m755 "${pkgdir}/${_pypath}"
+ mv "${pkgdir}"/usr/lib/pyluxcore.so "${pkgdir}/${_pypath}"
}
# vim:set ts=2 sw=2 et: