Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
4n6Tools committed Aug 16, 2016
0 parents commit 21c8d3e
Show file tree
Hide file tree
Showing 45 changed files with 6,285 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This work (dcp) is free of known copyright restrictions.
Empty file added ChangeLog
Empty file.
921 changes: 921 additions & 0 deletions Doxyfile

Large diffs are not rendered by default.

370 changes: 370 additions & 0 deletions INSTALL

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

SUBDIRS=src
man1_MANS=dcp.man
EXTRA_DIST=dcp.man
Empty file added NEWS
Empty file.
13 changes: 13 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

We utilize Autotools for building

Compile and Install:
./configure
make
make install


Libraries that need to be installed:

libcrypto - From OpenSSL
libdb-5.3 - Berkeley DB 5.3
35 changes: 35 additions & 0 deletions README-devel
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

Development tools required:

gengetopt generates the command line parsing code and help output
autotools configures and checks user's environment for dependencies
doxygen source uses doxygen style comments allowing for doxygen
documentation


Command line parsing
We use `gengetopt` to generate dcp's cli parsing c code. This tool parses
the 'option_parser.ggo' file, creating the parsing code and --help
output.

Note: When updating 'option_parser.ggo', `./bootstrap.sh` must be
rerun before compiling, for changes to take effect.


Generating a Distribution tarball

./bootstrap.h
./configure
make dist


Generating Doxygen HTML documentation

./bootstrap.sh
doxygen
open doc/html/index.html


Remove all generated files by bootstrap.sh and AutoTools

./cleanup.sh
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
29 changes: 29 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
#
# bootstrap's purpose is to prepare the source code for building running the
# autotools and generate any source needed. Once complete we can create a
# distribution tarball by simply calling
#
# ./configure
# make dist
#
# @version 1.0
#

#
# Run gengetopt to generate the cmdline.c and cmdline.h files
#
GENGETOPT=$(which gengetopt)
if [[ ! -e $GENGETOPT ]]
then
echo "gengetopt required to prepare source"
exit
fi
$GENGETOPT --unamed-opts -a cmdline_info -F cmdline --output-dir=src/ \
-i option_parser.ggo --set-version=$(tr -d '\n' < VERSION)

#
# run autotools
#
autoreconf -vfi

16 changes: 16 additions & 0 deletions cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
#
# cleanup is a simple script to get a clean slate. All generated files are
# deleted allowing for minimal files to be versioned.
#
# @version 1.0
#

if [ -e Makefile ] ; then make distclean ; fi

rm -fr aclocal.m4 autom4te.cache compile config.guess config.log \
config.status config.sub configure depcomp install-sh libtool \
ltmain.sh missing Makefile Makefile.in src/Makefile src/Makefile.in \
src/cmdline.c src/cmdline.h src/config.h src/config.h.in src/.deps m4 \
jansson doc sfcp*.tar.gz Debug

46 changes: 46 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([dcp], m4_esyscmd([tr -d '\n' < VERSION]))

AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])

AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE()

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_MAKE_SET

# LibTool
LT_INIT
AC_PROG_LIBTOOL


AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h unistd.h])
a=1
AC_CHECK_HEADER(jansson.h, [], [a=0])
if test $a == 0
then
AC_MSG_ERROR([jannson library not installed. Try 'apt-get install libjansson-dev' or whatever package manager you happen to be using...])
fi

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_CHECK_FUNCS([getcwd gethostname memset mkdir realpath strdup strerror strrchr strtol])

AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT

Loading

0 comments on commit 21c8d3e

Please sign in to comment.