diff --git a/Makefile.am b/Makefile.am index d8cec1d68..6ffbfe946 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,9 +24,9 @@ EXTRA_DIST = \ PROTOCOL \ README -SUBDIRS = src man +SUBDIRS = src man po -DIST_SUBDIRS = src man +DIST_SUBDIRS = src man po MAINTAINERCLEANFILES = noinst_DATA = diff --git a/configure.ac b/configure.ac index 68b0e234b..370ee6247 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,27 @@ AS_IF([test "x$M4" = "xno"], AC_MSG_ERROR([m4 missing])) PKG_PROG_PKG_CONFIG +# gettext + +if test "x$enable_nls" != "xno"; then +IT_PROG_INTLTOOL([0.35.0]) + +AM_GNU_GETTEXT_VERSION([0.18.1]) +AM_GNU_GETTEXT([external]) + +GETTEXT_PACKAGE=pinos +AC_SUBST([GETTEXT_PACKAGE]) +AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) + +pinoslocaledir='${prefix}/${DATADIRNAME}/locale' +AX_DEFINE_DIR(PINOS_LOCALEDIR, pinoslocaledir, [Gettext locale dir]) +else +# workaround till an intltool m4 bug is fixed upstream +# (https://bugs.launchpad.net/intltool/+bug/904647) +USE_NLS=no +AC_SUBST(USE_NLS) +fi + #### Compiler flags #### AX_APPEND_COMPILE_FLAGS( @@ -152,6 +173,10 @@ AC_SUBST([LIBLTDL]) # External libraries # ################################### +#### [lib]iconv #### + +AM_ICONV + #### Valgrind (optional) #### AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h]) @@ -221,6 +246,7 @@ man/Makefile man/pinos.1.xml man/pinos-monitor.1.xml pkgconfig/libpinos.pc +po/Makefile.in ]) AC_OUTPUT diff --git a/m4/ax_define_dir.m4 b/m4/ax_define_dir.m4 new file mode 100644 index 000000000..b74d155fd --- /dev/null +++ b/m4/ax_define_dir.m4 @@ -0,0 +1,49 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_define_dir.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) +# +# DESCRIPTION +# +# This macro sets VARNAME to the expansion of the DIR variable, taking +# care of fixing up ${prefix} and such. +# +# VARNAME is then offered as both an output variable and a C preprocessor +# symbol. +# +# Example: +# +# AX_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) +# +# LICENSE +# +# Copyright (c) 2008 Stepan Kasal +# Copyright (c) 2008 Andreas Schwab +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2008 Alexandre Oliva +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AU_ALIAS([AC_DEFINE_DIR], [AX_DEFINE_DIR]) +AC_DEFUN([AX_DEFINE_DIR], [ + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix +dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn +dnl refers to ${prefix}. Thus we have to use `eval' twice. + eval ax_define_dir="\"[$]$2\"" + eval ax_define_dir="\"$ax_define_dir\"" + AC_SUBST($1, "$ax_define_dir") + AC_DEFINE_UNQUOTED($1, "$ax_define_dir", [$3]) + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE +]) diff --git a/pinos.spec b/pinos.spec index 5d2da7564..dcbc35bcf 100644 --- a/pinos.spec +++ b/pinos.spec @@ -123,6 +123,7 @@ make check \ %files %doc README LICENSE GPL LGPL +%{_sysconfdir}/xdg/autostart/pinos.desktop ## already owned by -libs, see also https://bugzilla.redhat.com/show_bug.cgi?id=909690 #dir %{_sysconfdir}/pinos/ %{_sysconfdir}/dbus-1/system.d/pinos-system.conf diff --git a/src/Makefile.am b/src/Makefile.am index 383f2b02e..3806bcffa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,6 +22,7 @@ pinosincludedir=$(includedir)/pinos/client pinosserverincludedir=$(includedir)/pinos/server pinoslibexecdir=$(libexecdir)/pinos/client +xdgautostartdir=$(sysconfdir)/xdg/autostart dbuspolicydir=$(sysconfdir)/dbus-1/system.d ################################### @@ -50,12 +51,18 @@ FOREIGN_CFLAGS = -w EXTRA_DIST = \ daemon/pinos-system.conf \ + daemon/pinos.desktop.in \ dbus/org.pinos.xml \ client/private.h dbuspolicy_DATA = \ daemon/pinos-system.conf +xdgautostart_in_files = \ + daemon/pinos.desktop.in +xdgautostart_DATA = $(xdgautostart_in_files:.desktop.in=.desktop) +@INTLTOOL_DESKTOP_RULE@ + ################################### # Includes # ################################### @@ -237,6 +244,7 @@ noinst_HEADERS = gst/gstpinossrc.h gst/gstpinossink.h gst/gstpinospay.h gst/gstp # Some minor stuff # ################################### +CLEANFILES += daemon/pinos.desktop DISTCLEANFILES = install-exec-hook: diff --git a/src/daemon/pinos.desktop.in b/src/daemon/pinos.desktop.in new file mode 100644 index 000000000..ac5c31718 --- /dev/null +++ b/src/daemon/pinos.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +_Name=Pinos Media System +_Comment=Start the Pinos Media System +Exec=pinos +Terminal=false +Type=Application +Categories= +GenericName= +X-GNOME-Autostart-Phase=Initialization +X-KDE-autostart-phase=1