summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6a1b502e6e2b208a617c3e7ac7100fee0f3fdd20 (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
# Maintainer: Felipe Martin <me@fmartingr.com>

pkgname="jrnl-venv-bin"
pkgver="2.0.1"
pkgrel="1"
pkgdesc="Collect your thoughts and notes without leaving the command line. [installed inside a virtualenv to prevent depedencies directly on the system]"
arch=('i686' 'x86_64')
url="https://jrnl.sh/"
license=('MIT')
depends=('python' 'python-virtualenv' 'python-pip')
optdepends=('')
conflicts=('')
source=()
md5sums=()


prepare() {
	mkdir -p "$srcdir/jrnl-venv-bin"
	cd "$srcdir/jrnl-venv-bin" || exit
	python3 -m venv venv
	source venv/bin/activate
	pip install jrnl==2.0.1
}

package() {
	mkdir "$pkgdir/opt"
	cp -r "$srcdir/jrnl-venv-bin" "$pkgdir/opt/jrnl-venv-bin"
	cd "$pkgdir/" || exit
	mkdir -p usr/local/bin
	ln -s "/opt/jrnl-venv-bin/venv/bin/jrnl" "$pkgdir/usr/local/bin/jrnl"
	sed -i "1s/.*/#!\/opt\/jrnl-venv-bin\/venv\/bin\/python/" "opt/jrnl-venv-bin/venv/bin/jrnl"
}