summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f4fe18201f8359264a0bfd66b18717283de7238d (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
# Maintainer: kaathe <primordial.serpent.darkstalker.kaathe at proton dot me>
_pkgname=tmux-resurrect
pkgname=tmux-resurrect-git
pkgver=r306.cff343c
pkgrel=1
pkgdesc="Persist tmux environment across system restarts."
arch=('any')
url='https://github.com/tmux-plugins/tmux-resurrect'
install=tmux-resurrect.install
license=('MIT')
depends=('tmux' 'bash')
optdepends=('expect: restore.exp script that fully restores tmux environment')
makedepends=('git')
provides=('tmux-resurrect')
conflicts=('tmux-resurrect')
source=("${pkgname}::git+https://github.com/tmux-plugins/${_pkgname}.git")
sha256sums=('SKIP')

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

prepare() {
  cd "$srcdir/$pkgname"
  sed 's|~/.tmux/plugins/tmux-resurrect|/usr/share/tmux-resurrect-git|' -i scripts/restore.exp
}

package() {
  cd "$srcdir/$pkgname"

  local destdir="$pkgdir/usr/share/$_pkgname"
  install -d "$destdir"
  cp -r lib save_command_strategies scripts strategies *.tmux "$destdir/"

  install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}