diff --git a/.gitignore b/.gitignore index 0684750..9a33574 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -# Ignore configuration files that may contain sensitive information. -sites/*/*settings*.php - -# Ignore paths that contain generated content. - -# Ignore default text files .deps config /AUTHORS @@ -23,11 +17,7 @@ config.status libtool stamp-h1 # Ignore output files -libpipecolors.o -libpipecolors.so .libs/ -libpipecolors.la -libpipecolors.lo libpipecolors.pc tests/ test/ @@ -35,4 +25,3 @@ test/ # Ignore backup files *~ libpipecolors.h -cpp-btree/ \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index b7c9bb0..f69e149 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,57 +1,15 @@ -pkgconfig_DATA = libpipecolors.pc - -AM_LDFLAGS = $(LDFLAGS) +SUBDIRS = src man ACLOCAL_AMFLAGS = -I m4 -I config -LIBTOOL_DEPS = @LIBTOOL_DEPS@ - -lib_LTLIBRARIES = libpipecolors.la -libpipecolors_la_SOURCES = libpipecolors.cc -libpipecolors_la_LIBS = -lboost_regex -libpipecolors_la_CFLAGS = -fPIC -DPIC -pthread - -if PC_REMOVE_INVALID -AM_CPPFLAGSINVALID = -DPC_REMOVE_INVALID -endif - -AM_CPPFLAGS = $(AM_CPPFLAGSINVALID) - -libpipecolors_la_LDFLAGS = -module \ - -release ${PIPECOLORS_VERSION} - -include_HEADERS = pipecolors.h -noinst_HEADERS = config.h - -man_MANS = libpipecolors.7 pcprintf.3 docdir = $(datadir)/doc/@PACKAGE@ doc_DATA = README NEWS AUTHORS ChangeLog COPYING MAINTAINERCLEANFILES = \ aclocal.m4 \ - config.h \ - config.h.in \ - config.h.in~ \ config.log \ stamp-h1 \ -rf config \ -rf m4 \ configure \ - Makefile.in \ - -rf cpp-btree - -install-man: install-man3 install-man7 install-man-gzip -uninstall-man: uninstall-man3 uninstall-man7 uninstall-man-gzip - -install-man-gzip: - test -f $(mandir)/man3/pcprintf.3 && gzip -qf /usr/share/man/man3/pcprintf.3 - test -f $(mandir)/man7/libpipecolors.7 && gzip -qf /usr/share/man/man7/libpipecolors.7 - test -f $(mandir)/man3/pcprintf.3.gz && ln -sf /usr/share/man/man3/pcprintf.3.gz /usr/share/man/man3/pcsprintf.3.gz - -uninstall-man-gzip: - test -f $(mandir)/man3/pcprintf.3.gz && rm -f /usr/share/man/man3/pcprintf.3.gz - test -h $(mandir)/man3/pcsprintf.3.gz && rm -f /usr/share/man/man3/pcsprintf.3.gz - test -f $(mandir)/man7/libpipecolors.7.gz && rm -f /usr/share/man/man7/libpipecolors.7.gz - -libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status libtool + Makefile.in diff --git a/configure.ac b/configure.ac index a5ba89a..cc3fd55 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ AC_PREREQ([2.69]) m4_define([pipecolors_version_major],[0]) m4_define([pipecolors_version_minor],[2]) -m4_define([pipecolors_version_micro],[0]) +m4_define([pipecolors_version_micro],[1]) m4_define([pipecolors_version], [pipecolors_version_major.pipecolors_version_minor.pipecolors_version_micro]) @@ -17,19 +17,21 @@ AC_SUBST([PIPECOLORS_VERSION_MICRO], [pipecolors_version_micro]) AC_SUBST([PIPECOLORS_VERSION], [pipecolors_version]) PKG_INSTALLDIR -AC_CONFIG_SRCDIR([libpipecolors.cc]) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_SRCDIR([src/libpipecolors.cc]) +AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_TARGET AC_CANONICAL_HOST AC_CANONICAL_BUILD PKG_PROG_PKG_CONFIG -AM_INIT_AUTOMAKE([gnu dist-bzip2 dist-zip]) -AM_SILENT_RULES -AC_GNU_SOURCE +AM_INIT_AUTOMAKE([dist-bzip2 dist-zip]) + +#AC_GNU_SOURCE + +# Checks for programs. AC_PROG_INSTALL -AC_PROG_CXXCPP +AC_PROG_CXX AM_PROG_AR AC_PROG_LIBTOOL AC_PROG_LN_S @@ -38,14 +40,19 @@ LT_INIT AC_LANG_CPLUSPLUS AC_PREFIX_DEFAULT([/usr]) -# Checks for programs. - AC_CONFIG_MACRO_DIR([m4]) AC_SUBST([LIBTOOL_DEPS]) +# Check for functions AC_CHECK_FUNCS([vasprintf], [], [AC_MSG_ERROR([Why don't you have this? Install basic c++ header files.])]) -AC_CHECK_HEADERS([stdarg.h stdlib.h unistd.h string iostream map],[],[AC_MSG_ERROR([We couldn't find one or more of the required headers.])]) + +# Check for Headers +AC_CHECK_HEADERS([cstdio iostream cstring cstdlib cstdarg],[],[AC_MSG_ERROR([We couldn't find one or more of the required headers.])]) + +# Check for boost_regex header AC_CHECK_HEADER([boost/regex.hpp],[],[AC_MSG_ERROR([Please install the libboost-regex header library.])]) + +# Check that we can use boost_regex.so AC_CHECK_LIB([boost_regex], [main], [], [AC_MSG_ERROR([Please install the libboost-regex libs on your system.])]) @@ -63,13 +70,13 @@ AM_COND_IF([PC_REMOVE_INVALID], [AC_MSG_NOTICE([Invalid pipe codes will be filtered.])], [AC_MSG_NOTICE([Invalid pipe codes will not be filtered.])]) -AC_ARG_ENABLE([the-force], - [AC_HELP_STRING([--enable-the-force], [use the force [default=no]])], - [], [enable_the_force=no]) -AM_CONDITIONAL([ENABLE_THE_FORCE], [test "x$enable_the_force" = "xyes"]) +#AC_ARG_ENABLE([the-force], +# [AC_HELP_STRING([--enable-the-force], [use the force [default=no]])], +# [], [enable_the_force=no]) +#AM_CONDITIONAL([ENABLE_THE_FORCE], [test "x$enable_the_force" = "xyes"]) -AC_CONFIG_FILES([Makefile libpipecolors.pc:libpipecolors.pc.in libpipecolors.h:libpipecolors.h.in],[],[APIVERSION=PIPECOLORS_VERSION]) +AC_CONFIG_FILES([Makefile src/Makefile man/Makefile src/libpipecolors.pc:src/libpipecolors.pc.in src/libpipecolors.h:src/libpipecolors.h.in],[],[APIVERSION=PIPECOLORS_VERSION]) AC_CONFIG_COMMANDS([timestamp], [date >timestamp]) AC_OUTPUT diff --git a/dist/pipecolors-0.2.1.tar.bz2 b/dist/pipecolors-0.2.1.tar.bz2 new file mode 100644 index 0000000..97449c1 Binary files /dev/null and b/dist/pipecolors-0.2.1.tar.bz2 differ diff --git a/dist/pipecolors-0.2.1.tar.gz b/dist/pipecolors-0.2.1.tar.gz new file mode 100644 index 0000000..3b55fdf Binary files /dev/null and b/dist/pipecolors-0.2.1.tar.gz differ diff --git a/dist/pipecolors-0.2.1.zip b/dist/pipecolors-0.2.1.zip new file mode 100644 index 0000000..b43df7b Binary files /dev/null and b/dist/pipecolors-0.2.1.zip differ diff --git a/releases/timestamp b/dist/timestamp similarity index 100% rename from releases/timestamp rename to dist/timestamp diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 0000000..81e914d --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,19 @@ + +man_MANS = libpipecolors.7 pcprintf.3 + + +MAINTAINERCLEANFILES = \ + Makefile.in + +install-man: install-man3 install-man7 install-man-gzip +uninstall-man: uninstall-man3 uninstall-man7 uninstall-man-gzip + +install-man-gzip: + test -f $(mandir)/man3/pcprintf.3 && gzip -qf /usr/share/man/man3/pcprintf.3 + test -f $(mandir)/man7/libpipecolors.7 && gzip -qf /usr/share/man/man7/libpipecolors.7 + test -f $(mandir)/man3/pcprintf.3.gz && ln -sf /usr/share/man/man3/pcprintf.3.gz /usr/share/man/man3/pcsprintf.3.gz + +uninstall-man-gzip: + test -f $(mandir)/man3/pcprintf.3.gz && rm -f /usr/share/man/man3/pcprintf.3.gz + test -h $(mandir)/man3/pcsprintf.3.gz && rm -f /usr/share/man/man3/pcsprintf.3.gz + test -f $(mandir)/man7/libpipecolors.7.gz && rm -f /usr/share/man/man7/libpipecolors.7.gz diff --git a/libpipecolors.7 b/man/libpipecolors.7 similarity index 100% rename from libpipecolors.7 rename to man/libpipecolors.7 diff --git a/pcprintf.3 b/man/pcprintf.3 similarity index 100% rename from pcprintf.3 rename to man/pcprintf.3 diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..a66a664 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,39 @@ +pkgconfig_DATA = libpipecolors.pc pipecolors.pc + +AM_LDFLAGS = $(LDFLAGS) + +ACLOCAL_AMFLAGS = -I m4 -I config +LIBTOOL_DEPS = @LIBTOOL_DEPS@ + +lib_LTLIBRARIES = libpipecolors.la +libpipecolors_la_SOURCES = libpipecolors.cc +libpipecolors_la_LIBS = -lboost_regex +libpipecolors_la_CFLAGS = -fPIC -DPIC -pthread + +if PC_REMOVE_INVALID +AM_CPPFLAGSINVALID = -DPC_REMOVE_INVALID +endif + +AM_CPPFLAGS = $(AM_CPPFLAGSINVALID) + +libpipecolors_la_LDFLAGS = -module \ + -release ${PIPECOLORS_VERSION} + +include_HEADERS = pipecolors.h +noinst_HEADERS = config.h + +MAINTAINERCLEANFILES = \ + aclocal.m4 \ + config.h \ + config.h.in \ + config.h.in~ \ + config.log \ + stamp-h1 \ + Makefile.in \ + pipecolors.pc + +libtool: $(LIBTOOL_DEPS) + $(SHELL) ../config.status libtool + +pipecolors.pc: + cp libpipecolors.pc pipecolors.pc diff --git a/libpipecolors.cc b/src/libpipecolors.cc similarity index 100% rename from libpipecolors.cc rename to src/libpipecolors.cc diff --git a/libpipecolors.h.in b/src/libpipecolors.h.in similarity index 100% rename from libpipecolors.h.in rename to src/libpipecolors.h.in diff --git a/libpipecolors.pc.in b/src/libpipecolors.pc.in similarity index 87% rename from libpipecolors.pc.in rename to src/libpipecolors.pc.in index c141cf6..9c7c94d 100644 --- a/libpipecolors.pc.in +++ b/src/libpipecolors.pc.in @@ -7,4 +7,4 @@ Name: libpipecolors Description: Uses old renegade pipe color codes to print colors to the terminal Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lpipecolors -Cflags: -I${includedir}/pipecolors +Cflags: -I${includedir} diff --git a/pipecolors.h b/src/pipecolors.h similarity index 100% rename from pipecolors.h rename to src/pipecolors.h