Attached is a revised version that removes USE_GMAKE. --Aaron
On 2020-14-10 13:12 -0500, Aaron Poffenberger <a...@hypernote.com> wrote: > Update kcaldav to 0.2.0. > > In addition to bugfixes from upstream, I've cleaned up the port a bit and > made the following changes: > > - Update WANTLIB and switch to USE_GMAKE in Makefile > - Create TEST target in Makefile > - Clean-up code examples in README > - Add details about calendar URLs in README > - Enabled errror logging > - Create /var/www/logs/kcaldav-system.log file > > --Aaron > Index: Makefile =================================================================== RCS file: /cvs/ports/www/kcaldav/Makefile,v retrieving revision 1.17 diff -u -p -r1.17 Makefile --- Makefile 1 Feb 2020 20:44:16 -0000 1.17 +++ Makefile 14 Oct 2020 19:34:19 -0000 @@ -2,8 +2,7 @@ COMMENT = a simple, safe, and minimal CalDAV server -DISTNAME = kcaldav-0.1.11 -REVISION = 0 +DISTNAME = kcaldav-0.2.0 CATEGORIES = www HOMEPAGE = https://kristaps.bsd.lv/kcaldav/ @@ -13,7 +12,7 @@ MAINTAINER = Aaron Poffenberger <akp@hy PERMIT_PACKAGE = Yes # "make port-lib-depends-check" can help -WANTLIB += c expat m sqlite3 pthread +WANTLIB += c expat m sqlite3 MASTER_SITES = https://kristaps.bsd.lv/kcaldav/snapshots/ EXTRACT_SUFX = .tgz @@ -21,23 +20,23 @@ EXTRACT_SUFX = .tgz BUILD_DEPENDS = www/kcgi LIB_DEPENDS = databases/sqlite3 -CONFIGURE_STYLE = simple -USE_GMAKE = Yes -CONFIGURE_ARGS = CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" - FAKE_FLAGS = PREFIX=${WRKINST}${TRUEPREFIX} \ HTDOCSPREFIX=${VARBASE}/www/htdocs/kcaldav \ CGIPREFIX=${VARBASE}/www/cgi-bin \ CALPREFIX=${VARBASE}/www/caldav -# no doc on how to run tests -NO_TEST = Yes +CONFIGURE_STYLE = simple +CONFIGURE_ARGS = CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" ALL_TARGET = all libkcaldav.a INSTALL_TARGET = install installcgi +TEST_TARGET = regress post-install: ln -s kcaldav ${WRKINST}${VARBASE}/www/cgi-bin/kcaldav.cgi + mkdir -p ${WRKINST}${VARBASE}/www/logs/ + touch ${WRKINST}${VARBASE}/www/logs/kcaldav-system.log + chown www:www ${WRKINST}${VARBASE}/www/logs/kcaldav-system.log .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/www/kcaldav/distinfo,v retrieving revision 1.6 diff -u -p -r1.6 distinfo --- distinfo 17 Nov 2019 09:28:23 -0000 1.6 +++ distinfo 14 Oct 2020 16:59:33 -0000 @@ -1,2 +1,2 @@ -SHA256 (kcaldav-0.1.11.tgz) = kdhMkW/oZWZemKDP+eSmDzqYB5nH9Pj2Rj2bhLeVerk= -SIZE (kcaldav-0.1.11.tgz) = 91960 +SHA256 (kcaldav-0.2.0.tgz) = ajCsg1iuhu33r7YG1dXXKFzVsQYxTbtz8zqLmChTyvQ= +SIZE (kcaldav-0.2.0.tgz) = 291932 Index: patches/patch-kcaldav_sql =================================================================== RCS file: /cvs/ports/www/kcaldav/patches/patch-kcaldav_sql,v retrieving revision 1.2 diff -u -p -r1.2 patch-kcaldav_sql --- patches/patch-kcaldav_sql 8 Apr 2018 08:29:22 -0000 1.2 +++ patches/patch-kcaldav_sql 14 Oct 2020 17:04:10 -0000 @@ -4,7 +4,7 @@ Index: kcaldav.sql --- kcaldav.sql.orig +++ kcaldav.sql @@ -1,4 +1,3 @@ --PRAGMA journal_mode = WAL; +-PRAGMA journal_mode=WAL; PRAGMA foreign_keys=ON; -- A resource is a ``file'' managed by the CalDAV server. Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/www/kcaldav/pkg/PLIST,v retrieving revision 1.5 diff -u -p -r1.5 PLIST --- pkg/PLIST 1 Feb 2020 20:44:16 -0000 1.5 +++ pkg/PLIST 14 Oct 2020 18:00:50 -0000 @@ -3,7 +3,11 @@ include/libkcaldav.h @static-lib lib/libkcaldav.a @man man/man1/kcaldav.passwd.1 -@man man/man3/libkcaldav.3 +@man man/man3/caldav_free.3 +@man man/man3/caldav_parse.3 +@man man/man3/ical_free.3 +@man man/man3/ical_parse.3 +@man man/man3/ical_print.3 @man man/man8/kcaldav.8 share/doc/pkg-readmes/${PKGSTEM} @cwd /var/www @@ -21,6 +25,8 @@ htdocs/kcaldav/collection.html htdocs/kcaldav/collection.min.js htdocs/kcaldav/home.html htdocs/kcaldav/home.min.js -htdocs/kcaldav/md5.min.js -htdocs/kcaldav/script.min.js htdocs/kcaldav/style.css +@mode 775 +@owner www +@group www +logs/kcaldav-system.log Index: pkg/README =================================================================== RCS file: /cvs/ports/www/kcaldav/pkg/README,v retrieving revision 1.5 diff -u -p -r1.5 README --- pkg/README 4 Sep 2018 12:46:24 -0000 1.5 +++ pkg/README 14 Oct 2020 17:54:14 -0000 @@ -8,9 +8,9 @@ Administrator Quick Start ========================= Create users by running: - doas kcaldav.passwd -C -u <user> -e email -f /var/www/caldav - doas chown www:www /var/www/caldav/kcaldav.db - doas chmod 640 /var/www/caldav/kcaldav.db + $ doas kcaldav.passwd -C -u <user> -e email -f /var/www/caldav + $ doas chown www:www /var/www/caldav/kcaldav.db + $ doas chmod 640 /var/www/caldav/kcaldav.db Read kcaldav.passwd(1) for more details about creating new calenders for users, changing email address and other @@ -32,14 +32,25 @@ Administrator Quick Start } } + Remember to enable and start slowcgi(8). See rcctl(8). + kcaldav.cgi uses http authentication for user security. Install a tls certificate to ensure privacy of connection. + See ssl(8) for details. + User Quick Start ================ - Users can manage their account settings, create calendars + Users can manage their account settings, create calendars, and find the URL for use with their calendar application - by browsing to: https://localhost/kcaldav/home.html + by browsing to: + + https://example.org/kcaldav/home.html + + The URL will look like: + + https://example.org:/cgi-bin/kcaldav/<username>/ + Porting Notes: Write Ahead Logging ================================== @@ -53,23 +64,23 @@ Porting Notes: Write Ahead Logging Open the kcaldav.db: - % doas sqlite3 caldav/kcaldav.db + $ doas sqlite3 caldav/kcaldav.db Type: - sqlite> PRAGMA journal_mode=WAL; + sqlite> PRAGMA journal_mode=WAL; To disable WAL later open the kcaldav db and type: - sqlite> PRAGMA journal_mode=DELETE; + sqlite> PRAGMA journal_mode=DELETE; If you plan to run kcaldav in a chroot environment you must create a /tmp directory in the chroot and it must be writable by the httpd daemon account: - % doas mkdir /var/www/tmp - % doas chown www:daemon /var/www/tmp - % doas chmod 755 /var/www/tmp + $ doas mkdir /var/www/tmp + $ doas chown www:daemon /var/www/tmp + $ doas chmod 755 /var/www/tmp For more details about WAL and temp directory requirements see: