23.1.0-1
[arch-packages.git] / colord-gtk / trunk / PKGBUILD
blobc29080379e0d867566554ab18d2679d86305ebec
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
4 pkgbase=colord-gtk
5 pkgname=(colord-gtk-common colord-gtk colord-gtk4)
6 pkgver=0.3.0
7 pkgrel=2
8 pkgdesc="Additional GTK support code for colord"
9 url="https://www.freedesktop.org/software/colord/"
10 arch=(x86_64)
11 license=(GPL2)
12 makedepends=(gobject-introspection vala gtk-doc git docbook-utils docbook-xsl
13              meson lcms2 colord gtk3 gtk4)
14 _commit=9a2c7f7cb168cd46cb1e163df35e734c7beb3b70  # tags/0.3.0^0
15 source=("git+https://github.com/hughsie/colord-gtk#commit=$_commit")
16 sha256sums=('SKIP')
18 pkgver() {
19   cd $pkgbase
20   git describe --tags | sed 's/^COLORD_GTK_//;s/_/./g;s/[^-]*-g/r&/;s/-/+/g'
23 prepare() {
24   cd $pkgbase
27 build() {
28   arch-meson $pkgbase build -D vapi=true
29   meson compile -C build
32 _pick() {
33   local p="$1" f d; shift
34   for f; do
35     d="$srcdir/$p/${f#$pkgdir/}"
36     mkdir -p "$(dirname "$d")"
37     mv "$f" "$d"
38     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
39   done
42 package_colord-gtk-common() {
43   pkgdesc+=" (common files)"
44   depends=(lcms2 colord)
46   meson install -C build --destdir "$pkgdir"
48   cd "$pkgdir"
50   _pick gtk3 usr/bin/cd-convert
51   _pick gtk3 usr/lib/libcolord-gtk.so*
52   _pick gtk3 usr/lib/pkgconfig/colord-gtk.pc
54   _pick gtk4 usr/lib/libcolord-gtk4.so*
55   _pick gtk4 usr/lib/pkgconfig/colord-gtk4.pc
58 package_colord-gtk() {
59   pkgdesc="${pkgdesc/GTK/GTK3}"
60   depends=(colord-gtk-common="$pkgver-$pkgrel" gtk3)
61   provides=(libcolord-gtk.so)
63   mv gtk3/* "$pkgdir"
66 package_colord-gtk4() {
67   pkgdesc="${pkgdesc/GTK/GTK4}"
68   depends=(colord-gtk-common="$pkgver-$pkgrel" gtk4)
69   provides=(libcolord-gtk4.so)
71   mv gtk4/* "$pkgdir"
74 # vim:set sw=2 et: