Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions package/regenda/package
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
# Copyright (c) 2023 The Toltec Contributors
# SPDX-License-Identifier: MIT

pkgnames=(regenda)
pkgdesc="Caldav agenda app"
url=https://github.com/tenJirka/reGenda
pkgver=0.0.1-1
timestamp=2023-08-23T19:40Z
section="utils"
maintainer="tenJirka <[email protected]>"
license=GPL3
makedepends=(build:python3-venv)
installdepends=(python3 python3-lxml python3-pytz python3-yaml python3-requests python3-dateutil python3-six python3-urllib3 python3-idna)
flags=(patch_rm2fb)
source=(https://github.com/tenJirka/reGenda/archive/refs/tags/0.0.1.zip)
sha256sums=(00d6a1e2f6b59f86ba47ea5c3444f24e112d24eb62082802653fe4649153da01)
image=python

build() {
python3 -m venv venv
# shellcheck disable=SC1091
source venv/bin/activate
mkdir "$srcdir"/python_modules
pip install caldav rm_pysas -t "$srcdir"/python_modules
}

package() {
install -D -m 644 -t "$pkgdir"/opt/etc/draft/ "$srcdir"/regenda.draft
install -D -m 644 -t "$pkgdir"/opt/etc/reGenda/ "$srcdir"/config.yml.example
install -D -m 644 "$srcdir"/icon.png "$pkgdir"/opt/etc/draft/icons/reGenda.png
install -D -m 755 -t "$pkgdir"/opt/usr/lib/reGenda/ "$srcdir"/run.py
install -D -m 644 -t "$pkgdir"/opt/usr/lib/reGenda/ "$srcdir"/languages.py
install -D -m 644 -t "$pkgdir"/opt/usr/lib/reGenda/ "$srcdir"/calendar_caldav.py
mkdir "$pkgdir"/opt/bin/
ln -s /opt/usr/lib/reGenda/run.py "$pkgdir"/opt/bin/reGenda
cp -r "$srcdir"/python_modules/caldav* "$pkgdir"/opt/usr/lib/reGenda/
cp -r "$srcdir"/python_modules/icalendar* "$pkgdir"/opt/usr/lib/reGenda/
cp -r "$srcdir"/python_modules/rm_pySAS* "$pkgdir"/opt/usr/lib/reGenda/
cp -r "$srcdir"/python_modules/recurring_ical_events* "$pkgdir"/opt/usr/lib/reGenda/
cp -r "$srcdir"/python_modules/tzlocal* "$pkgdir"/opt/usr/lib/reGenda/
cp -r "$srcdir"/python_modules/vobject* "$pkgdir"/opt/usr/lib/reGenda/
cp -r "$srcdir"/python_modules/x_wr_timezone* "$pkgdir"/opt/usr/lib/reGenda/
}

configure() {
if [ ! -f /opt/etc/reGenda/config.yml ]; then
cp /opt/etc/reGenda/config.yml.example /opt/etc/reGenda/config.yml
echo -e "\033[33mYou have to config server in /opt/etc/reGenda/config.yml, see https://github.com/tenJirka/reGenda for help.\033[0;39m"
fi
}

postremove() {
rm -f /opt/usr/lib/reGenda/**/*.cpython-*.pyc
}