diff options
author | Martin Stensgård <mastensg@mastensg.net> | 2025-07-22 11:41:10 +0200 |
---|---|---|
committer | Martin Stensgård <mastensg@mastensg.net> | 2025-07-22 11:41:48 +0200 |
commit | 5fead1096ee4ffdfed9957b575e2b09e6d9637cf (patch) | |
tree | 2d07fe2ff64235bd505157d8ad947ad7532d47e1 | |
parent | e6d85d4516b7d79304c8bb331a05f9ea15070967 (diff) |
install, bin/opplysning-*
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 37 | ||||
-rw-r--r-- | bin/.gitignore | 3 | ||||
-rw-r--r-- | opplysning-endre.c (renamed from update.c) | 0 | ||||
-rwxr-xr-x | opplysning-forfrisk.sh (renamed from refresh.sh) | 4 | ||||
-rw-r--r-- | opplysning-vis.c (renamed from opplysning.c) | 0 |
6 files changed, 32 insertions, 14 deletions
@@ -3,8 +3,6 @@ /check_ical /check_ical_out.txt /events.ical -/opplysning /select /sqlite3 -/update core @@ -6,28 +6,48 @@ LIBS_RAYLIB = -lraylib -lGLESv2 -lEGL \ $$([ `uname -m` = aarch64 ] && echo '-lvcos -lvchiq_arm -lgbm -ldrm') LIBS_SQLITE = -ldl -lm -lpthread -all: check_ical opplysning select update +all: \ + check_ical \ + bin/opplysning-endre \ + bin/opplysning-forfrisk \ + bin/opplysning-vis \ + select check: all ./check_ical < check_ical_in.ical > check_ical_out.txt diff -u check_ical_ans.txt check_ical_out.txt && echo PASS || echo FAIL clean: + rm -f bin/* rm -f check_ical check_ical_out.txt - rm -f opplysning rm -f select rm -f sqlite.o rm -f sqlite3 - rm -f update -.PHONY: all check clean +install: all + mkdir -p /opt/opplysning/bin + cp -f bin/opplysning-endre /opt/opplysning/bin/ + cp -f bin/opplysning-forfrisk /opt/opplysning/bin/ + cp -f bin/opplysning-vis /opt/opplysning/bin/ + mkdir -p /opt/opplysning/font + cp -f font/BellCentennialStd-Address.ttf /opt/opplysning/font/ + cp -f font/adventpro-bold.ttf /opt/opplysning/font/ + mkdir -p /opt/opplysning/var + +.PHONY: all check clean install + +bin/opplysning-endre: opplysning-endre.c sqlite.o + $(CC) $(CFLAGS) -o $@ opplysning-endre.c sqlite.o $(LIBS_LIBICAL) $(LIBS_SQLITE) + +bin/opplysning-forfrisk: opplysning-forfrisk.sh + cp -p opplysning-forfrisk.sh $@ + +bin/opplysning-vis: opplysning-vis.c sqlite.o + $(CC) $(CFLAGS) -o $@ opplysning-vis.c sqlite.o $(LIBS_RAYLIB) $(LIBS_SQLITE) check_ical: check_ical.c $(CC) $(CFLAGS) -o $@ check_ical.c $(LIBS_LIBICAL) -opplysning: opplysning.c sqlite.o - $(CC) $(CFLAGS) -o $@ opplysning.c sqlite.o $(LIBS_RAYLIB) $(LIBS_SQLITE) - select: select.c sqlite.o $(CC) $(CFLAGS) -o $@ select.c sqlite.o $(LIBS_SQLITE) @@ -36,6 +56,3 @@ sqlite.o: sqlite/sqlite3.c sqlite3: sqlite/shell.c sqlite/sqlite3.c $(CC) $(CFLAGS) -o sqlite3 sqlite/shell.c sqlite/sqlite3.c $(LIBS_SQLITE) - -update: update.c sqlite.o - $(CC) $(CFLAGS) -o $@ update.c sqlite.o $(LIBS_LIBICAL) $(LIBS_SQLITE) diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..e39c6c6 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,3 @@ +* + +!/.gitignore diff --git a/update.c b/opplysning-endre.c index b55c679..b55c679 100644 --- a/update.c +++ b/opplysning-endre.c diff --git a/refresh.sh b/opplysning-forfrisk.sh index 4c13c01..264b695 100755 --- a/refresh.sh +++ b/opplysning-forfrisk.sh @@ -6,5 +6,5 @@ set -x mkdir -p var curl -o var/google.ical https://calendar.google.com/calendar/ical/u3054u2f4kpkl7edub90faijvo@group.calendar.google.com/public/basic.ics curl -o var/meetup.ical https://www.meetup.com/bitraf/events/ical/ -./update var/google.db < var/google.ical -./update var/meetup.db < var/meetup.ical +./bin/opplysning-endre var/google.db < var/google.ical +./bin/opplysning-endre var/meetup.db < var/meetup.ical diff --git a/opplysning.c b/opplysning-vis.c index ba4d9c9..ba4d9c9 100644 --- a/opplysning.c +++ b/opplysning-vis.c |