grim/guifications3

Parents 7c41d00ff3a6
Children ec118cac5ff0
converted guifications-daemon-web to cmake, this is behind a bit when it comes to api and needs to have the updates completed yet
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/guifications-daemon-web/CMakeLists.txt Mon Dec 13 23:40:42 2010 -0600
@@ -0,0 +1,75 @@
+cmake_minimum_required(VERSION 2.8)
+
+###############################################################################
+# Project Info
+###############################################################################
+project(guifications-daemon-web C)
+
+set(GUIFICATION_DAEMON_WEB_MAJOR_VERSION 0)
+set(GUIFICATION_DAEMON_WEB_MINOR_VERSION 0)
+set(GUIFICATION_DAEMON_WEB_MICRO_VERSION 1)
+set(GUIFICATION_DAEMON_WEB_EXTRA_VERSION dev)
+
+set(VERSION ${GUIFICATIONS_DAEMON_WEB_MAJOR_VERSION}.${GUIFICATIONS_DAEMON_WEB_MINOR_VERSION}.${GUIFICATIONS_DAEMON_WEB_MICRO_VERSION}${GUIFICATIONS_DAEMON_WEB_EXTRA_VERSION})
+
+###############################################################################
+# Dependencies
+###############################################################################
+include(FindPkgConfig)
+
+pkg_check_modules(GLIB REQUIRED
+ glib-2.0>=2.16.0
+ gobject-2.0>=2.16.0
+ gthread-2.0>=2.16.0
+)
+
+pkg_check_modules(GFLIB REQUIRED gflib)
+
+pkg_check_modules(GUIFICATIONS_DAEMON REQUIRED guifications-daemon)
+
+pkg_check_modules(GPLATE REQUIRED gplate)
+
+pkg_check_modules(SOUP REQUIRED libsoup-2.4>=2.4.0)
+
+###############################################################################
+# Build Info
+###############################################################################
+include_directories(
+ ${CMAKE_SOURCE_DIR}
+ ${GLIB_INCLUDE_DIRS}
+ ${GFLIB_INCLUDE_DIRS}
+ ${GPLATE_INCLUDE_DIRS}
+ ${SOUP_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${GLIB_LIBRARY_DIRS}
+ ${GFLIB_LIBRARY_DIRS}
+ ${GPLATE_LIBRARY_DIRS}
+ ${SOUP_LIBRARY_DIRS}
+)
+
+add_definitions(
+ -DGETTEXT_PACKAGE="guifications-daemon-web"
+ -DDATADIR="${CMAKE_INSTALL_PREFIX}/share"
+ -DLOCALEDIR="${CMAKE_INSTALL_PREFIX}/locale"
+ -DVERSION="${VERSION}"
+ -g -g3 -Wall
+)
+
+###############################################################################
+# Subdirectories
+###############################################################################
+add_subdirectory(src)
+add_subdirectory(pixmaps)
+add_subdirectory(themes)
+
+###############################################################################
+# Install Stuff
+###############################################################################
+# documentation
+install(
+ FILES AUTHORS ChangeLog COPYING NEWS README
+ DESTINATION share/doc/guifications-daemon-web
+)
+
--- a/guifications-daemon-web/Makefile.am Mon Dec 13 23:16:27 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-SUBDIRS=pixmaps po src themes
-
-DISTCLEANFILES=\
- intltool-extract \
- intltool-update \
- intltool-merge
-
-EXTRA_DIST=\
- AUTHORS \
- NEWS \
- INSTALL \
- COPYING \
- README \
- ChangeLog \
- configure.ac
-
-$(OBJECTS): libtool
-
-libtool: $(LIBTOOL_DEPS)
- $(SHELL) ./config.status --recheck
--- a/guifications-daemon-web/autogen.sh Mon Dec 13 23:16:27 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#!/bin/sh
-# Guifications - The end-all, be-all notification framework
-# Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
-#
-# 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 3 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, see <http://www.gnu.org/licenses/>.
-
-PACKAGE="gfd-web"
-
-which gflib-autogen.sh || {
- echo "You need to install gflib to run autogen"
- exit 1
-}
-
-. gflib-autogen.sh
-
-add_default_commands
-
-autogen
-
--- a/guifications-daemon-web/configure.ac Mon Dec 13 23:16:27 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-dnl Process this file with autoconf to create configure.
-
-dnl ################################################################
-dnl # Initialize autoconf
-dnl ################################################################
-AC_INIT(guifications-daemon-web, 0.0.1dev, guifications-devel@lists.guifications.org)
-AC_PREREQ(2.50)
-AC_CANONICAL_SYSTEM
-AC_CONFIG_SRCDIR(config.h.in)
-AC_COPYRIGHT([Copyright 2003-2009 Gary Kramlich])
-
-dnl ################################################################
-dnl # Initialize automake
-dnl ################################################################
-AM_INIT_AUTOMAKE([gnu dist-bzip2])
-
-dnl # disable the static library
-AC_DISABLE_STATIC
-
-dnl ################################################################
-dnl # Configuration file
-dnl ################################################################
-AM_CONFIG_HEADER(config.h)
-
-dnl # Stash configure args
-AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
-
-# set our language to C
-AC_LANG([C])
-
-dnl #######################################################################
-dnl # Make sure we have pkg-config
-dnl #######################################################################
-PKG_PROG_PKG_CONFIG
-
-dnl #######################################################################
-dnl # Setup libtool
-dnl #######################################################################
-LT_INIT
-LT_LANG([C])
-LIBTOOL="$LIBTOOL --silent"
-
-dnl #######################################################################
-dnl # Our header
-dnl #######################################################################
-
-AH_TOP([ /* our header */
-#ifndef CONFIG_H
-#define CONFIG_H
-])
-AH_BOTTOM([
-#endif /* CONFIG_H */
-])
-
-AC_MSG_CHECKING([for wasted cpu cycles])
-AC_MSG_RESULT([yes])
-
-dnl #######################################################################
-dnl # intltool
-dnl #######################################################################
-AC_PROG_INTLTOOL
-
-GETTEXT_PACKAGE=guifications-web
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
-
-ALL_LINGUAS=""
-AM_GLIB_GNU_GETTEXT
-
-dnl #######################################################################
-dnl # Look for the C compiler
-dnl #######################################################################
-CFLAGS_save="$CFLAGS"
-AC_PROG_CC
-CFLAGS="$CFLAGS_save"
-
-AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no)
-
-if test x"$enable_debug" = x"yes" ; then
- AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
-fi
-
-if test x"$GCC" = x"yes"; then
- CFLAGS="$CFLAGS -Wall -g3"
-fi
-AC_SUBST(CFLAGS)
-
-dnl #######################################################################
-dnl # check for gflib
-dnl #######################################################################
-PKG_CHECK_MODULES(GFLIB, gflib)
-AC_SUBST(GFLIB_LIBS)
-AC_SUBST(GFLIB_CFLAGS)
-
-GFLIB_GENHEADER=`pkg-config --variable=gflib_genheader gflib`
-AC_SUBST(GFLIB_GENHEADER)
-
-dnl #######################################################################
-dnl # check for gfd and grab it's plugin dir
-dnl #######################################################################
-PKG_CHECK_MODULES(GFD, guifications-daemon)
-AC_SUBST(GFD_LIBS)
-AC_SUBST(GFD_CFLAGS)
-
-if test x"${prefix}" = x"NONE" ; then
- GFD_PLUGIN_DIR=`pkg-config --variable=plugin_dir guifications-daemon`
-else
- GFD_PLUGIN_DIR="${prefix}/lib/guifications-daemon/"
-fi
-
-AC_SUBST(GFD_PLUGIN_DIR)
-
-dnl #######################################################################
-dnl # check for glib and other glib dependencies
-dnl #######################################################################
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14.0 gobject-2.0 >= 2.14.0)
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
-PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.14.0)
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
-
-dnl #######################################################################
-dnl # check for gplate
-dnl #######################################################################
-PKG_CHECK_MODULES(GPLATE, gplate)
-AC_SUBST(GPLATE_CFLAGS)
-AC_SUBST(GPLATE_LIBS)
-
-dnl #######################################################################
-dnl # check for libsoup
-dnl #######################################################################
-PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.4.0)
-AC_SUBST(SOUP_CFLAGS)
-AC_SUBST(SOUP_LIBS)
-
-dnl #######################################################################
-dnl # Finish up
-dnl #######################################################################
-AC_OUTPUT([Makefile
- pixmaps/Makefile
- po/Makefile.in
- src/Makefile
- themes/Makefile
- themes/default/Makefile
- ])
-
-dnl #######################################################################
-dnl # Ouput!!
-dnl #######################################################################
-
-echo;
-echo AC_PACKAGE_NAME AC_PACKAGE_VERSION Configuration complete
-echo;
-echo Debugging enabled....................: $enable_debug
-echo;
-echo guifications-daemon plugin directory.: $GFD_PLUGIN_DIR
-echo;
-echo Type make to compile
-echo;
--- a/guifications-daemon-web/pixmaps/Makefile.am Mon Dec 13 23:16:27 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-EXTRA_DIST=
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/guifications-daemon-web/src/CMakeLists.txt Mon Dec 13 23:40:42 2010 -0600
@@ -0,0 +1,38 @@
+###############################################################################
+# guifications-daemon-web target
+###############################################################################
+set(GUIFICATIONS_DAEMON_WEB_HEADERS
+ guifications-daemon-web-handlers.h
+ guifications-daemon-web-theme.h
+)
+
+set(GUIFICATIONS_DAEMON_WEB_SOURCES
+ guifications-daemon-web.c
+ guifications-daemon-web-handler-debug.c
+ guifications-daemon-web-handler-feeds.c
+ guifications-daemon-web-handlers.c
+ guifications-daemon-web-theme.c
+)
+
+add_library(guifications-daemon-web MODULE
+ ${GUIFICATIONS_DAEMON_WEB_HEADERS}
+ ${GUIFICATIONS_DAEMON_WEB_SOURCES}
+)
+
+target_link_libraries(guifications-daemon-web
+ ${GLIB_LIBRARIES}
+ ${GFLIB_LIBRARIES}
+ ${GPLATE_LIBRARIES}
+ ${SOUP_LIBRARIES}
+)
+
+set_target_properties(guifications-daemon-web PROPERTIES PREFIX "")
+
+###############################################################################
+# Install Stuff
+###############################################################################
+install(
+ TARGETS guifications-daemon-web LIBRARY
+ DESTINATION lib/guifications-daemon
+)
+
--- a/guifications-daemon-web/src/Makefile.am Mon Dec 13 23:16:27 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-SUBDIRS=
-
-EXTRA_DIST=\
- guifications-daemon-web-handlers.h \
- guifications-daemon-web-theme.h
-
-gfdwebdir=$(GFD_PLUGIN_DIR)
-
-gfdweb_LTLIBRARIES = guifications-daemon-web.la
-
-guifications_daemon_web_la_SOURCES = \
- guifications-daemon-web.c \
- guifications-daemon-web-handler-debug.c \
- guifications-daemon-web-handler-feeds.c \
- guifications-daemon-web-handlers.c \
- guifications-daemon-web-theme.c
-
-guifications_daemon_web_la_LIBADD = \
- $(GFD_LIBS) \
- $(GFLIB_LIBS) \
- $(GLIB_LIBS) \
- $(GPLATE_LIBS) \
- $(GTHREAD_LIBS) \
- $(SOUP_LIBS)
-
-guifications_daemon_web_la_LDFLAGS = -avoid-version -module
-
-INCLUDES = -I$(top_srcdir)
-
-AM_CPPFLAGS = \
- -DDATADIR=\"$(datadir)\" \
- -DLIBDIR=\"$(libdir)\" \
- -DLOCALEDIR=\"$(datadir)/locale\" \
- $(GFD_CFLAGS) \
- $(GFLIB_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GPLATE_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- $(SOUP_CFLAGS)
--- a/guifications-daemon-web/src/guifications-daemon-web-handlers.h Mon Dec 13 23:16:27 2010 -0600
+++ b/guifications-daemon-web/src/guifications-daemon-web-handlers.h Mon Dec 13 23:40:42 2010 -0600
@@ -20,7 +20,7 @@
#include <glib.h>
-#include <gflib/gf_lib.h>
+#include <gf_lib.h>
#include <gplate/gplate.h>
--- a/guifications-daemon-web/src/guifications-daemon-web.c Mon Dec 13 23:16:27 2010 -0600
+++ b/guifications-daemon-web/src/guifications-daemon-web.c Mon Dec 13 23:40:42 2010 -0600
@@ -19,8 +19,7 @@
# include <config.h>
#endif /* HAVE_CONFIG_H */
-#include <gflib/gf_lib.h>
-#include <gflib/gf_intl.h>
+#include <gf_lib.h>
#include <libsoup/soup.h>
@@ -86,8 +85,8 @@
static GfPluginInfo info = {
GF_NATIVE_PLUGIN_ABI_VERSION,
- PACKAGE_NAME,
- PACKAGE_VERSION,
+ "Guifications Web Interface",
+ VERSION,
N_("Web Interface for Guifications"),
N_("This is a daemon plugin for monitoring via a web browser"),
"Gary Kramlich <grim@reaperworld.com>",
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/guifications-daemon-web/themes/CMakeLists.txt Mon Dec 13 23:40:42 2010 -0600
@@ -0,0 +1,2 @@
+add_subdirectory(default)
+
--- a/guifications-daemon-web/themes/Makefile.am Mon Dec 13 23:16:27 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-SUBDIRS=default
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/guifications-daemon-web/themes/default/CMakeLists.txt Mon Dec 13 23:40:42 2010 -0600
@@ -0,0 +1,14 @@
+set(THEME
+ debug.gplate
+ feed.gplate
+ feeds.gplate
+ footer.gplate
+ header.gplate
+ plugin.gplate
+ plugins.gplate
+)
+
+foreach(PAGE ${THEME})
+ install(FILES ${PAGE} DESTINATION share/guifications-daemon/web/themes/default)
+endforeach(PAGE)
+
--- a/guifications-daemon-web/themes/default/Makefile.am Mon Dec 13 23:16:27 2010 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-DEFAULT_THEME=\
- debug.gplate \
- feed.gplate \
- feeds.gplate \
- footer.gplate \
- header.gplate \
- plugin.gplate \
- plugins.gplate
-
-EXTRA_DIST=$(DEFAULT_THEME)
-
-default_DATA=$(DEFAULT_THEME)
-defaultdir=$(datadir)/guifications-daemon/web/themes/default/