summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ebda2a2ac573e58787a6768b5388fa72a960008e (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
pkgname=pastelock
pkgver=0.3.1
pkgrel=1
pkgdesc="Encrypted clipboard manager with login, scrollable history and text/image paste storage"
arch=('any')
url="https://gitlab.com/E-Gamma-102/pastelock"
license=('custom')  # TODO: set to your real license and ship LICENSE
depends=(
  'python'
  'tk'
  'python-darkdetect'
  'python-packaging'
  'python-pillow'
  'python-pynput'
  'python-pyperclip'
  'python-requests'
  'python-screeninfo'
  'python-evdev'
  'python-xlib'
  'python-customtkinter'
  'python-ctkmessagebox'

)
makedepends=()
source=(
  "${pkgname}-${pkgver}.tar.gz::https://gitlab.com/E-Gamma-102/pastelock/-/archive/v${pkgver}/pastelock-v${pkgver}.tar.gz"
)
sha256sums=('4744930ce3871121eb58b7da484f6ea42007985a4302c83151237963ee886a2a')

build() {
  cd "${srcdir}/pastelock-v${pkgver}"
  python -m compileall .
}

package() {
  cd "${srcdir}/pastelock-v${pkgver}"

  install -d "$pkgdir/usr/lib/${pkgname}"
  cp -a . "$pkgdir/usr/lib/${pkgname}"

  install -Dm755 /dev/stdin "$pkgdir/usr/bin/${pkgname}" <<'EOF'
#!/usr/bin/env bash
APP_DIR="/usr/lib/pastelock"
cd "$APP_DIR"
exec python run.py "$@"
EOF

  install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/${pkgname}.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Name=PasteLock
Comment=Encrypted clipboard manager with login, scrollable history and text/image paste storage
Exec=pastelock
Terminal=false
Categories=Utility;
EOF

  if [[ -f LICENSE ]]; then
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
  fi
}