diff --git a/.gitignore b/.gitignore index 4417566..4412982 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,18 @@ *~ *.o +.deps +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +compile +config.h* +config.log +config.status +configure +depcomp +install-sh klogd +missing +stamp-h1 syslogd diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..d8754d0 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,37 @@ +# Copyright (c) 2018 Joachim Nilsson +# +# This file is part of the sysklogd package, a kernel and system log daemon. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +SUBDIRS = src man +doc_DATA = README.md +EXTRA_DIST = README.md + +# +# Target to run when building a release +# +release: distcheck + @for file in $(DIST_ARCHIVES); do \ + md5sum $$file > ../$$file.md5; \ + done + @mv $(DIST_ARCHIVES) ../ + @echo + @echo "Resulting release files:" + @echo "=================================================================" + @for file in $(DIST_ARCHIVES); do \ + printf "$$file \tDistribution tarball\n"; \ + printf "$$file.md5\t"; cat ../$$file.md5 | cut -f1 -d' '; \ + done diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..dbbcad3 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +autoreconf -W portability -visfm diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..e0a2dd3 --- /dev/null +++ b/configure.ac @@ -0,0 +1,31 @@ +# Copyright (c) 2018 Joachim Nilsson +# +# This file is part of the sysklogd package, a kernel and system log daemon. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +AC_INIT([sysklogd], [1.6-beta1], [https://github.com/troglobit/sysklgd/issues]) +AM_INIT_AUTOMAKE([1.11 foreign]) +AM_SILENT_RULES([yes]) + +AC_CONFIG_SRCDIR([src/syslogd.c]) +AC_CONFIG_HEADER([config.h]) +AC_CONFIG_FILES([Makefile src/Makefile man/Makefile]) + +AC_PROG_CC +AC_PROG_INSTALL +AC_HEADER_STDC + +AC_OUTPUT diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 0000000..69b4683 --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,2 @@ +dist_man5_MANS = syslog.conf.5 +dist_man8_MANS = syslogd.8 klogd.8 sysklogd.8 diff --git a/klogd.8 b/man/klogd.8 similarity index 100% rename from klogd.8 rename to man/klogd.8 diff --git a/sysklogd.8 b/man/sysklogd.8 similarity index 100% rename from sysklogd.8 rename to man/sysklogd.8 diff --git a/syslog.conf.5 b/man/syslog.conf.5 similarity index 100% rename from syslog.conf.5 rename to man/syslog.conf.5 diff --git a/syslogd.8 b/man/syslogd.8 similarity index 100% rename from syslogd.8 rename to man/syslogd.8 diff --git a/MANIFEST b/src/MANIFEST similarity index 100% rename from MANIFEST rename to src/MANIFEST diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..dda8847 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,30 @@ +# Copyright (c) 2018 Joachim Nilsson +# +# This file is part of the sysklogd package, a kernel and system log daemon. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +sbin_PROGRAMS = syslogd klogd +doc_DATA = README.1st README.linux + +AM_CFLAGS = -fomit-frame-pointer -fno-strength-reduce -Wno-unused-result + +syslogd_SOURCES = syslogd.c pidfile.c pidfile.h +syslogd_CPPFLAGS = -DSYSV -DFSSTND -DSYSLOG_INET -DINET6 -DNO_SCCS \ + -DSYSLOG_UNIXAF -DSYSLOGD_PIDNAME=\"syslogd.pid\" + +klogd_SOURCES = klogd.c klogd.h syslog.c pidfile.c pidfile.h \ + ksym.c ksyms.h ksym_mod.c module.h +klogd_CPPFLAGS = -DSYSV -DFSSTND diff --git a/Makefile b/src/Makefile.old similarity index 100% rename from Makefile rename to src/Makefile.old diff --git a/README.1st b/src/README.1st similarity index 100% rename from README.1st rename to src/README.1st diff --git a/README.linux b/src/README.linux similarity index 100% rename from README.linux rename to src/README.linux diff --git a/klogd.c b/src/klogd.c similarity index 100% rename from klogd.c rename to src/klogd.c diff --git a/klogd.h b/src/klogd.h similarity index 100% rename from klogd.h rename to src/klogd.h diff --git a/ksym.c b/src/ksym.c similarity index 100% rename from ksym.c rename to src/ksym.c diff --git a/ksym_mod.c b/src/ksym_mod.c similarity index 100% rename from ksym_mod.c rename to src/ksym_mod.c diff --git a/ksyms.h b/src/ksyms.h similarity index 100% rename from ksyms.h rename to src/ksyms.h diff --git a/module.h b/src/module.h similarity index 100% rename from module.h rename to src/module.h diff --git a/modutils.patch b/src/modutils.patch similarity index 100% rename from modutils.patch rename to src/modutils.patch diff --git a/oops.c b/src/oops.c similarity index 100% rename from oops.c rename to src/oops.c diff --git a/pidfile.c b/src/pidfile.c similarity index 100% rename from pidfile.c rename to src/pidfile.c diff --git a/pidfile.h b/src/pidfile.h similarity index 100% rename from pidfile.h rename to src/pidfile.h diff --git a/syslog-tst.conf b/src/syslog-tst.conf similarity index 100% rename from syslog-tst.conf rename to src/syslog-tst.conf diff --git a/syslog.c b/src/syslog.c similarity index 100% rename from syslog.c rename to src/syslog.c diff --git a/syslog_tst.c b/src/syslog_tst.c similarity index 100% rename from syslog_tst.c rename to src/syslog_tst.c diff --git a/syslogd.c b/src/syslogd.c similarity index 100% rename from syslogd.c rename to src/syslogd.c