[arch-commits] Commit in xapps/trunk (PKGBUILD)
Eli Schwartz
eschwartz at archlinux.org
Wed Apr 18 14:12:26 UTC 2018
Date: Wednesday, April 18, 2018 @ 14:12:25
Author: eschwartz
Revision: 316878
upgpkg: xapps 1.2.0-1
upstream release
Modified:
xapps/trunk/PKGBUILD
----------+
PKGBUILD | 55 +++++++++++++++++++++++++------------------------------
1 file changed, 25 insertions(+), 30 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-04-18 13:36:33 UTC (rev 316877)
+++ PKGBUILD 2018-04-18 14:12:25 UTC (rev 316878)
@@ -4,45 +4,40 @@
# Contributor: Nate Simon <aurpkg (at natesimon.net)>
pkgname=xapps
-pkgver=1.0.4
-pkgrel=2
+pkgver=1.2.0
+pkgrel=1
pkgdesc="Common library for X-Apps project"
arch=('x86_64')
-url="https://github.com/linuxmint/xapps"
+url="https://github.com/linuxmint/${pkgname}"
license=('GPL')
-depends=('libgnomekbd' 'python')
-makedepends=('gnome-common' 'gobject-introspection' 'python-gobject' 'python2-gobject')
-options=(!emptydirs)
+depends=('libgnomekbd')
+makedepends=('meson' 'gobject-introspection' 'python-gobject' 'python2-gobject' 'vala')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
-sha256sums=('6578574561cb10b602c67669b0374b71d9cccd5d1c13c17d6a4b6ec2f8fe739a')
+sha256sums=('94a80164627bab115f44e5c7fd994cdb13e75162fa64a64301afcca2483706e7')
-prepare() {
- cd "${srcdir}"/${pkgname}-${pkgver}
-
- NOCONFIGURE=1 ./autogen.sh
-}
-
build() {
- cd "${srcdir}"/${pkgname}-${pkgver}
- mkdir -p build build-py2
+ mkdir -p "${srcdir}"/${pkgname}-${pkgver}/build
+ cd "${srcdir}"/${pkgname}-${pkgver}/build
- cd build
- ../configure --prefix=/usr \
- --localstatedir=/var \
- --libexecdir=/usr/lib/${pkgname}
- make
-
- cd ../build-py2
- PYTHON=python2 ../configure --prefix=/usr \
- --localstatedir=/var \
- --libexecdir=/usr/lib/${pkgname}
+ meson --prefix=/usr --buildtype=plain ..
+ ninja
}
package(){
- cd "${srcdir}"/${pkgname}-${pkgver}
- make -C build DESTDIR="${pkgdir}" install
- make -C build-py2/pygobject DESTDIR="${pkgdir}" install
+ cd "${srcdir}"/${pkgname}-${pkgver}/build
- # Not worth fixing out-of-tree builds properly as git master has migrated to meson
- cp -Rv files/usr/share "${pkgdir}"/usr
+ DESTDIR="${pkgdir}" ninja install
+ # rm useless scripts
+ rm -r "${pkgdir}"/usr/bin
+
+ # byte-compile python modules since meson does not implement autotools'
+ # py-compile.
+ # This is kind of ugly but removes traces of the build root.
+ for _python in python3 python2; do
+ while read -rd '' _file; do
+ _destdir="$(dirname "${_file#${pkgdir}}")"
+ ${_python} -m compileall -d "${_destdir}" "${_file}"
+ ${_python} -O -m compileall -d "${_destdir}" "${_file}"
+ done < <(find "${pkgdir}"/usr/lib/${_python}* -name '*.py' -print0)
+ done
}
More information about the arch-commits
mailing list