archrelease: copy trunk to community-any
[ArchLinux/community.git] / capitaine-cursors / trunk / PKGBUILD
blobabe4d3ec6cb0ba33cb88c572fd01f9b9a015188f
1 # Maintainer: Chih-Hsuan Yen <yan121215@archlinux.org>
2 # Contributor: Ye Jingchen <ye.jingchen@gmail.com>
4 pkgname=capitaine-cursors
5 pkgver=4
6 pkgrel=2
7 pkgdesc="An x-cursor theme inspired by macOS and based on KDE Breeze"
8 arch=(any)
9 url="https://github.com/keeferrourke/capitaine-cursors"
10 license=(LGPL3)
11 source=("https://github.com/keeferrourke/$pkgname/archive/r$pkgver/$pkgname-$pkgver.tar.gz"
12         "inkscape-needs-integers.diff")
13 makedepends=(inkscape xorg-xcursorgen bc xorg-server-xvfb)
14 sha256sums=('41f66e9f4d41729dc5e9185aab3bc4a719fdcca939e6f3f590b6b811b28dedd2'
15             '0d83edb268c84a1889cf921c8e1789c609fa191e3bc7fa2ddb70702033713179')
17 prepare() {
18   cd $pkgname-r$pkgver
19   # From https://github.com/keeferrourke/capitaine-cursors/pull/44
20   sed -i 's#-z -e#-o#' build.sh
21   # Fixes "Cannot parse integer value" warnings from inkscape
22   # Inspired by https://unix.stackexchange.com/a/320703
23   # See also https://github.com/keeferrourke/capitaine-cursors/issues/43#issuecomment-590098233
24   patch -Np1 -i ../inkscape-needs-integers.diff
27 build() {
28   cd $pkgname-r$pkgver
29   for variant in dark light ; do
30     # Run in a virtual Xorg server to avoid warnings from Inkscape `Failed to wrap object of type 'GtkRecentManager'`
31     xvfb-run --auto-display ./build.sh --max-dpi xxxhd --type $variant
32   done
35 package() {
36   cd $pkgname-r$pkgver
37   install -Ddm755 "$pkgdir/usr/share/icons"
38   cp -dr --no-preserve=ownership dist/dark/ "$pkgdir/usr/share/icons/capitaine-cursors"
39   cp -dr --no-preserve=ownership dist/light/ "$pkgdir/usr/share/icons/capitaine-cursors-light"