aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-13 15:48:42 -0500
committerTed Gould <ted@canonical.com>2009-10-13 15:48:42 -0500
commite265e46176c6c8633849b3a5d65b7f86bda47318 (patch)
tree3d3f461747a9626556cc6b2e11d280f7f1fa3c77
parent140fda5adff2a21f9c158c941456d9e1f5765832 (diff)
parentfb328a435358e26c1f2779e2bf07ddb05b60e93e (diff)
downloadayatana-indicator-application-e265e46176c6c8633849b3a5d65b7f86bda47318.tar.gz
ayatana-indicator-application-e265e46176c6c8633849b3a5d65b7f86bda47318.tar.bz2
ayatana-indicator-application-e265e46176c6c8633849b3a5d65b7f86bda47318.zip
A basical build system and basic files.
-rw-r--r--.bzrignore7
-rw-r--r--AUTHORS0
-rw-r--r--ChangeLog0
-rw-r--r--Makefile.am4
-rw-r--r--NEWS0
-rwxr-xr-xautogen.sh11
-rw-r--r--configure.ac90
-rw-r--r--data/Makefile.am11
-rw-r--r--data/indicator-custom.service.in3
-rw-r--r--src/Makefile.am31
-rw-r--r--src/custom-service.c7
-rw-r--r--src/indicator-custom.c28
12 files changed, 192 insertions, 0 deletions
diff --git a/.bzrignore b/.bzrignore
new file mode 100644
index 0000000..a33f7f0
--- /dev/null
+++ b/.bzrignore
@@ -0,0 +1,7 @@
+data/indicator-custom.service
+compile
+indicator-custom-[0-9].[0-9].[0-9].tar.gz
+m4/
+src/indicator-custom-service
+src/libcustom.la
+src/libcustom_la-indicator-custom.lo
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/AUTHORS
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ChangeLog
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..1d1ff09
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS = data \
+ src
+
+DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/NEWS
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..3483322
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+PKG_NAME="upanel"
+
+which gnome-autogen.sh || {
+ echo "You need gnome-common from GNOME SVN"
+ exit 1
+}
+
+USE_GNOME2_MACROS=1 \
+. gnome-autogen.sh
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..48b11c6
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,90 @@
+
+AC_INIT(indicator-custom, 0.0.1, ted@canonical.com)
+AC_COPYRIGHT([Copyright 2009 Canonical])
+
+AC_PREREQ(2.53)
+
+AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(indicator-custom, 0.0.1)
+
+AM_MAINTAINER_MODE
+
+AC_ISC_POSIX
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_STDC_HEADERS
+AC_PROG_LIBTOOL
+
+AC_SUBST(VERSION)
+AC_CONFIG_MACRO_DIR([m4])
+
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
+###########################
+# Dependencies
+###########################
+
+GTK_REQUIRED_VERSION=2.12
+INDICATOR_REQUIRED_VERSION=0.2.0
+DBUSMENUGTK_REQUIRED_VERSION=0.1.1
+
+PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ indicator >= $INDICATOR_REQUIRED_VERSION
+ dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION)
+
+AC_SUBST(INDICATOR_CFLAGS)
+AC_SUBST(INDICATOR_LIBS)
+
+###########################
+# Check to see if we're local
+###########################
+
+with_localinstall="no"
+AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install all of the files localy instead of system directories (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
+
+###########################
+# Indicator Info
+###########################
+
+if test "x$with_localinstall" = "xyes"; then
+ INDICATORDIR="${libdir}/indicators/2/"
+ INDICATORICONSDIR="${datadir}/libindicate/icons/"
+else
+ INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
+ INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
+fi
+AC_SUBST(INDICATORDIR)
+AC_SUBST(INDICATORICONSDIR)
+
+###########################
+# DBus Service Info
+###########################
+
+if test "x$with_localinstall" = "xyes"; then
+ DBUSSERVICEDIR="${datadir}/dbus-1/services/"
+else
+ DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
+fi
+AC_SUBST(DBUSSERVICEDIR)
+
+###########################
+# Files
+###########################
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+data/Makefile
+])
+
+###########################
+# Results
+###########################
+
+AC_MSG_NOTICE([
+
+Custom Indicator Configuration:
+
+ Prefix: $prefix
+ Indicator Dir: $INDICATORDIR
+])
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644
index 0000000..e93e589
--- /dev/null
+++ b/data/Makefile.am
@@ -0,0 +1,11 @@
+
+dbus_servicesdir = $(DBUSSERVICEDIR)
+dbus_services_DATA = indicator-custom.service
+
+%.service: %.service.in
+ sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
+
+EXTRA_DIST = indicator-custom.service.in
+
+CLEANFILES = indicator-custom.service
+
diff --git a/data/indicator-custom.service.in b/data/indicator-custom.service.in
new file mode 100644
index 0000000..be64983
--- /dev/null
+++ b/data/indicator-custom.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.ayatana.indicator.custom
+Exec=@libexecdir@/indicator-custom-service
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..63f0c64
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,31 @@
+
+libexec_PROGRAMS = indicator-custom-service
+
+##################################
+# Indicator
+##################################
+
+customlibdir = $(INDICATORDIR)
+customlib_LTLIBRARIES = libcustom.la
+libcustom_la_SOURCES = \
+ indicator-custom.c
+libcustom_la_CFLAGS = $(INDICATOR_CFLAGS) \
+ -Wall \
+ -Wl,-Bsymbolic-functions \
+ -Wl,-z,defs \
+ -Wl,--as-needed \
+ -Werror
+libcustom_la_LIBADD = $(INDICATOR_LIBS)
+libcustom_la_LDFLAGS = -module -avoid-version
+
+##################################
+# Service
+##################################
+
+indicator_custom_service_SOURCES = \
+ custom-service.c
+indicator_custom_service_CFLAGS = \
+ $(INDICATOR_CFLAGS) \
+ -Wall -Werror
+indicator_custom_service_LDADD = \
+ $(INDICATOR_LIBS)
diff --git a/src/custom-service.c b/src/custom-service.c
new file mode 100644
index 0000000..63590c7
--- /dev/null
+++ b/src/custom-service.c
@@ -0,0 +1,7 @@
+
+int
+main (int argc, char ** argv)
+{
+
+ return 0;
+}
diff --git a/src/indicator-custom.c b/src/indicator-custom.c
new file mode 100644
index 0000000..1a09a9a
--- /dev/null
+++ b/src/indicator-custom.c
@@ -0,0 +1,28 @@
+
+#include "libindicator/indicator.h"
+
+INDICATOR_SET_VERSION
+INDICATOR_SET_NAME("indicator-custom")
+
+GtkLabel *
+get_label (void)
+{
+ return NULL;
+}
+
+GtkImage *
+get_icon (void)
+{
+ return GTK_IMAGE(gtk_image_new());
+}
+
+GtkMenu *
+get_menu (void)
+{
+ GtkMenu * main_menu = GTK_MENU(gtk_menu_new());
+ GtkWidget * loading_item = gtk_menu_item_new_with_label("Loading...");
+ gtk_menu_shell_append(GTK_MENU_SHELL(main_menu), loading_item);
+ gtk_widget_show(GTK_WIDGET(loading_item));
+
+ return main_menu;
+}