summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0088a0316e511a7dd53729c376fe255268eab950 (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
# Maintainer: Butter Cat <ButteredCats@protonmail.com>

_pkgname="xdg-unused-data"
pkgname="${_pkgname}-git"
pkgver=r123.f605067
pkgrel=1
pkgdesc="A simple way to identify unused applications data in user directories such as ~./config and ~/.cache."
arch=('any')
url="https://github.com/pawel-0/xdg-unused-data"
license=('MIT')
depends=('jq')
makedepends=('git')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${_pkgname}::git+${url}")
sha256sums=('SKIP')

pkgver() {
  cd "${_pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

package() {
  cd "${srcdir}/${_pkgname}"
  install -Dm755 -t "${pkgdir}/opt/xdg-unused-data" xdg-unused-data.sh application_schema.json
  install -Dm755 -t "${pkgdir}/opt/xdg-unused-data/applications" applications/*
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
  mkdir "${pkgdir}/usr/bin"
  ln -s "/opt/xdg-unused-data/xdg-unused-data.sh" "${pkgdir}/usr/bin/xdg-unused-data"
}