Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tcbrindle committed Sep 8, 2014
0 parents commit 38a4aa6
Show file tree
Hide file tree
Showing 23 changed files with 2,805 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

AUTOMAKE_OPTIONS = foreign

SUBDIRS = src

157 changes: 157 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

DIE=0

if [ -n "$GNOME2_DIR" ]; then
ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
PATH="$GNOME2_DIR/bin:$PATH"
export PATH
export LD_LIBRARY_PATH
fi

(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level package directory"
exit 1
}

(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}

(grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`intltool' installed."
echo "You can get it from:"
echo " ftp://ftp.gnome.org/pub/GNOME/"
DIE=1
}
}

(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && {
(xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`xml-i18n-toolize' installed."
echo "You can get it from:"
echo " ftp://ftp.gnome.org/pub/GNOME/"
DIE=1
}
}

(grep "^LT_INIT" $srcdir/configure.ac >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
}

(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && {
(grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \
(glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`glib' installed."
echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
DIE=1
}
}

(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
DIE=1
NO_AUTOMAKE=yes
}


# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}

if test "$DIE" -eq 1; then
exit 1
fi

if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi

case $CC in
xlc )
am_opt=--include-deps;;
esac

for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print`
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
( cd $dr

aclocalinclude="$ACLOCAL_FLAGS"

if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running glib-gettextize... Ignore non-fatal messages."
echo "no" | glib-gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then
echo "Running intltoolize..."
intltoolize --copy --force --automake
fi
if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then
echo "Running xml-i18n-toolize..."
xml-i18n-toolize --copy --force --automake
fi
if grep "^LT_INIT" configure.ac >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude
if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
echo "Running autoheader..."
autoheader
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --copy --gnu $am_opt
echo "Running autoconf ..."
autoconf
)
fi
done

if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure "$@" ...
$srcdir/configure "$@" \
&& echo Now type \`make\' to compile. || exit 1
else
echo Skipping configure process.
fi
26 changes: 26 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
AC_INIT(libsystemd_glib, 1.0)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE([1.11])

AM_SILENT_RULES([yes])

AC_PROG_CC

LT_INIT

PKG_CHECK_MODULES(GIO, [gio-unix-2.0 ])

GOBJECT_INTROSPECTION_CHECK([1.2.9])

VALA_REQUIRED=0.20.0

VAPIGEN_CHECK($VALA_REQUIRED)

AC_OUTPUT([
Makefile
src/systemd-glib.pc
src/Makefile
])
126 changes: 126 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@

NULL=

lib_LTLIBRARIES = libsystemd-glib.la

libsystemd_glib_la_SOURCES = \
${dbus_built_sources} \
systemd-glib.h \
systemd-glib-types.c systemd-glib-types.h \
${NULL}

libsystemd_glib_la_CFLAGS = \
${GIO_CFLAGS} \
${NULL}

libsystemd_glib_la_LIBADD = \
${GIO_LIBS} \
${NULL}

libsystemd_glibincludedir = ${includedir}/systemd

libsystemd_glibinclude_HEADERS = \
systemd-glib.h \
systemd-glib-generated.h \
systemd-glib-types.h
${NULL}

${dbus_built_sources} : Makefile.am ${dbus_xml_sources}
${AM_V_GEN} \
gdbus-codegen \
--interface-prefix org.freedesktop.systemd1. \
--c-namespace Systemd \
--c-generate-object-manager \
--generate-c-code systemd-glib-generated \
${dbus_xml_sources} \
$(NULL)

dbus_built_sources = \
systemd-glib-generated.c systemd-glib-generated.h \
${NULL}

BUILT_SOURCES = \
${dbus_built_sources} \
${NULL}

dbus_xml_sources = \
org.freedesktop.systemd1.Automount.xml \
org.freedesktop.systemd1.Device.xml \
org.freedesktop.systemd1.Job.xml \
org.freedesktop.systemd1.Manager.xml \
org.freedesktop.systemd1.Mount.xml \
org.freedesktop.systemd1.Path.xml \
org.freedesktop.systemd1.Scope.xml \
org.freedesktop.systemd1.Service.xml \
org.freedesktop.systemd1.Slice.xml \
org.freedesktop.systemd1.Snapshot.xml \
org.freedesktop.systemd1.Socket.xml \
org.freedesktop.systemd1.Swap.xml \
org.freedesktop.systemd1.Target.xml \
org.freedesktop.systemd1.Timer.xml \
org.freedesktop.systemd1.Unit.xml \
${NULL}

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = systemd-glib.pc

-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = \
--add-include-path=$(srcdir) \
--symbol-prefix=systemd \
--warn-all -v
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)

if HAVE_INTROSPECTION
introspection_sources = $(libsystemd_glib_la_SOURCES)

Systemd-1.0.gir: Makefile.am libsystemd-glib.la
Systemd_1_0_gir_INCLUDES = Gio-2.0
Systemd_1_0_gir_CFLAGS = $(INCLUDES)
Systemd_1_0_gir_LIBS = libsystemd-glib.la
Systemd_1_0_gir_FILES = $(introspection_sources)
Systemd_1_0_gir_SCANNERFLAGS = --c-include "systemd/systemd-glib.h"
INTROSPECTION_GIRS += Systemd-1.0.gir

girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)

typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES = $(gir_DATA) $(typelib_DATA)

if ENABLE_VAPIGEN
include $(VAPIGEN_MAKEFILE)

systemd-glib.vapi: Systemd-1.0.gir systemd-glib.deps

VAPIGEN_VAPIS = \
systemd-glib.vapi

systemd_glib_vapi_DEPS = glib-2.0 gio-2.0
systemd_glib_vapi_METADATADIRS = $(srcdir)
systemd_glib_vapi_FILES = Systemd-1.0.gir

VAPI_DEPS = $(VAPIGEN_VAPIS:.vapi=.deps)

systemd-glib.deps: Makefile.am
$(AM_V_GEN) echo $(systemd_glib_vapi_DEPS) | tr ' ' '\n' > $@

vapidir = $(datadir)/vala/vapi
vapi_DATA = \
$(VAPIGEN_VAPIS) \
$(VAPI_DEPS)

CLEANFILES += \
$(VAPIGEN_VAPIS) \
$(VAPI_DEPS)

endif # ENABLE_VAPIGEN
endif # HAVE_INTROSPECTION

EXTRA_DIST = \
systemd-glib.pc.in \
${dbus_xml_sources} \
${NULL}
14 changes: 14 additions & 0 deletions src/org.freedesktop.systemd1.Automount.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.systemd1.Automount">
<property name="Where" type="s" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
</property>
<property name="DirectoryMode" type="u" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
</property>
<property name="Result" type="s" access="read">
</property>
</interface>
</node>
8 changes: 8 additions & 0 deletions src/org.freedesktop.systemd1.Device.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.systemd1.Device">
<property name="SysFSPath" type="s" access="read">
</property>
</interface>
</node>
13 changes: 13 additions & 0 deletions src/org.freedesktop.systemd1.Job.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.systemd1.Job">
<method name="Cancel"/>
<property name="Id" type="u" access="read"/>
<property name="Unit" type="(so)" access="read">
<annotation name="org.qtproject.QtDBus.QtTypeName" value="DBusUnit"/>
</property>
<property name="JobType" type="s" access="read"/>
<property name="State" type="s" access="read"/>
</interface>
</node>
Loading

0 comments on commit 38a4aa6

Please sign in to comment.