summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-06-21 11:05:28 +0000
committerLennart Poettering <lennart@poettering.net>2006-06-21 11:05:28 +0000
commit637ed0af936a25d2633110963ad6ec333859fa28 (patch)
tree6390b510666a3574fd939e3dd00f74a9b3359e30
parent2cede24ad0dbb02eba0eabdcbebdd9fdfcede853 (diff)
add proper autoconfization
git-svn-id: file:///home/lennart/svn/public/padevchooser/trunk@8 e4aeda27-4315-0410-ac56-b21855d76123
-rw-r--r--Makefile.am38
-rwxr-xr-xbootstrap.sh59
-rw-r--r--configure.ac83
-rw-r--r--doc/Makefile.am36
-rw-r--r--doc/README.html.in113
-rw-r--r--doc/style.css27
-rw-r--r--src/Makefile10
-rw-r--r--src/Makefile.am33
-rw-r--r--src/padevchooser.desktop11
9 files changed, 400 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..46cab90
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,38 @@
+# $Id$
+#
+# This file is part of padevchooser.
+#
+# padevchooser 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 2 of the License, or
+# (at your option) any later version.
+#
+# padevchooser 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 padevchooser; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+EXTRA_DIST = bootstrap.sh README LICENSE
+SUBDIRS=src doc
+
+MAINTAINERCLEANFILES=README
+noinst_DATA = README
+
+README:
+ rm -f README
+ $(MAKE) -C doc README
+ cd $(srcdir) && ln -s doc/README README
+
+homepage: all dist
+ test -d $$HOME/homepage/private
+ mkdir -p $$HOME/homepage/private/projects/padevchooser
+ cp padevchooser-@PACKAGE_VERSION@.tar.gz $$HOME/homepage/private/projects/padevchooser
+ cp doc/README.html doc/screenshot.png doc/style.css $$HOME/homepage/private/projects/padevchooser
+ ln -sf README.html $$HOME/homepage/private/projects/padevchooser/index.html
+
+.PHONY: homepage
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 0000000..aa0e552
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+# $Id$
+
+# This file is part of padevchooser.
+#
+# padevchooser 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 2 of the License, or
+# (at your option) any later version.
+#
+# padevchooser 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 padevchooser; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+VERSION=1.9
+
+run_versioned() {
+ local P
+ local V
+
+ V=$(echo "$2" | sed -e 's,\.,,g')
+
+ if [ -e "`which $1$V`" ] ; then
+ P="$1$V"
+ else
+ if [ -e "`which $1-$2`" ] ; then
+ P="$1-$2"
+ else
+ P="$1"
+ fi
+ fi
+
+ shift 2
+ "$P" "$@"
+}
+
+set -ex
+
+if [ "x$1" = "xam" ] ; then
+ run_versioned automake "$VERSION" -a -c --foreign
+ ./config.status
+else
+ rm -rf autom4te.cache
+ rm -f config.cache
+
+ run_versioned aclocal "$VERSION"
+ run_versioned autoconf 2.59 -Wall
+ run_versioned autoheader 2.59
+ run_versioned automake "$VERSION" -a -c --foreign
+
+ CFLAGS="-g -O0" ./configure --sysconfdir=/etc "$@"
+
+ make clean
+fi
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..9d2f041
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,83 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+# $Id$
+
+# This file is part of padevchooser.
+#
+# padevchooser 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 2 of the License, or
+# (at your option) any later version.
+#
+# padevchooser 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 padevchooser; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+AC_PREREQ(2.57)
+AC_INIT([padevchooser],[0.9.2],[mzcnqripubbfre (at) 0pointer (dot) de])
+AC_CONFIG_SRCDIR([src/padevchooser.c])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
+
+AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/padevchooser/])
+
+if type -p stow > /dev/null && test -d /usr/local/stow ; then
+ AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
+ ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
+fi
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_LN_S
+AC_TYPE_SIGNAL
+AC_HEADER_STDC
+
+PKG_CHECK_MODULES(GUILIBS, [ gtk+-2.0 libnotify libglade-2.0 gconf-2.0 ])
+AC_SUBST(GUILIBS_CFLAGS)
+AC_SUBST(GUILIBS_LIBS)
+
+if test -d ../pulseaudio ; then
+ PULSE_CFLAGS='-I$(top_srcdir)/../pulseaudio/src'
+ PULSE_LIBS='-L$(top_srcdir)/../pulseaudio/src/.libs -lpulse -lpulse-mainloop-glib -lpulse-browse'
+ echo "*** Found pulseaudio in ../pulseaudio, using that version ***"
+else
+ PKG_CHECK_MODULES(PULSE, [ libpulse >= 0.9.2 libpulse-browser >= 0.9.2 libpulse-mainloop-glib >= 0.9.2 ])
+fi
+
+AC_SUBST(PULSE_LIBS)
+AC_SUBST(PULSE_CFLAGS)
+
+# If using GCC specifiy some additional parameters
+if test "x$GCC" = "xyes" ; then
+ CFLAGS="$CFLAGS -pipe -Wall -W -Wno-unused-parameter"
+ CXXFLAGS="$CXXFLAGS -pipe -Wall -W"
+fi
+
+# LYNX documentation generation
+AC_ARG_ENABLE(lynx,
+ AS_HELP_STRING(--disable-lynx,Turn off lynx usage for documentation generation),
+[case "${enableval}" in
+ yes) lynx=yes ;;
+ no) lynx=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
+esac],[lynx=yes])
+
+if test x$lynx = xyes ; then
+ AC_CHECK_PROG(have_lynx, lynx, yes, no)
+
+ if test x$have_lynx = xno ; then
+ AC_MSG_ERROR([*** Sorry, you have to install lynx or use --disable-lynx ***])
+ fi
+fi
+
+AM_CONDITIONAL([USE_LYNX], [test "x$lynx" = xyes])
+
+AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile doc/README.html])
+AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..68702ac
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,36 @@
+# $Id$
+
+# This file is part of padevchooser.
+#
+# padevchooser 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 2 of the License, or
+# (at your option) any later version.
+#
+# padevchooser 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 padevchooser; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+noinst_DATA = README.html README
+EXTRA_DIST = $(noinst_DATA) style.css README.html.in
+
+MAINTAINERCLEANFILES = README README.html
+CLEANFILES =
+
+if USE_LYNX
+README: README.html
+ lynx --dump $^ | sed 's,file://localhost/.*/doc/README.html,README,' > $@
+
+CLEANFILES += README
+endif
+
+tidy: README.html
+ tidy -e < README.html
+
+.PHONY: tidy
+
diff --git a/doc/README.html.in b/doc/README.html.in
new file mode 100644
index 0000000..13d027e
--- /dev/null
+++ b/doc/README.html.in
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="iso-8859-1"?> <!-- -*-html-helper-*- -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<title>PulseAudio Device Chooser @PACKAGE_VERSION@</title>
+<link rel="stylesheet" type="text/css" href="style.css" />
+</head>
+
+<body>
+<h1><a name="top">PulseAudio Device Chooser @PACKAGE_VERSION@</a></h1>
+
+<p><i>Copyright 2006 Lennart Poettering &lt;@PACKAGE_BUGREPORT@&gt;</i></p>
+
+<ul class="toc">
+ <li><a href="#license">License</a></li>
+ <li><a href="#news">News</a></li>
+ <li><a href="#overview">Overview</a></li>
+ <li><a href="#status">Current Status</a></li>
+ <li><a href="#documentation">Documentation</a></li>
+ <li><a href="#requirements">Requirements</a></li>
+ <li><a href="#installation">Installation</a></li>
+ <li><a href="#acks">Acknowledgements</a></li>
+ <li><a href="#download">Download</a></li>
+</ul>
+
+<h2><a name="license">License</a></h2>
+
+<p>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 2 of the
+License, or (at your option) any later version.</p>
+
+<p>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.</p>
+
+<p>You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</p>
+
+<h2><a name="news">News</a></h2>
+
+<div class="news-date">Fri June 2 2006: </div> <p class="news-text"><a
+href="@PACKAGE_URL@padevchooser-0.9.1.tar.gz">Version 0.9.1</a> released; add a <tt>.desktop</tt> file; update icons everywhere</p>
+
+<h2><a name="overview">Overview</a></h2>
+
+<p>PulseAudio Device Chooser (<tt>padevchooser</tt>) is a simple GTK
+tool which registers an icon in the tray area and allows quick access to some features of the <a
+href="http://0pointer.de/lennart/projects/pulseaudio/">PulseAudio
+sound server</a>. Specifically it can do for you:</p>
+
+<ul>
+ <li>Notify about new sink/sources becoming available on the LAN</li>
+ <li>Quickly change the default PulseAudio sink/source/server assigned to the current X11 display, selecting devices available on the LAN</li>
+ <li>Start the auxiliary tools <a href="http://0pointer.de/lennart/projects/pavucontrol/">PulseAudio Volume Control</a>, <a href="http://0pointer.de/lennart/projects/pavumeter/">PulseAudio Volume Meter</a>, <a href="http://0pointer.de/lennart/projects/paman/">PulseAudio Manager</a>
+</ul>
+
+<p>Everybody loves <a href="@PACKAGE_URL@/screenshot.png">screenshots</a>.</p>
+
+<h2><a name="status">Current Status</a></h2>
+
+<p>Works perfectly.</p>
+
+<h2><a name="documentation">Documentation</a></h2>
+
+<p>There is not much to say. Just run <tt>padevchooser</tt> and see for yourself.</p>
+
+<h2><a name="requirements">Requirements</a></h2>
+
+<p>Currently, <tt>padevchooser</tt> is tested on Linux only.</p>
+
+<p><tt>padevchooser</tt> was developed and tested on Debian GNU/Linux
+"testing" from June 2006, it should work on most other Linux
+distributions (and maybe Unix versions) since it uses GNU autoconf for
+source code configuration.</p>
+
+<p><tt>padevchooser</tt> requires GTK 2.4, <tt>libnotify</tt>, GConf installed.</p>
+
+<p>Obviously <tt>padevchooser</tt> requires an installation of PulseAudio (version 0.9.2).</p>
+
+<h2><a name="installation">Installation</a></h2>
+
+<p>As this package is made with the GNU autotools you should run
+<tt>./configure</tt> inside the distribution directory for configuring
+the source tree. After that you should run <tt>make</tt> for
+compilation and <tt>make install</tt> (as root) for installation of
+<tt>padevchooser</tt>.</p>
+
+<h2><a name="acks">Acknowledgements</a></h2>
+
+<p>None so far.</p>
+
+<h2><a name="download">Download</a></h2>
+
+<p>The newest release is always available from <a href="@PACKAGE_URL@">@PACKAGE_URL@</a></p>
+
+<p>The current release is <a href="@PACKAGE_URL@padevchooser-@PACKAGE_VERSION@.tar.gz">@PACKAGE_VERSION@</a></p>
+
+<p>Get <tt>padevchooser</tt>'s development sources from the <a href="http://subversion.tigris.org/">Subversion</a> <a href="svn://svn.0pointer.net/padevchooser">repository</a> (<a href="http://0pointer.net/cgi-bin/viewcvs.cgi/?root=padevchooser">viewcvs</a>): </p>
+
+<pre>svn checkout svn://svn.0pointer.net/padevchooser/trunk padevchooser</pre>
+
+<p>If you want to be notified whenever I release a new version of this software use the subscription feature of <a href="http://freshmeat.net/projects/padevchooser/">Freshmeat</a>.</p>
+
+<hr/>
+<address class="grey">Lennart Poettering &lt;@PACKAGE_BUGREPORT@&gt;, June 2006</address>
+<div class="grey"><i>$Id$</i></div>
+
+</body>
+</html>
diff --git a/doc/style.css b/doc/style.css
new file mode 100644
index 0000000..c58aeb4
--- /dev/null
+++ b/doc/style.css
@@ -0,0 +1,27 @@
+/* $Id$ */
+
+/***
+ * This file is part of padevchooser.
+ *
+ * padevchooser is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * padevchooser 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 Lesser General Public License
+ * along with padevchooser; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ ***/
+
+body { color: black; background-color: white; }
+a:link, a:visited { color: #900000; }
+div.news-date { font-size: 80%; font-style: italic; }
+pre { background-color: #f0f0f0; padding: 0.4cm; }
+.grey { color: #8f8f8f; font-size: 80%; }
+table { margin-left: 1cm; border:1px solid lightgrey; padding: 0.2cm; }
+td { padding-left:10px; padding-right:10px; }
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 847e2b5..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-CFLAGS=-Wextra -Wall -g -O0 -pipe `pkg-config --cflags gtk+-2.0 libpulse libpulse-browse libpulse-mainloop-glib libnotify libglade-2.0 gconf-2.0` -I. -DEGG_COMPILATION
-LIBS=`pkg-config --libs gtk+-2.0 libpulse libpulse-browse libpulse-mainloop-glib libnotify libglade-2.0 gconf-2.0`
-
-padevchooser: eggtrayicon.o padevchooser.o x11prop.o
- $(CC) -o $@ $^ $(LIBS)
-
-clean:
- rm -f *.o padevchooser
-
-.PHONY: clean
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..ca8d704
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,33 @@
+# $Id$
+#
+# This file is part of padevchooser.
+#
+# padevchooser 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 2 of the License, or
+# (at your option) any later version.
+#
+# padevchooser 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 padevchooser; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+desktopdir = $(datadir)/applications
+
+bin_PROGRAMS=padevchooser
+
+dist_pkgdata_DATA=padevchooser.glade
+dist_desktop_DATA=padevchooser.desktop
+
+padevchooser_SOURCES=padevchooser.c x11prop.c eggtrayicon.c
+
+padevchooser_LDADD=$(AM_LDADD) $(GUILIBS_LIBS) $(PULSE_LIBS)
+padevchooser_CFLAGS=$(AM_CFLAGS) $(GUILIBS_CFLAGS) $(PULSE_CFLAGS)
+padevchooser_CFLAGS+=-DGLADE_FILE=\"$(pkgdatadir)/padevchooser.glade\"
+padevchooser_CFLAGS+=-DEGG_COMPILATION
+
diff --git a/src/padevchooser.desktop b/src/padevchooser.desktop
new file mode 100644
index 0000000..d2abca1
--- /dev/null
+++ b/src/padevchooser.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=PulseAudio Device Chooser
+GenericName=Device Chooser
+Comment=An Applet for Quick Device Changing
+Exec=padevchooser
+Icon=audio-card
+StartupNotify=true
+Type=Application
+Categories=Application;AudioVideo;Audio;