From 637ed0af936a25d2633110963ad6ec333859fa28 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 21 Jun 2006 11:05:28 +0000 Subject: add proper autoconfization git-svn-id: file:///home/lennart/svn/public/padevchooser/trunk@8 e4aeda27-4315-0410-ac56-b21855d76123 --- Makefile.am | 38 ++++++++++++++++ bootstrap.sh | 59 +++++++++++++++++++++++++ configure.ac | 83 ++++++++++++++++++++++++++++++++++ doc/Makefile.am | 36 +++++++++++++++ doc/README.html.in | 113 +++++++++++++++++++++++++++++++++++++++++++++++ doc/style.css | 27 +++++++++++ src/Makefile | 10 ----- src/Makefile.am | 33 ++++++++++++++ src/padevchooser.desktop | 11 +++++ 9 files changed, 400 insertions(+), 10 deletions(-) create mode 100644 Makefile.am create mode 100755 bootstrap.sh create mode 100644 configure.ac create mode 100644 doc/Makefile.am create mode 100644 doc/README.html.in create mode 100644 doc/style.css delete mode 100644 src/Makefile create mode 100644 src/Makefile.am create mode 100644 src/padevchooser.desktop 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 @@ + + + + + +PulseAudio Device Chooser @PACKAGE_VERSION@ + + + + +

PulseAudio Device Chooser @PACKAGE_VERSION@

+ +

Copyright 2006 Lennart Poettering <@PACKAGE_BUGREPORT@>

+ + + +

License

+ +

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.

+ +

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, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

+ +

News

+ +
Fri June 2 2006:

Version 0.9.1 released; add a .desktop file; update icons everywhere

+ +

Overview

+ +

PulseAudio Device Chooser (padevchooser) is a simple GTK +tool which registers an icon in the tray area and allows quick access to some features of the PulseAudio +sound server. Specifically it can do for you:

+ + + +

Everybody loves screenshots.

+ +

Current Status

+ +

Works perfectly.

+ +

Documentation

+ +

There is not much to say. Just run padevchooser and see for yourself.

+ +

Requirements

+ +

Currently, padevchooser is tested on Linux only.

+ +

padevchooser 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.

+ +

padevchooser requires GTK 2.4, libnotify, GConf installed.

+ +

Obviously padevchooser requires an installation of PulseAudio (version 0.9.2).

+ +

Installation

+ +

As this package is made with the GNU autotools you should run +./configure inside the distribution directory for configuring +the source tree. After that you should run make for +compilation and make install (as root) for installation of +padevchooser.

+ +

Acknowledgements

+ +

None so far.

+ +

Download

+ +

The newest release is always available from @PACKAGE_URL@

+ +

The current release is @PACKAGE_VERSION@

+ +

Get padevchooser's development sources from the Subversion repository (viewcvs):

+ +
svn checkout svn://svn.0pointer.net/padevchooser/trunk padevchooser
+ +

If you want to be notified whenever I release a new version of this software use the subscription feature of Freshmeat.

+ +
+
Lennart Poettering <@PACKAGE_BUGREPORT@>, June 2006
+
$Id$
+ + + 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; -- cgit