summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6c1554ffb79aa4871008dbee936c1ff7cde33e7d (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
42
43
44
45
46
47
48
49
50
51
52
# Maintainer: dreieck

_depends="android-studio-canary"
_provides="android-studio"
_pkgname="${_depends}-${_provides}-provides"
pkgname="${_pkgname}"
pkgver=2024.1.2.3
pkgrel=1
pkgdesc="Dummy/ meta package that symlinks '${_depends}' to '${_provides}', and satisfies '${_provides}' dependencies."
url="https://aur.archlinux.org/packages/${_depends}"
arch=("any")
license=('custom: public domain')
depends=(
  "${_depends}"
)
provides=(
  "${_provides}=${pkgver}"
)
conflicts=(
  "${_provides}"
)
source=(
  'license-metapackage-pd.txt'
)
sha256sums=(
  '1e86f8ac1ad7315c76f4db8bf6a1dbdde6825ac95ff468e431bbe452b6865ae6'
)

pkgver() {
  pacman -Q "${_depends}" | cut -d ' ' -f 2 | sed -E 's|-.*||'
}

package() {
  install -dvm755 "${pkgdir}/usr/bin"
  cd "${pkgdir}/usr/bin"
  ln -sv "${_depends}" "${_provides}"

  install -dvm755 "${pkgdir}/opt"
  cd "${pkgdir}/opt"
  ln -sv "${_depends}" "${_provides}"

  install -dvm755 "${pkgdir}/usr/share/applications"
  cd "${pkgdir}/usr/share/applications"
  ln -sv "${_depends}.desktop" "${_provides}.desktop"

  install -dvm755 "${pkgdir}/usr/share/pixmaps"
  cd "${pkgdir}/usr/share/pixmaps"
  ln -sv "${_depends}.png" "${_provides}.png"

  cd "${srcdir}"
  install -D -v -m644 "${srcdir}/license-metapackage-pd.txt" "${pkgdir}/usr/share/licenses/${pkgname}/copying.public-domain.txt"
}