blob: 6e2d8978ba7c7921239f9e750bd702a84da1fcd5 (
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
|
# Maintainer: Amro Emad <korialo001 at gmail dot com>
pkgname=python-khali-git
_pkgname=khali
pkgver=1.0.0.r22.6eeae92
pkgrel=1
pkgdesc="Uses khal, vdirsyncer and at to sync calendars and set alarms."
arch=('any')
url="https://codeberg.org/dhruva_sambrani/khali"
depends=(
'python-dateutil'
)
makedepends=(
'git'
'python-build'
'python-installer'
'python-wheel'
'python-setuptools'
)
source=("git+${url}.git")
license=('LicenseRef-None')
sha256sums=('SKIP')
prepare() {
cd "${_pkgname}"
# the script hardcod(ed) to the user's .local/bin undo that.
sed -ir '$ s/\(%.*\/\)//' ${_pkgname}.service
}
build() {
cd "${_pkgname}"
python -m build --wheel --no-isolation
}
pkgver() {
cd "${_pkgname}"
# combine both version from pyproject.toml to git revisions for a temporary versionning
printf "%s.r%s.%s" $(grep version pyproject.toml | head -n 1 | sed 's/version = "\(.*\)"/\1/') "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
package() {
depends=(
'khal-git'
'vdirsyncer'
'at')
cd "${_pkgname}"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname" ./*.md
install -Dm0644 ${_pkgname}.{service,timer} -t "$pkgdir/usr/lib/systemd/user"
}
|