summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 547e32f79d0ea5745eae75219ba0452b98070cc1 (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
# Maintainer: Marko Zivic <marko.b.zivic@gmail.com>
pkgname=endcord
pkgver=0.4.0
pkgrel=1
pkgdesc="Third-party feature rich Discord client, running entirely in terminal."
arch=('any')
url="https://github.com/mzivic7/$pkgname"
license=('GPL')
depends=()
makedepends=('python>=3.11' 'python-pipenv' 'git')
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "$pkgname"
	export PIPENV_VENV_IN_PROJECT=1
	pipenv install --dev
}

build() {
	cd "$pkgname"
	export PIPENV_VENV_IN_PROJECT=1
	pipenv run python -m PyInstaller --noconfirm --onefile --windowed --clean --name "$pkgname" "main.py"
}

package() {
	cd "$pkgname"
	install -Dm755 ./dist/$pkgname "$pkgdir/usr/bin/$pkgname"
	install -Dm644 ./README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
	install -Dm644 ./LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}