summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5630c76a2a7e717c96af2eebdf8f26a632ddf04b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=folder-color-nemo
_pkgname=${pkgname%-nemo}
pkgver=0.4.1
pkgrel=2
pkgdesc="Change your folder color in Nemo"
arch=('any')
url="https://github.com/costales/folder-color"
license=('GPL-3.0-or-later')
depends=('nemo-python')
makedepends=(
  'git'
  'python-build'
  'python-distutils-extra'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)
conflicts=('folder-color-bzr' 'folder-color-common')
_commit=67428606aa802e624b5b783f9f06f8bd724ae56c  # 0.4.1
source=("git+https://github.com/costales/folder-color.git#commit=${_commit}")
sha256sums=('SKIP')

build() {
  cd "${_pkgname}"

  pushd install-scripts
  ./nemo.sh GTK3
  popd

  python -m build --wheel --no-isolation
}

package() {
  cd "${_pkgname}"
  python -m installer --destdir="$pkgdir" dist/*.whl

  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
  mv "${pkgdir}${site_packages}/usr/share/nemo-python" "$pkgdir/usr/share/"
  rm -rf "${pkgdir}${site_packages}/usr/"
}