agendafs
A filesystem for your calendar.
git clone git://mccd.space/agendafscommit c00cd0a0ed7bed0f564fd5452aec456dec8d7ce3
parent ab0a518c53ae312d3e7f40e370695213c88ab375
Author: Marc Coquand <marc@coquand.email>
Date: Sun, 27 Jul 2025 10:13:13 +0200
Add manpages
Implements: https://todo.sr.ht/~marcc/agendafs/26
Diffstat:
4 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,2 +1 @@
-mount_caldavfs
-mount_caldavfs-debug
+build
diff --git a/Makefile b/Makefile
@@ -2,9 +2,12 @@ CC ?= gcc
CFLAGS = -Wall -O3
CFLAGS_DEBUG = -Wall -g -DDEBUG
LIBS = `pkg-config uuid fuse3 libical --cflags --libs`
-OUTDIR=.build
+OUTDIR=build
+PREFIX?=/usr/local
+BINDIR?=$(PREFIX)/bin
+MANDIR?=$(PREFIX)/share/man
+.DEFAULT_GOAL=all
-all: agendafs manpages
agendafs: main.c path.c util.c hashmap.c agenda_entry.c tree.c
mkdir -p $(OUTDIR)
@@ -12,10 +15,23 @@ agendafs: main.c path.c util.c hashmap.c agenda_entry.c tree.c
debug: main.c path.c util.c hashmap.c agenda_entry.c tree.c
mkdir -p $(OUTDIR)
- $(CC) $(CFLAGS_DEBUG) $(DEBUG_FLAGS) *.c -o $(OUTDIR)/mount_agendafs_debug.o $(LIBS)
+ $(CC) $(CFLAGS_DEBUG) *.c -o $(OUTDIR)/mount_agendafs_debug.o $(LIBS)
clean:
rm -f $(OUTDIR)
manpages:
- scdoc < agendafs.1.scd > agendafs.1
+ scdoc < agendafs.1.scd > $(OUTDIR)/agendafs.1
+
+all: agendafs manpages
+
+install:
+ mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
+ install -m755 $(OUTDIR)/mount_agendafs.o $(DESTDIR)$(BINDIR)/mount.agendafs
+ install -m644 $(OUTDIR)/agendafs.1 $(DESTDIR)$(MANDIR)/man1/agendafs.1
+ ln -s $(DESTDIR)$(MANDIR)/man1/agendafs.1 $(DESTDIR)$(MANDIR)/man1/mount.agendafs.1
+
+uninstall:
+ rm -f $(DESTDIR)$(BINDIR)/mount.agendafs
+ rm -r $(DESTDIR)$(MANDIR)/man1/mount.agendafs.1
+ rm -f $(DESTDIR)$(MANDIR)/man1/agendafs.1
diff --git a/README.md b/README.md
@@ -40,13 +40,13 @@ Agendafs pairs well with file explorers like `ranger`, `lf` or `nnn`.
To mount a vdir storage with Agendafs:
```
-mount_agendafs -o vdir=<vdir directory> <mountpoint>
+mount.agendafs -o vdir=<vdir directory> <mountpoint>
```
For example
```
-mount_agendafs -o vdir=~/.calendars/my-journal /home/bob/journal
+mount.agendafs -o vdir=~/.calendars/my-journal /home/bob/journal
```
### Limitations
diff --git a/agendafs.1.scd b/agendafs.1.scd
@@ -6,7 +6,7 @@ agendafs - Mount notes from vdir storages
# SYNOPSIS
-*mount_agendafs* [-fnrsvw] [-o _OPTIONS_] _MOUNTPOINT_
+*mount.agendafs* [-fnrsvw] [-o _OPTIONS_] _MOUNTPOINT_
# OPTIONS
@@ -35,7 +35,7 @@ vdirsyncer (https://vdirsyncer.pimutils.org/en/stabl)
To mount a vdir storage with agendafs:
```
-mount_agendafs -o vdir=/home/bob/.calendars/vjournal-calendar /home/bob/journal
+mount.agendafs -o vdir=/home/bob/.calendars/vjournal-calendar /home/bob/journal
```
# AUTHORS