aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README-stackrpms.md8
-rw-r--r--infcloud.spec43
-rwxr-xr-xupdate-infcloud-cache15
3 files changed, 66 insertions, 0 deletions
diff --git a/README-stackrpms.md b/README-stackrpms.md
new file mode 100644
index 0000000..ee7b042
--- /dev/null
+++ b/README-stackrpms.md
@@ -0,0 +1,8 @@
+# README for InfCloud for Stackrpms
+
+## Usage
+The rpm deploys infcloud to /usr/share/infcloud. The easiest way to use this on your web server is to set up a symlink in your web root directory:
+
+ sudo ln -s /usr/share/infcloud/radicale_infcloud/web /var/www/html/calendar
+
+The config.js is now stored in /etc/infcloud/. After updating it, be sure to run /usr/sbin/update-infcloud-cache
diff --git a/infcloud.spec b/infcloud.spec
new file mode 100644
index 0000000..d7e8b27
--- /dev/null
+++ b/infcloud.spec
@@ -0,0 +1,43 @@
+%define branch stackrpms
+%define pname RadicaleInfCloud
+Name: infcloud
+Version: 0.13.1
+Release: 1%{?dist}
+Summary: Rich web client for carddav and caldav
+BuildArch: noarch
+
+License: AGPL 3.0
+URL: https://Unrud/RadicaleInfCloud
+Source0: https://gitlab.com/bgstack15/%{pname}/-/archive/%{branch}/%{pname}-%{branch}.tar.gz
+
+BuildRequires: python3
+Requires: python3
+
+%description
+This is the RadicaleInfCloud fork of InfCloud, a
+web-based carddav+caldav client. This includes stackrpms
+customizations. Use at your own risk!
+
+%prep
+%setup -q -n %{pname}-%{branch}
+
+%build
+
+%install
+%{__install} --directory -m0755 \
+ %{buildroot}%{_datadir}/%{name} \
+ %{buildroot}%{_sysconfdir}/%{name} \
+ %{buildroot}%{_sbindir}
+%{__cp} -pr * %{buildroot}%{_datadir}/%{name}
+mv %{buildroot}%{_datadir}/%{name}/radicale_infcloud/web/config.js %{buildroot}%{_sysconfdir}/%{name}/
+%{__install} -m0755 update-infcloud-cache %{buildroot}%{_sbindir}/update-infcloud-cache
+ln -s %{_sysconfdir}/%{name}/config.js %{buildroot}%{_datadir}/%{name}/radicale_infcloud/web/config.js
+
+%files
+%{_datadir}/%{name}
+%{_sysconfdir}/%{name}
+%doc README-stackrpms.md
+
+%changelog
+* Tue May 17 2022 B. Stack <bgstack15@gmail.com> - 0.13.1-1
+- Initial rpm built
diff --git a/update-infcloud-cache b/update-infcloud-cache
new file mode 100755
index 0000000..071ec77
--- /dev/null
+++ b/update-infcloud-cache
@@ -0,0 +1,15 @@
+#!/bin/bash
+# File: /usr/sbin/update-infcloud-cache
+# Part of infcloud rpm for stackrpms
+# Use this script every time you modify any file to force browsers to reload it (empty HTML5 cache).
+
+USE_BIN=none
+MANIFEST=/etc/infcloud/cache.manifest
+test -e $( command -v ed 2>/dev/null ) && USE_BIN=ed
+test -e $( command -v sed 2>/dev/null ) && USE_BIN=sed
+command -v "${USE_BIN}" &> /dev/null || { echo "Error: 'ed' not installed. Aborting." > /dev/stderr; exit 1; }
+case "${USE_BIN}" in
+ ed) printf ",s/#V.*/#V $(date '+%Y%m%d%H%M%S')/\nw\nq\n" | ed -s "${MANIFEST}" ;;
+ sed) sed -i -r -e "s/^#V.*/#V $(date "+%Y%m%d%H%M%S" )/;" "${MANIFEST}" ;;
+ *) echo "Error: need ed or sed. Aborted." 1>/dev/stderr ; exit 1 ;;
+esac
bgstack15