summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 722b31f9925b456555d08d3442e42db62ee648f9 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
##
# Maintainer: pyamsoft <developer(dot)pyamsoft(at)gmail(dot)com>
##

_gitname=animwall
# shellcheck disable=SC2034
pkgname=animwall-git
# shellcheck disable=SC2034
pkgdesc="An orchestrator using xwinwrap and mpv to launch animated/gif desktop wallpapers"
# shellcheck disable=SC2034
pkgver=r1.2a35c5a
# shellcheck disable=SC2034
pkgrel=1
# shellcheck disable=SC2034
arch=('any')
# shellcheck disable=SC2034
makedepends=('git')
# shellcheck disable=SC2034
depends=('xwinwrap' 'mpv')
# shellcheck disable=SC2034
optdepends=()
# shellcheck disable=SC2034
provides=('animwall')
# shellcheck disable=SC2034
conflicts=('animwall')
# shellcheck disable=SC2034
license=('GPL2')
# shellcheck disable=SC2034
url="https://github.com/pyamsoft/animwall"

##
# The SHA256 is constantly changing since this is
# pulled from git so skip the verification check
##
# shellcheck disable=SC2034
sha256sums=('SKIP')
# shellcheck disable=SC2034
source=("${_gitname}::git+${url}#branch=main")

###############################################################################

pkgver() {
  # shellcheck disable=SC2154
  cd "$srcdir/$_gitname" || {
        msg "Error couldn't cd into $srcdir/$_gitname"
        return 1
  }

  # From
  # https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver.28.29_function
  # If there are no tags then use number of revisions since beginning of the history:
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/$_gitname" || {
        msg "Error couldn't cd into $srcdir/$_gitname"
        return 1
  }

  chmod 755 animwall
  mkdir -p "${pkgdir}/usr/bin"
  cp animwall "${pkgdir}/usr/bin/animwall"
}