cScm Configuration Daemon

cScm – is a tool to convert SCM configuration files into binary format and store its in shared memory for reading by cSvn-ui and cGit-ui CGI scripts

2 Commits   0 Branches   1 Tag
author: kx <kx@radix.pro> 2023-03-24 02:53:04 +0300 committer: kx <kx@radix.pro> 2023-03-24 02:53:04 +0300 commit: 12c7b1c5658602269da2f5b75835ec0f5fab8890 parent: 4e72ffe940d9aff7c019d37a6459e765902c1fae
Commit Summary:
Version 0.1.4
Diffstat:
1 file changed, 47 insertions, 0 deletions
diff --git a/cscmd/Makefile.am b/cscmd/Makefile.am
new file mode 100644
index 0000000..6fdd496
--- /dev/null
+++ b/cscmd/Makefile.am
@@ -0,0 +1,63 @@
+
+AM_CPPFLAGS    = -I@top_srcdir@ -DYYERROR_VERBOSE=1
+
+sbin_PROGRAMS  = cscmd
+
+cscmd_SOURCES  = bconf.c daemon.c error.c lex.c main.c msglog.c symtab.c utf8ing.c xalloc.c
+
+noinst_HEADERS = bconf.h daemon.h error.h lex.h main.h msglog.h symtab.h utf8ing.h xalloc.h
+
+control_DATA   = rc.cgitd rc.csvnd
+logrotate_DATA = cgit csvn
+
+csvndhome_DATA = README.csvn
+cgitdhome_DATA = README.cgit
+
+man8_MANS = cscmd.8
+notrans_nodist_man8_MANS = cscmd.8
+
+nodist_cscmd_SOURCES = parse.c parse.h rc.csvnd csvn rc.cgitd cgit
+BUILT_SOURCES = parse.c parse.h rc.csvnd csvn rc.cgitd cgit
+
+parse.c: parse.y
+	@BISON@ -lvy --defines=parse.h -o $@ $^
+
+README.csvn: README.in
+	cat $^ | sed "s,\@CSCM_PROGRAM\@,${CSVN_PROGRAM},g" | \
+	  sed "s,\@CSCM_PROGRAM_NAME\@,${CSVN_PROGRAM_NAME},g" > $@
+
+README.cgit: README.in
+	cat $^ | sed "s,\@CSCM_PROGRAM\@,${CGIT_PROGRAM},g" | \
+	  sed "s,\@CSCM_PROGRAM_NAME\@,${CGIT_PROGRAM_NAME},g" > $@
+
+rc.csvnd: rc.cscmd.in
+	cat $^ | sed "s,\@sbindir\@,${sbindir},g" | \
+	  sed "s,\@CSCM_NAME\@,${CSVN_NAME},g" | \
+	  sed "s,\@CSCM_CONFIG\@,${CSVN_CONFIG},g" | \
+	  sed "s,\@CSCM_HOME_PATH\@,${CSCM_HOME_PATH},g" | \
+	  sed "s,\@CSCM_PID_DIR\@,${CSCM_PID_DIR},g" | \
+	  sed "s,\@CSCM_LOG_DIR\@,${CSCM_LOG_DIR},g" | \
+	  sed "s,\@CSCM_PROGRAM\@,${CSVN_PROGRAM},g" | \
+	  sed "s,\@CSCM_PROGRAM_NAME\@,${CSVN_PROGRAM_NAME},g" | \
+	  sed "s,\@PROGRAM_DAEMON\@,${PROGRAM_DAEMON},g" > $@
+
+rc.cgitd: rc.cscmd.in
+	cat $^ | sed "s,\@sbindir\@,${sbindir},g" | \
+	  sed "s,\@CSCM_NAME\@,${CGIT_NAME},g" | \
+	  sed "s,\@CSCM_CONFIG\@,${CGIT_CONFIG},g" | \
+	  sed "s,\@CSCM_HOME_PATH\@,${CSCM_HOME_PATH},g" | \
+	  sed "s,\@CSCM_PID_DIR\@,${CSCM_PID_DIR},g" | \
+	  sed "s,\@CSCM_LOG_DIR\@,${CSCM_LOG_DIR},g" | \
+	  sed "s,\@CSCM_PROGRAM\@,${CGIT_PROGRAM},g" | \
+	  sed "s,\@CSCM_PROGRAM_NAME\@,${CGIT_PROGRAM_NAME},g" | \
+	  sed "s,\@PROGRAM_DAEMON\@,${PROGRAM_DAEMON},g" > $@
+
+csvn: logrotate.in
+	cat $^ | sed "s,\@CSCM_LOG_DIR\@,${CSCM_LOG_DIR},g" | \
+	  sed "s,\@CSCM_PROGRAM\@,${CSVN_PROGRAM},g" > $@
+
+cgit: logrotate.in
+	cat $^ | sed "s,\@CSCM_LOG_DIR\@,${CSCM_LOG_DIR},g" | \
+	  sed "s,\@CSCM_PROGRAM\@,${CGIT_PROGRAM},g" > $@
+
+CLEANFILES = parse.c parse.h parse.output README.csvn rc.csvnd csvn README.cgit rc.cgitd cgit cscmd.8