forked from fishminder/fishminder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
47 lines (37 loc) · 1.56 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
AUTOMAKE_OPTIONS = foreign subdir-objects
dist_doc_DATA = README.md
bin_PROGRAMS = fishminderd fminder
fishminderd_CFLAGS = $(GLIB_CFLAGS) $(GIO_CFLAGS) $(LIBCONFIG_CFLAGS)
fishminderd_LDADD = $(GLIB_LIBS) $(GIO_LIBS) $(LIBCONFIG_LIBS)
fishminderd_SOURCES = src/daemon/cmd_line_listener.c src/daemon/credentialmgr.c src/daemon/listener.c src/daemon/subscriptionmgr.c
nodist_fishminderd_SOURCES = fishminder.db
BUILT_SOURCES = fishminder.db
CLEANFILES = sqlite/fishminder.db
fishminder.db: Makefile
if [ ! -f sqlite/fishminder.db ]; then sqlite3 sqlite/fishminder.db < sqlite/sqlite_schema.sql; fi
confdir = $(sysconfdir)/fishminder
certdir = $(sysconfdir)/fishminder/certs
privdir = $(sysconfdir)/fishminder/certs/private
dist_conf_DATA = fishminderd.conf sqlite/fishminder.db
fminder_CFLAGS = $(GLIB_CFLAGS) $(GIO_CFLAGS)
fminder_LDADD = $(GLIB_LIBS) $(GIO_LIBS)
fminder_SOURCES = src/utils/client.c
man1_MANS = doc/man1/fminder.1
man8_MANS = doc/man8/fishminderd.8
install-data-hook: gen-config
.PHONY: gen-config
gen-config:
echo "PID_FILE_PATH = \"$(runstatedir)/fishminderd/fishminderd.pid\"" >> $(confdir)/fishminderd.conf
echo "CERT_PATH = \"$(certdir)/cert.pem\"" >> $(confdir)/fishminderd.conf
echo "KEY_PATH = \"$(privdir)/server.key\"" >> $(confdir)/fishminderd.conf
echo "DB_PATH = \"$(confdir)/fishminder.db\"" >> $(confdir)/fishminderd.conf
install-exec-hook:
-mkdir -p $(confdir)
-mkdir -p $(certdir)
-mkdir -p $(privdir)
-mkdir -p $(runstatedir)/fishminderd
uninstall-hook:
-rmdir $(privdir)
-rmdir $(certdir)
-rmdir $(confdir)
-rmdir $(runstatedir)/fishminderd