Merge commit 'refs/merge-requests/16' of git://gitorious.org/sparkleshare/sparkleshare into autofoo

This commit is contained in:
Hylke Bons 2010-06-18 23:15:39 +01:00
commit dbcd4fac93
81 changed files with 1514 additions and 38 deletions

29
.gitignore vendored
View file

@ -3,7 +3,36 @@
*.exe.mdb
*.userprefs
*.pidb
*.gmo
/SparkleShare/bin
/SparkleShare/obj
/notify-sharp/bin
/notify-sharp/obj
po/POTFILES
Makefile.in
Makefile
POTFILES
intltool-*
configure
config.guess
config.h
config.h.in
config.log
config.status
config.sub
INSTALL
aclocal.m4
autom4te.cache/
bin/
install-sh
libtool
ltmain.sh
missing
po/.intltool-merge-cache
po/Makefile.in.in
po/stamp-it
SparkleShare/AssemblyInfo.cs
build/m4/shave/shave
build/m4/*.m4
build/m4/shave/shave-libtool
Defines.cs

View file

@ -1,29 +0,0 @@
SparkleShare.exe : SparkleShare.sln
mdtool build --f --buildfile:SparkleShare.sln
install:
mkdir -p /usr/local/share/sparkleshare
cp SparkleShare/bin/Debug/SparkleShare.exe /usr/local/share/sparkleshare/
cp SparkleShare/bin/Debug/SparkleShare.exe.mdb /usr/local/share/sparkleshare/
cp SparkleShare/bin/Debug/notify-sharp.dll /usr/local/share/sparkleshare/
cp SparkleShare/bin/Debug/notify-sharp.dll.mdb /usr/local/share/sparkleshare/
chmod 755 /usr/local/share/sparkleshare/SparkleShare.exe
cp sparkleshare /usr/local/bin/
chmod 755 /usr/local/bin/sparkleshare
cp data/icons /usr/share/ -R
gtk-update-icon-cache /usr/share/icons/hicolor -f
uninstall:
rm /usr/local/bin/sparkleshare
rm -rf /usr/local/share/sparkleshare
rm /usr/share/icons/hicolor/*x*/places/folder-sparkleshare.png
rm /usr/share/icons/hicolor/*x*/places/folder-sync*.png
rm /usr/share/icons/hicolor/*x*/status/document-*ed.png
rm /usr/share/icons/hicolor/*x*/status/avatar-default.png
rm /usr/share/icons/hicolor/*x*/emblems/emblem-sync*.png
rm /usr/share/icons/hicolor/*x*/animations/process-working.png
rm ~/.config/autostart/sparkleshare.desktop
clean:
rm -rf SparkleShare/bin
rm -rf notify-sharp/bin

12
Makefile.am Normal file
View file

@ -0,0 +1,12 @@
SUBDIRS = \
build \
notify-sharp \
SparkleShare \
data \
po
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update

View file

@ -0,0 +1,11 @@
/*
* AssemblyInfo.cs
*
* This is free software. See COPYING for details.
*/
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyVersion("@VERSION@")]
[assembly: AssemblyTitle ("SparkleShare")]

View file

@ -0,0 +1,28 @@
// SparkleShare, an instant update workflow to Git.
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
using System;
namespace SparkleShare
{
public class Defines
{
public const string VERSION = "@VERSION@";
public const string LOCALE_DIR = "@prefix@/share/locale";
public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";
public const string PREFIX = "@prefix@";
}
}

24
SparkleShare/Makefile.am Normal file
View file

@ -0,0 +1,24 @@
ASSEMBLY = SparkleShare
TARGET = exe
LINK = $(REF_SPARKLESHARE)
SOURCES = \
Defines.cs \
SparkleBubble.cs \
SparkleDialog.cs \
SparkleHelpers.cs \
SparklePaths.cs \
SparklePlatform.cs \
SparkleRepo.cs \
SparkleShare.cs \
SparkleSpinner.cs \
SparkleStatusIcon.cs \
SparkleUI.cs \
SparkleWindow.cs
include $(top_srcdir)/build/build.mk
bin_SCRIPTS = sparkleshare

View file

@ -33,7 +33,7 @@ namespace SparkleShare {
public static string SparkleConfigPath = SparkleHelpers.CombineMore (HomePath, ".config", "sparkleshare");
public static string SparkleInstallPath = SparkleHelpers.CombineMore ("usr", "share",
public static string SparkleInstallPath = SparkleHelpers.CombineMore (Defines.PREFIX,
"sparkleshare", "icons", "hicolor");
public static string SparkleAvatarPath {

View file

@ -37,7 +37,7 @@ namespace SparkleShare {
{
// Use translations
Catalog.Init ("i18n", "locale");
Catalog.Init (Defines.GETTEXT_PACKAGE, Defines.LOCALE_DIR);
// Check if git is installed
Process Process = new Process ();

View file

@ -82,7 +82,7 @@ namespace SparkleShare {
Menu.Add (StatusMenuItem);
Menu.Add (new SeparatorMenuItem ());
Action FolderAction = new Action ("", "SparkleShare");
Gtk.Action FolderAction = new Gtk.Action ("", "SparkleShare");
FolderAction.IconName = "folder-sparkleshare";
FolderAction.IsImportant = true;
FolderAction.Activated += delegate {
@ -100,12 +100,12 @@ namespace SparkleShare {
};
Menu.Add (FolderAction.CreateMenuItem ());
Action [] FolderItems =
new Action [SparkleShare.Repositories.Length];
Gtk.Action [] FolderItems =
new Gtk.Action [SparkleShare.Repositories.Length];
int i = 0;
foreach (SparkleRepo SparkleRepo in SparkleShare.Repositories) {
FolderItems [i] = new Action ("", SparkleRepo.Name);
FolderItems [i] = new Gtk.Action ("", SparkleRepo.Name);
FolderItems [i].IconName = "folder";
FolderItems [i].IsImportant = true;
FolderItems [i].Activated += CreateWindowDelegate (SparkleRepo);

View file

@ -19,7 +19,7 @@ if [[ "$1" == "start" ]]; then
echo -n "Starting SparkleShare..."
mkdir -p /tmp/sparkleshare/
# Start SparkleShare in the background and save the pid
mono /usr/local/share/sparkleshare/SparkleShare.exe $2 &
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 &
PID=$!
echo $PID > /tmp/sparkleshare/sparkleshare.pid
echo " Done."
@ -52,7 +52,7 @@ if [[ "$1" == "restart" ]]; then
echo -n "Starting SparkleShare..."
# Start SparkleShare in the background and save the pid
mono /usr/local/share/sparkleshare/SparkleShare.exe $2 &
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 &
PID=$!
echo $PID > /tmp/sparkleshare/sparkleshare.pid
echo " Done."
@ -60,5 +60,5 @@ if [[ "$1" == "restart" ]]; then
fi
if [[ "$1" == "--help" ]]; then
mono /usr/local/share/sparkleshare/SparkleShare.exe --help
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" --help
fi

85
autogen.sh Executable file
View file

@ -0,0 +1,85 @@
#!/usr/bin/env bash
PROJECT=sparkleshare
function error () {
echo "Error: $1" 1>&2
exit 1
}
function check_autotool_version () {
which $1 &>/dev/null || {
error "$1 is not installed, and is required to configure $PACKAGE"
}
version=$($1 --version | head -n 1 | cut -f4 -d' ')
major=$(echo $version | cut -f1 -d.)
minor=$(echo $version | cut -f2 -d.)
rev=$(echo $version | cut -f3 -d. | sed 's/[^0-9].*$//')
major_check=$(echo $2 | cut -f1 -d.)
minor_check=$(echo $2 | cut -f2 -d.)
rev_check=$(echo $2 | cut -f3 -d.)
if [ $major -lt $major_check ]; then
do_bail=yes
elif [[ $minor -lt $minor_check && $major = $major_check ]]; then
do_bail=yes
elif [[ $rev -lt $rev_check && $minor = $minor_check && $major = $major_check ]]; then
do_bail=yes
fi
if [ x"$do_bail" = x"yes" ]; then
error "$1 version $2 or better is required to configure $PROJECT"
fi
}
function run () {
echo "Running $@ ..."
$@ 2>.autogen.log || {
cat .autogen.log 1>&2
rm .autogen.log
error "Could not run $1, which is required to configure $PROJECT"
}
rm .autogen.log
}
srcdir=$(dirname $0)
test -z "$srcdir" && srcdir=.
(test -f $srcdir/configure.ac) || {
error "Directory \"$srcdir\" does not look like the top-level $PROJECT directory"
}
# MacPorts on OS X only seems to have glibtoolize
WHICHLIBTOOLIZE=$(which libtoolize || which glibtoolize)
if [ x"$WHICHLIBTOOLIZE" == x"" ]; then
error "libtool is required to configure $PROJECT"
fi
LIBTOOLIZE=$(basename $WHICHLIBTOOLIZE)
check_autotool_version aclocal 1.9
check_autotool_version automake 1.9
check_autotool_version autoconf 2.53
check_autotool_version $LIBTOOLIZE 1.4.3
check_autotool_version intltoolize 0.35.0
check_autotool_version pkg-config 0.14.0
run intltoolize --force --copy
run $LIBTOOLIZE --force --copy --automake
run aclocal -I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave $ACLOCAL_FLAGS
run autoconf
run automake --gnu --add-missing --force --copy \
-Wno-portability -Wno-portability
if [ ! -z "$NOCONFIGURE" ]; then
echo "Done. ./configure skipped."
exit $?
fi
if [ $# = 0 ]; then
echo "WARNING: I am going to run configure without any arguments."
fi
run ./configure --enable-maintainer-mode $@

6
build/Makefile.am Normal file
View file

@ -0,0 +1,6 @@
SUBDIRS = m4
EXTRA_DIST = \
icon-theme-installer
MAINTAINERCLEANFILES = Makefile.in

View file

@ -0,0 +1,45 @@
# Initializers
MONO_BASE_PATH =
MONO_ADDINS_PATH =
# Install Paths
DEFAULT_INSTALL_DIR = $(pkglibdir)
## Directories
DIR_DOCS = $(top_builddir)/docs
DIR_ICONS = $(top_builddir)/icons
DIR_NOTIFYSHARP = $(top_builddir)/notify-sharp
DIR_SRC = $(top_builddir)/src
DIR_BIN = $(top_builddir)/bin
# External libraries to link against, generated from configure
LINK_SYSTEM = -r:System
LINK_MONO_POSIX = -r:Mono.Posix
LINK_GLIB = $(GLIBSHARP_LIBS)
LINK_GTK = $(GTKSHARP_LIBS)
LINK_GNOME = $(GNOME_SHARP_LIBS)
LINK_DBUS = $(NDESK_DBUS_LIBS) $(NDESK_DBUS_GLIB_LIBS)
LINK_DBUS_NO_GLIB = $(NDESK_DBUS_LIBS)
REF_NOTIFY_SHARP = $(LINK_SYSTEM) $(LINK_DBUS) $(GTKSHARP_LIBS) $(GLIBSHARP_LIBS)
LINK_NOTIFY_SHARP = -r:$(DIR_BIN)/NotifySharp.dll
LINK_NOTIFY_SHARP_DEPS = $(REF_NOTIFY_SHARP) $(LINK_NOTIFY_SHARP)
REF_SPARKLESHARE = $(LINK_SYSTEM) $(LINK_GTK) $(LINK_DBUS) $(LINK_NOTIFY_SHARP_DEPS) $(LINK_MONO_POSIX)
LINK_SPARKLESHARE = -r:$(DIR_BIN)/SparkleShare.exe
LINK_SPARKLESHARE_DEPS = $(REF_SPARKLESHARE) $(LINK_SPARKLESHARE)
# Cute hack to replace a space with something
colon:= :
empty:=
space:= $(empty) $(empty)
# Build path to allow running uninstalled
RUN_PATH = $(subst $(space),$(colon), $(MONO_BASE_PATH))

3
build/build.mk Normal file
View file

@ -0,0 +1,3 @@
include $(top_srcdir)/build/build.environment.mk
include $(top_srcdir)/build/build.rules.mk

88
build/build.rules.mk Normal file
View file

@ -0,0 +1,88 @@
UNIQUE_FILTER_PIPE = tr [:space:] \\n | sort | uniq
BUILD_DATA_DIR = $(top_builddir)/bin/share/$(PACKAGE)
# Since all other attempts failed, we currently go this way:
# This code adds the file specified in ASSEMBLY_INFO_SOURCE to SOURCES_BUILD.
# If no such file is specified, the default AssemblyInfo.cs is used.
ASSEMBLY_INFO_SOURCE_REAL = \
$(shell if [ "$(ASSEMBLY_INFO_SOURCE)" ]; \
then \
echo "$(addprefix $(srcdir)/, $(ASSEMBLY_INFO_SOURCE))"; \
else \
echo "$(top_srcdir)/SparkleShare/AssemblyInfo.cs"; \
fi)
SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES))
SOURCES_BUILD += $(ASSEMBLY_INFO_SOURCE_REAL)
RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
-resource:$(resource),$(notdir $(resource)))
ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
INSTALL_DIR_RESOLVED = $(firstword $(subst , $(DEFAULT_INSTALL_DIR), $(INSTALL_DIR)))
if ENABLE_TESTS
LINK += " $(NUNIT_LIBS)"
ENABLE_TESTS_FLAG = "-define:ENABLE_TESTS"
endif
if ENABLE_ATK
ENABLE_ATK_FLAG = "-define:ENABLE_ATK"
endif
FILTERED_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE))
DEP_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE) | sed s,-r:,,g | grep '$(top_builddir)/bin/')
OUTPUT_FILES = \
$(ASSEMBLY_FILE) \
$(ASSEMBLY_FILE).mdb
moduledir = $(INSTALL_DIR_RESOLVED)
module_SCRIPTS = $(OUTPUT_FILES)
all: $(ASSEMBLY_FILE)
run:
@pushd $(top_builddir); \
make run; \
popd;
# uncommented for now.
# tests are currently excuted from Makefile in $(top_builddir)
#test:
# @pushd $(top_builddir)/tests; \
# make $(ASSEMBLY); \
# popd;
build-debug:
@echo $(DEP_LINK)
$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE)
$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(DEP_LINK)
@mkdir -p $(top_builddir)/bin
$(MCS) \
$(GMCS_FLAGS) \
$(ASSEMBLY_BUILD_FLAGS) \
-nowarn:0278 -nowarn:0078 $$warn \
-define:HAVE_GTK_2_10 -define:NET_2_0 \
-debug -target:$(TARGET) -out:$@ \
$(BUILD_DEFINES) $(ENABLE_TESTS_FLAG) $(ENABLE_ATK_FLAG) \
$(FILTERED_LINK) $(RESOURCES_BUILD) $(SOURCES_BUILD)
@if [ -e $(srcdir)/$(notdir $@.config) ]; then \
cp $(srcdir)/$(notdir $@.config) $(top_builddir)/bin; \
fi;
@if [ ! -z "$(EXTRA_BUNDLE)" ]; then \
cp $(EXTRA_BUNDLE) $(top_builddir)/bin; \
fi;
EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED)
CLEANFILES = $(OUTPUT_FILES) $(ASSEMBLY_FILE).config
DISTCLEANFILES = *.pidb
MAINTAINERCLEANFILES = Makefile.in

177
build/icon-theme-installer Executable file
View file

@ -0,0 +1,177 @@
#!/usr/bin/env bash
# icon-theme-installer
# Copyright (C) 2006 Novell, Inc.
# Written by Aaron Bockover <abock@gnome.org>
# Licensed under the MIT/X11 license
#
# This script is meant to be invoked from within a Makefile/Makefile.am
# in the install-data-local and uninstall-data sections. It handles the
# task of properly installing icons into the icon theme. It requires a
# few arguments to set up its environment, and a list of files to be
# installed. The format of the file list is critical:
#
# <category>,<local-src-file-name>
#
# apps,music-player-banshee.svg
# apps,music-player-banshee-16.png
# apps,music-player-banshee-22.png
#
# <category> is the icon theme category, for instance, apps, devices,
# actions, emblems...
#
# <local-src-file-name> must have a basename in the form of:
#
# proper-theme-name[-<SIZE>].<EXTENSION>
#
# Where <SIZE> should be either nothing, which will default to scalable
# or \-[0-9]{2}, which will expand to <SIZE>x<SIZE>. For example:
#
# music-player-banshee-16.png
#
# The <SIZE> here is -16 and will expand to 16x16 per the icon theme spec
#
# What follows is an example Makefile.am for icon theme installation:
#
# ---------------
# theme=hicolor
# themedir=$(datadir)/icons/$(theme)
# theme_icons = \
# apps,music-player-banshee.svg \
# apps,music-player-banshee-16.png \
# apps,music-player-banshee-22.png \
# apps,music-player-banshee-24.png \
# apps,music-player-banshee-32.png
#
# install_icon_exec = $(top_srcdir)/build/icon-theme-installer -t $(theme) -s $(srcdir) -d "x$(DESTDIR)" -b $(themedir) -m "$(mkinstalldirs)" -x "$(INSTALL_DATA)"
# install-data-local:
# $(install_icon_exec) -i $(theme_icons)
#
# uninstall-hook:
# $(install_icon_exec) -u $(theme_icons)
#
# MAINTAINERCLEANFILES = Makefile.in
# EXTRA_DIST = $(wildcard *.svg *.png)
# ---------------
#
# Arguments to this program:
#
# -i : Install
# -u : Uninstall
# -t <theme> : Theme name (hicolor)
# -b <dir> : Theme installation dest directory [x$(DESTDIR)] - Always prefix
# this argument with x; it will be stripped but will act as a
# placeholder for zero $DESTDIRs (only set by packagers)
# -d <dir> : Theme installation directory [$(hicolordir)]
# -s <dir> : Source directory [$(srcdir)]
# -m <exec> : Command to exec for directory creation [$(mkinstalldirs)]
# -x <exec> : Command to exec for single file installation [$(INSTALL_DATA)]
# <remainging> : All remainging should be category,filename pairs
while getopts "iut:b:d:s:m:x:" flag; do
case "$flag" in
i) INSTALL=yes ;;
u) UNINSTALL=yes ;;
t) THEME_NAME=$OPTARG ;;
d) INSTALL_DEST_DIR=${OPTARG##x} ;;
b) INSTALL_BASE_DIR=$OPTARG ;;
s) SRC_DIR=$OPTARG ;;
m) MKINSTALLDIRS_EXEC=$OPTARG ;;
x) INSTALL_DATA_EXEC=$OPTARG ;;
esac
done
shift $(($OPTIND - 1))
if test "x$INSTALL" = "xyes" -a "x$UNINSTALL" = "xyes"; then
echo "Cannot pass both -i and -u"
exit 1
elif test "x$INSTALL" = "x" -a "x$UNINSTALL" = "x"; then
echo "Must path either -i or -u"
exit 1
fi
if test -z "$THEME_NAME"; then
echo "Theme name required (-t hicolor)"
exit 1
fi
if test -z "$INSTALL_BASE_DIR"; then
echo "Base theme directory required [-d \$(hicolordir)]"
exit 1
fi
if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
echo "Cannot find '$MKINSTALLDIRS_EXEC'; You probably want to pass -m \$(mkinstalldirs)"
exit 1
fi
if test ! -x $(echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '); then
echo "Cannot find '$INSTALL_DATA_EXEC'; You probably want to pass -x \$(INSTALL_DATA)"
exit 1
fi
if test -z "$SRC_DIR"; then
SRC_DIR=.
fi
for icon in $@; do
size=$(echo $icon | sed s/[^0-9]*//g)
category=$(echo $icon | cut -d, -f1)
build_name=$(echo $icon | cut -d, -f2)
install_name=$(echo $build_name | sed "s/[0-9]//g; s/-\././")
install_name=$(basename $install_name)
if test -z $size; then
size=scalable;
else
size=${size}x${size};
fi
install_dir=${INSTALL_DEST_DIR}${INSTALL_BASE_DIR}/$size/$category
install_path=$install_dir/$install_name
if test "x$INSTALL" = "xyes"; then
echo "Installing $size $install_name into $THEME_NAME icon theme"
$($MKINSTALLDIRS_EXEC $install_dir) || {
echo "Failed to create directory $install_dir"
exit 1
}
$($INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path) || {
echo "Failed to install $SRC_DIR/$build_name into $install_path"
exit 1
}
if test ! -e $install_path; then
echo "Failed to install $SRC_DIR/$build_name into $install_path"
exit 1
fi
else
if test -e $install_path; then
echo "Removing $size $install_name from $THEME_NAME icon theme"
rm $install_path || {
echo "Failed to remove $install_path"
exit 1
}
fi
fi
done
gtk_update_icon_cache_bin="$((which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null)"
gtk_update_icon_cache="$gtk_update_icon_cache_bin -f -t $INSTALL_BASE_DIR"
if test -z "$INSTALL_DEST_DIR"; then
if test -x $gtk_update_icon_cache_bin; then
echo "Updating GTK icon cache"
$gtk_update_icon_cache
else
echo "*** Icon cache not updated. Could not execute $gtk_update_icon_cache_bin"
fi
else
echo "*** Icon cache not updated. After (un)install, run this:"
echo "*** $gtk_update_icon_cache"
fi

7
build/m4/Makefile.am Normal file
View file

@ -0,0 +1,7 @@
EXTRA_DIST = \
$(srcdir)/sparkleshare/*.m4 \
$(srcdir)/shamrock/*.m4 \
$(srcdir)/shave/*.m4
MAINTAINERCLEANFILES = Makefile.in

View file

@ -0,0 +1,50 @@
AC_DEFUN([SHAMROCK_EXPAND_LIBDIR],
[
expanded_libdir=`(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
*) ;;
esac
case $exec_prefix in
NONE) exec_prefix=$prefix ;;
*) ;;
esac
eval echo $libdir
)`
AC_SUBST(expanded_libdir)
])
AC_DEFUN([SHAMROCK_EXPAND_BINDIR],
[
expanded_bindir=`(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
*) ;;
esac
case $exec_prefix in
NONE) exec_prefix=$prefix ;;
*) ;;
esac
eval echo $bindir
)`
AC_SUBST(expanded_bindir)
])
AC_DEFUN([SHAMROCK_EXPAND_DATADIR],
[
case $prefix in
NONE) prefix=$ac_default_prefix ;;
*) ;;
esac
case $exec_prefix in
NONE) exec_prefix=$prefix ;;
*) ;;
esac
expanded_datadir=`(eval echo $datadir)`
expanded_datadir=`(eval echo $expanded_datadir)`
AC_SUBST(expanded_datadir)
])

View file

@ -0,0 +1,6 @@
AC_DEFUN([SHAMROCK_CHECK_GNOME_DOC_UTILS],
[
GNOME_DOC_INIT([$1], HAVE_GNOME_DOC_UTILS=yes, HAVE_GNOME_DOC_UTILS=no)
AM_CONDITIONAL(ENABLE_GNOME_DOCS, test "x$HAVE_GNOME_DOC_UTILS" = "xyes")
])

10
build/m4/shamrock/i18n.m4 Normal file
View file

@ -0,0 +1,10 @@
AC_DEFUN([SHAMROCK_CONFIGURE_I18N],
[
ALL_LINGUAS=`grep -v '^#' $srcdir/po/LINGUAS | $SED ':a;N;$!ba;s/\n/ /g; s/[ ]+/ /g' | xargs`
GETTEXT_PACKAGE=$1
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
AM_GLIB_GNU_GETTEXT
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
])

94
build/m4/shamrock/mono.m4 Normal file
View file

@ -0,0 +1,94 @@
AC_DEFUN([SHAMROCK_FIND_MONO_1_0_COMPILER],
[
SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, mcs)
])
AC_DEFUN([SHAMROCK_FIND_MONO_2_0_COMPILER],
[
SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, gmcs)
])
AC_DEFUN([SHAMROCK_FIND_MONO_4_0_COMPILER],
[
SHAMROCK_FIND_PROGRAM_OR_BAIL(MCS, dmcs)
])
AC_DEFUN([SHAMROCK_FIND_MONO_RUNTIME],
[
SHAMROCK_FIND_PROGRAM_OR_BAIL(MONO, mono)
])
AC_DEFUN([_SHAMROCK_CHECK_MONO_MODULE],
[
PKG_CHECK_MODULES(MONO_MODULE, $1 >= $2)
])
AC_DEFUN([SHAMROCK_CHECK_MONO_MODULE],
[
_SHAMROCK_CHECK_MONO_MODULE(mono, $1)
])
AC_DEFUN([SHAMROCK_CHECK_MONO2_MODULE],
[
_SHAMROCK_CHECK_MONO_MODULE(mono-2, $1)
])
AC_DEFUN([_SHAMROCK_CHECK_MONO_MODULE_NOBAIL],
[
PKG_CHECK_MODULES(MONO_MODULE, $2 >= $1,
HAVE_MONO_MODULE=yes, HAVE_MONO_MODULE=no)
AC_SUBST(HAVE_MONO_MODULE)
])
AC_DEFUN([SHAMROCK_CHECK_MONO_MODULE_NOBAIL],
[
_SHAMROCK_CHECK_MONO_MODULE_NOBAIL(mono, $1)
])
AC_DEFUN([SHAMROCK_CHECK_MONO2_MODULE_NOBAIL],
[
_SHAMROCK_CHECK_MONO_MODULE_NOBAIL(mono-2, $1)
])
AC_DEFUN([_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES],
[
for asm in $(echo "$*" | cut -d, -f3- | sed 's/\,/ /g')
do
AC_MSG_CHECKING([for Mono $2 GAC for $asm.dll])
if test \
-e "$($PKG_CONFIG --variable=libdir $1)/mono/$2/$asm.dll" -o \
-e "$($PKG_CONFIG --variable=prefix $1)/lib/mono/$2/$asm.dll"; \
then \
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
AC_MSG_ERROR([missing required Mono $2 assembly: $asm.dll])
fi
done
])
AC_DEFUN([SHAMROCK_CHECK_MONO_1_0_GAC_ASSEMBLIES],
[
_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono, 1.0, $*)
])
AC_DEFUN([SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES],
[
_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono, 2.0, $*)
])
AC_DEFUN([SHAMROCK_CHECK_MONO2_2_0_GAC_ASSEMBLIES],
[
_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono-2, 2.0, $*)
])
AC_DEFUN([SHAMROCK_CHECK_MONO_4_0_GAC_ASSEMBLIES],
[
_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono, 4.0, $*)
])
AC_DEFUN([SHAMROCK_CHECK_MONO2_4_0_GAC_ASSEMBLIES],
[
_SHAMROCK_CHECK_MONO_GAC_ASSEMBLIES(mono-2, 4.0, $*)
])

View file

@ -0,0 +1,25 @@
AC_DEFUN([SHAMROCK_CHECK_MONODOC],
[
AC_ARG_ENABLE(docs, AC_HELP_STRING([--disable-docs],
[Do not build documentation]), , enable_docs=yes)
if test "x$enable_docs" = "xyes"; then
AC_PATH_PROG(MONODOCER, monodocer, no)
if test "x$MONODOCER" = "xno"; then
AC_MSG_ERROR([You need to install monodoc, or pass --disable-docs to configure to skip documentation installation])
fi
AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
if test "x$MDASSEMBLER" = "xno"; then
AC_MSG_ERROR([You need to install mdassembler, or pass --disable-docs to configure to skip documentation installation])
fi
DOCDIR=`$PKG_CONFIG monodoc --variable=sourcesdir`
AC_SUBST(DOCDIR)
AM_CONDITIONAL(BUILD_DOCS, true)
else
AC_MSG_NOTICE([not building ${PACKAGE} API documentation])
AM_CONDITIONAL(BUILD_DOCS, false)
fi
])

View file

@ -0,0 +1,29 @@
AC_DEFUN([SHAMROCK_CHECK_NUNIT],
[
NUNIT_REQUIRED=2.4.7
AC_ARG_ENABLE(tests, AC_HELP_STRING([--enable-tests], [Enable NUnit tests]),
enable_tests=$enableval, enable_tests="no")
if test "x$enable_tests" = "xno"; then
do_tests=no
AM_CONDITIONAL(ENABLE_TESTS, false)
else
PKG_CHECK_MODULES(NUNIT, nunit >= $NUNIT_REQUIRED,
do_tests="yes", do_tests="no")
AC_SUBST(NUNIT_LIBS)
AM_CONDITIONAL(ENABLE_TESTS, test "x$do_tests" = "xyes")
if test "x$do_tests" = "xno"; then
PKG_CHECK_MODULES(NUNIT, mono-nunit >= 2.4,
do_tests="yes", do_tests="no")
AC_SUBST(NUNIT_LIBS)
AM_CONDITIONAL(ENABLE_TESTS, test "x$do_tests" = "xyes")
if test "x$do_tests" = "xno"; then
AC_MSG_WARN([Could not find nunit: tests will not be available]) fi
fi
fi
])

View file

@ -0,0 +1,15 @@
AC_DEFUN([SHAMROCK_FIND_PROGRAM],
[
AC_PATH_PROG($1, $2, $3)
AC_SUBST($1)
])
AC_DEFUN([SHAMROCK_FIND_PROGRAM_OR_BAIL],
[
SHAMROCK_FIND_PROGRAM($1, $2, no)
if test "x$$1" = "xno"; then
AC_MSG_ERROR([You need to install '$2'])
fi
])

11
build/m4/shamrock/util.m4 Normal file
View file

@ -0,0 +1,11 @@
AC_DEFUN([SHAMROCK_CONCAT],
[
$1="$$1 $$2"
])
AC_DEFUN([SHAMROCK_CONCAT_MODULE],
[
SHAMROCK_CONCAT($1_CFLAGS, $2_CFLAGS)
SHAMROCK_CONCAT($1_LIBS, $2_LIBS)
])

View file

@ -0,0 +1,109 @@
#!/bin/sh
#
# Copyright (c) 2009, Damien Lespiau <damien.lespiau@gmail.com>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# we need sed
SED=@SED@
if test -z "$SED" ; then
SED=sed
fi
lt_unmangle ()
{
last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
}
# the real libtool to use
LIBTOOL="$1"
shift
# if 1, don't print anything, the underlaying wrapper will do it
pass_though=0
# scan the arguments, keep the right ones for libtool, and discover the mode
preserved_args=
# have we seen the --tag option of libtool in the command line ?
tag_seen=0
while test "$#" -gt 0; do
opt="$1"
shift
case $opt in
--mode=*)
mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
preserved_args="$preserved_args $opt"
;;
-o)
lt_output="$1"
preserved_args="$preserved_args $opt"
;;
--tag=*)
tag_seen=1
preserved_args="$preserved_args $opt"
;;
*)
preserved_args="$preserved_args $opt"
;;
esac
done
case "$mode" in
compile)
# shave will be called and print the actual CC/CXX/LINK line
preserved_args="$preserved_args --shave-mode=$mode"
pass_though=1
;;
link)
preserved_args="$preserved_args --shave-mode=$mode"
Q=" LINK "
;;
*)
# let's u
# echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
;;
esac
lt_unmangle "$lt_output"
output=$last_result
# automake does not add a --tag switch to its libtool invocation when
# assembling a .s file and rely on libtool to infer the right action based
# on the compiler name. As shave is using CC to hook a wrapper, libtool gets
# confused. Let's detect these cases and add a --tag=CC option.
tag=""
if test $tag_seen -eq 0 -a x"$mode" = xcompile; then
tag="--tag=CC"
fi
if test -z $V; then
if test $pass_though -eq 0; then
echo "$Q$output"
fi
$LIBTOOL --silent $tag $preserved_args
else
echo $LIBTOOL $tag $preserved_args
$LIBTOOL $tag $preserved_args
fi

109
build/m4/shave/shave.in Normal file
View file

@ -0,0 +1,109 @@
#!/bin/sh
#
# Copyright (c) 2009, Damien Lespiau <damien.lespiau@gmail.com>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# we need sed
SED=@SED@
if test -z "$SED" ; then
SED=sed
fi
lt_unmangle ()
{
last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
}
# the tool to wrap (cc, cxx, ar, ranlib, ..)
tool="$1"
shift
# the reel tool (to call)
REEL_TOOL="$1"
shift
pass_through=0
preserved_args=
while test "$#" -gt 0; do
opt="$1"
shift
case $opt in
--shave-mode=*)
mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
;;
-o)
lt_output="$1"
preserved_args="$preserved_args $opt"
;;
-out:*|/out:*)
lt_output="${opt#*:}"
preserved_args="$preserved_args $opt"
;;
*)
preserved_args="$preserved_args $opt"
;;
esac
done
# mode=link is handled in the libtool wrapper
case "$mode,$tool" in
link,*)
pass_through=1
;;
*,cxx)
Q=" CXX "
;;
*,cc)
Q=" CC "
;;
*,fc)
Q=" FC "
;;
*,f77)
Q=" F77 "
;;
*,objc)
Q=" OBJC "
;;
*,mcs)
Q=" MCS "
;;
*,*)
# should not happen
Q=" CC "
;;
esac
lt_unmangle "$lt_output"
output=$last_result
if test -z $V; then
if test $pass_through -eq 0; then
echo "$Q$output"
fi
$REEL_TOOL $preserved_args
else
echo $REEL_TOOL $preserved_args
$REEL_TOOL $preserved_args
fi

102
build/m4/shave/shave.m4 Normal file
View file

@ -0,0 +1,102 @@
dnl Make automake/libtool output more friendly to humans
dnl
dnl Copyright (c) 2009, Damien Lespiau <damien.lespiau@gmail.com>
dnl
dnl Permission is hereby granted, free of charge, to any person
dnl obtaining a copy of this software and associated documentation
dnl files (the "Software"), to deal in the Software without
dnl restriction, including without limitation the rights to use,
dnl copy, modify, merge, publish, distribute, sublicense, and/or sell
dnl copies of the Software, and to permit persons to whom the
dnl Software is furnished to do so, subject to the following
dnl conditions:
dnl
dnl The above copyright notice and this permission notice shall be
dnl included in all copies or substantial portions of the Software.
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
dnl EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
dnl OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
dnl NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
dnl HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
dnl WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
dnl OTHER DEALINGS IN THE SOFTWARE.
dnl
dnl SHAVE_INIT([shavedir],[default_mode])
dnl
dnl shavedir: the directory where the shave scripts are, it defaults to
dnl $(top_builddir)
dnl default_mode: (enable|disable) default shave mode. This parameter
dnl controls shave's behaviour when no option has been
dnl given to configure. It defaults to disable.
dnl
dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and
dnl LIBTOOL, you don't want the configure tests to have these variables
dnl re-defined.
dnl * This macro requires GNU make's -s option.
AC_DEFUN([_SHAVE_ARG_ENABLE],
[
AC_ARG_ENABLE([shave],
AS_HELP_STRING(
[--enable-shave],
[use shave to make the build pretty [[default=$1]]]),,
[enable_shave=$1]
)
])
AC_DEFUN([SHAVE_INIT],
[
dnl you can tweak the default value of enable_shave
m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
if test x"$enable_shave" = xyes; then
dnl where can we find the shave scripts?
m4_if([$1],,
[shavedir="$ac_pwd"],
[shavedir="$ac_pwd/$1"])
AC_SUBST(shavedir)
dnl make is now quiet
AC_SUBST([MAKEFLAGS], [-s])
AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
dnl we need sed
AC_CHECK_PROG(SED,sed,sed,false)
dnl substitute libtool
SHAVE_SAVED_LIBTOOL=$LIBTOOL
LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
AC_SUBST(LIBTOOL)
dnl substitute cc/cxx
SHAVE_SAVED_CC=$CC
SHAVE_SAVED_CXX=$CXX
SHAVE_SAVED_FC=$FC
SHAVE_SAVED_F77=$F77
SHAVE_SAVED_OBJC=$OBJC
SHAVE_SAVED_MCS=$MCS
CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"
MCS="${SHELL} ${shavedir}/shave mcs ${SHAVE_SAVED_MCS}"
AC_SUBST(CC)
AC_SUBST(CXX)
AC_SUBST(FC)
AC_SUBST(F77)
AC_SUBST(OBJC)
AC_SUBST(MCS)
V=@
else
V=1
fi
Q='$(V:1=)'
AC_SUBST(V)
AC_SUBST(Q)
])

View file

@ -0,0 +1,23 @@
AC_DEFUN([SPARKLESHARE_CHECK_GTK_SHARP],
[
GTKSHARP_REQUIRED=2.12.2
PKG_CHECK_MODULES(GTKSHARP,
gtk-sharp-2.0 >= $GTKSHARP_REQUIRED)
AC_SUBST(GTKSHARP_LIBS)
PKG_CHECK_MODULES(GLIBSHARP,
glib-sharp-2.0 >= $GTKSHARP_REQUIRED)
AC_SUBST(GLIBSHARP_LIBS)
PKG_CHECK_MODULES(GLIBSHARP_2_12_7,
glib-sharp-2.0 >= 2.12.7,
HAVE_GLIBSHARP_2_12_7=yes,
HAVE_GLIBSHARP_2_12_7=no)
AM_CONDITIONAL(HAVE_GLIBSHARP_2_12_7, [test "$HAVE_GLIBSHARP_2_12_7" = "yes"])
PKG_CHECK_MODULES(GTKSHARP_A11Y, gtk-sharp-2.0 >= 2.12.10, gtksharp_with_a11y=yes, gtksharp_with_a11y=no)
AM_CONDITIONAL(ENABLE_ATK, test "x$gtksharp_with_a11y" = "xyes")
])

View file

@ -0,0 +1,12 @@
AC_DEFUN([FSPOT_CHECK_MONO_ADDINS],
[
PKG_CHECK_MODULES(MONO_ADDINS, mono-addins >= 0.3.1)
AC_SUBST(MONO_ADDINS_LIBS)
PKG_CHECK_MODULES(MONO_ADDINS_SETUP, mono-addins-setup >= 0.3.1)
AC_SUBST(MONO_ADDINS_SETUP_LIBS)
PKG_CHECK_MODULES(MONO_ADDINS_GUI, mono-addins-gui >= 0.3.1)
AC_SUBST(MONO_ADDINS_GUI_LIBS)
])

View file

@ -0,0 +1,12 @@
AC_DEFUN([SPARKLESHARE_CHECK_NOTIFY_SHARP],
[
PKG_CHECK_MODULES(NOTIFY_SHARP, notify-sharp, have_notify_sharp=yes, have_notify_sharp=no)
if test "x$have_notify_sharp" = "xyes"; then
AC_SUBST(NOTIFY_SHARP_LIBS)
AM_CONDITIONAL(EXTERNAL_NOTIFY_SHARP, true)
else
AM_CONDITIONAL(EXTERNAL_NOTIFY_SHARP, false)
AC_MSG_RESULT([no])
fi
])

96
configure.ac Normal file
View file

@ -0,0 +1,96 @@
dnl Warning: This is an automatically generated file, do not edit!
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.54])
AC_INIT([SparkleShare], [0.1])
AM_INIT_AUTOMAKE([1.11 dist-bzip2 dist-zip foreign])
AM_MAINTAINER_MODE
dnl pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
AC_SUBST([ACLOCAL_AMFLAGS], ["-I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave \${ACLOCAL_FLAGS}"])
dnl i18n
IT_PROG_INTLTOOL([0.40.6])
GETTEXT_PACKAGE=sparkleshare
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
SHAMROCK_EXPAND_LIBDIR
SHAMROCK_EXPAND_BINDIR
SHAMROCK_EXPAND_DATADIR
AC_PROG_INSTALL
AC_PATH_PROG(GMCS, gmcs, no)
if test "x$GMCS" = "xno"; then
AC_MSG_ERROR([gmcs Not found])
fi
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],
[Use 'DEBUG' Configuration [default=YES]]),
enable_debug=yes, enable_debug=no)
AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes)
if test "x$enable_debug" = "xyes" ; then
CONFIG_REQUESTED="yes"
fi
AC_ARG_ENABLE(release,
AC_HELP_STRING([--enable-release],
[Use 'RELEASE' Configuration [default=NO]]),
enable_release=yes, enable_release=no)
AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes)
if test "x$enable_release" = "xyes" ; then
CONFIG_REQUESTED="yes"
fi
if test -z "$CONFIG_REQUESTED" ; then
AM_CONDITIONAL(ENABLE_DEBUG, true)
enable_debug=yes
fi
dnl package checks, common for all configs
PKG_CHECK_MODULES([NDESK_DBUS], [ndesk-dbus-1.0])
AC_SUBST(NDESK_DBUS_LIBS)
PKG_CHECK_MODULES([NDESK_DBUS_GLIB], [ndesk-dbus-glib-1.0])
AC_SUBST(NDESK_DBUS_GLIB_LIBS)
SPARKLESHARE_CHECK_GTK_SHARP
#SPARKLESHARE_CHECK_NOTIFY_SHARP
SHAMROCK_CHECK_NUNIT
dnl Mono and gmcs
SHAMROCK_CHECK_MONO_MODULE(2.2)
SHAMROCK_FIND_MONO_2_0_COMPILER
SHAMROCK_FIND_MONO_RUNTIME
SHAMROCK_CHECK_MONO_2_0_GAC_ASSEMBLIES([
System
System.Security
Mono.Posix
])
SHAVE_INIT([build/m4/shave], [enable])
AC_OUTPUT([
build/Makefile
build/m4/Makefile
build/m4/shave/shave
build/m4/shave/shave-libtool
data/Makefile
data/icons/Makefile
notify-sharp/Makefile
SparkleShare/sparkleshare
SparkleShare/Defines.cs
SparkleShare/AssemblyInfo.cs
SparkleShare/Makefile
po/Makefile.in
Makefile
])

9
data/Makefile.am Normal file
View file

@ -0,0 +1,9 @@
SUBDIRS = \
icons
EXTRA_DIST = \
sparkleshare.svg
MAINTAINERCLEANFILES = \
Makefile.in

61
data/icons/Makefile.am Normal file
View file

@ -0,0 +1,61 @@
theme = hicolor
themedir = $(pkgdatadir)/icons/$(theme)
hicolordir = $(DESTDIR)$(datadir)/icons/hicolor
theme_icons = \
animations,process-syncing-sparkleshare-24.png \
animations,process-working-48.png \
emblems,emblem-synced-22.png \
emblems,emblem-synced-24.png \
emblems,emblem-sync-error-22.png \
emblems,emblem-sync-error-24.png \
emblems,emblem-syncing-22.png \
emblems,emblem-syncing-24.png \
places,fedorahosted-16.png \
places,folder-16.png \
places,folder-22.png \
places,folder-24.png \
places,folder-256.png \
places,folder-32.png \
places,folder-48.png \
places,folder-sparkleshare-16.png \
places,folder-sparkleshare-22.png \
places,folder-sparkleshare-24.png \
places,folder-sparkleshare-256.png \
places,folder-sparkleshare-32.png \
places,folder-sparkleshare-48.png \
places,github-16.png \
places,gitorious-16.png \
places,gnome-16.png \
status,avatar-default-16.png \
status,avatar-default-22.png \
status,avatar-default-24.png \
status,avatar-default-32.png \
status,avatar-default-48.png \
status,document-added-16.png \
status,document-edited-16.png \
status,document-moved-16.png \
status,document-removed-16.png \
status,folder-synced-22.png \
status,folder-synced-24.png \
status,folder-sync-error-22.png \
status,folder-sync-error-24.png \
status,folder-syncing-22.png \
status,folder-syncing-24.png
install_icon_exec = $(top_srcdir)/icon-theme-installer \
-t "$(theme)" \
-s "$(srcdir)" \
-d "x$(DESTDIR)" \
-b "$(themedir)" \
-m "$(mkinstalldirs)" \
-x "$(INSTALL_DATA)"
install-data-local:
@-$(install_icon_exec) -i $(theme_icons)
uninstall-hook:
@-$(install_icon_exec) -u $(theme_icons)
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = $(wildcard *.png *.svg)

View file

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 846 B

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 487 B

View file

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 610 B

View file

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 589 B

View file

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 747 B

After

Width:  |  Height:  |  Size: 747 B

View file

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 658 B

View file

Before

Width:  |  Height:  |  Size: 873 B

After

Width:  |  Height:  |  Size: 873 B

View file

Before

Width:  |  Height:  |  Size: 920 B

After

Width:  |  Height:  |  Size: 920 B

View file

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View file

Before

Width:  |  Height:  |  Size: 1,004 B

After

Width:  |  Height:  |  Size: 1,004 B

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

View file

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 440 B

View file

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 387 B

View file

Before

Width:  |  Height:  |  Size: 650 B

After

Width:  |  Height:  |  Size: 650 B

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

179
icon-theme-installer Executable file
View file

@ -0,0 +1,179 @@
#!/bin/bash
# icon-theme-installer
# Copyright (C) 2006 Novell, Inc.
# Written by Aaron Bockover <abock@gnome.org>
# Licensed under the MIT/X11 license
#
# This script is meant to be invoked from within a Makefile/Makefile.am
# in the install-data-local and uninstall-data sections. It handles the
# task of properly installing icons into the icon theme. It requires a
# few arguments to set up its environment, and a list of files to be
# installed. The format of the file list is critical:
#
# <category>,<local-src-file-name>
#
# apps,music-player-banshee.svg
# apps,music-player-banshee-16.png
# apps,music-player-banshee-22.png
#
# <category> is the icon theme category, for instance, apps, devices,
# actions, emblems...
#
# <local-src-file-name> must have a basename in the form of:
#
# proper-theme-name[-<SIZE>].<EXTENSION>
#
# Where <SIZE> should be either nothing, which will default to scalable
# or \-[0-9]{2}, which will expand to <SIZE>x<SIZE>. For example:
#
# music-player-banshee-16.png
#
# The <SIZE> here is -16 and will expand to 16x16 per the icon theme spec
#
# What follows is an example Makefile.am for icon theme installation:
#
# ---------------
# theme=hicolor
# themedir=$(datadir)/icons/$(theme)
# theme_icons = \
# apps,music-player-banshee.svg \
# apps,music-player-banshee-16.png \
# apps,music-player-banshee-22.png \
# apps,music-player-banshee-24.png \
# apps,music-player-banshee-32.png
#
# install_icon_exec = $(top_srcdir)/build/icon-theme-installer -t $(theme) -s $(srcdir) -d "x$(DESTDIR)" -b $(themedir) -m "$(mkinstalldirs)" -x "$(INSTALL_DATA)"
# install-data-local:
# $(install_icon_exec) -i $(theme_icons)
#
# uninstall-hook:
# $(install_icon_exec) -u $(theme_icons)
#
# MAINTAINERCLEANFILES = Makefile.in
# EXTRA_DIST = $(wildcard *.svg *.png)
# ---------------
#
# Arguments to this program:
#
# -i : Install
# -u : Uninstall
# -t <theme> : Theme name (hicolor)
# -b <dir> : Theme installation dest directory [x$(DESTDIR)] - Always prefix
# this argument with x; it will be stripped but will act as a
# placeholder for zero $DESTDIRs (only set by packagers)
# -d <dir> : Theme installation directory [$(hicolordir)]
# -s <dir> : Source directory [$(srcdir)]
# -m <exec> : Command to exec for directory creation [$(mkinstalldirs)]
# -x <exec> : Command to exec for single file installation [$(INSTALL_DATA)]
# <remainging> : All remainging should be category,filename pairs
while getopts "iut:b:d:s:m:x:" flag; do
case "$flag" in
i) INSTALL=yes ;;
u) UNINSTALL=yes ;;
t) THEME_NAME=$OPTARG ;;
d) INSTALL_DEST_DIR=${OPTARG##x} ;;
b) INSTALL_BASE_DIR=$OPTARG ;;
s) SRC_DIR=$OPTARG ;;
m) MKINSTALLDIRS_EXEC=$OPTARG ;;
x) INSTALL_DATA_EXEC=$OPTARG ;;
esac
done
shift $(($OPTIND - 1))
if test "x$INSTALL" = "xyes" -a "x$UNINSTALL" = "xyes"; then
echo "Cannot pass both -i and -u"
exit 1
elif test "x$INSTALL" = "x" -a "x$UNINSTALL" = "x"; then
echo "Must path either -i or -u"
exit 1
fi
if test -z "$THEME_NAME"; then
echo "Theme name required (-t hicolor)"
exit 1
fi
if test -z "$INSTALL_BASE_DIR"; then
echo "Base theme directory required [-d \$(hicolordir)]"
exit 1
fi
if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
echo "Cannot find '$MKINSTALLDIRS_EXEC'; You probably want to pass -m \$(mkinstalldirs)"
exit 1
fi
if test ! -x $(echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '); then
echo "Cannot find '$INSTALL_DATA_EXEC'; You probably want to pass -x \$(INSTALL_DATA)"
exit 1
fi
if test -z "$SRC_DIR"; then
SRC_DIR=.
fi
for icon in $@; do
size=$(echo $icon | sed s/[^0-9]*//g)
category=$(echo $icon | cut -d, -f1)
build_name=$(echo $icon | cut -d, -f2)
install_name=$(echo $build_name | sed "s/[0-9]//g; s/-\././")
install_name=$(basename $install_name)
if test -z $size; then
size=scalable;
else
size=${size}x${size};
fi
install_dir=${INSTALL_DEST_DIR}${INSTALL_BASE_DIR}/$size/$category
install_path=$install_dir/$install_name
if test "x$INSTALL" = "xyes"; then
echo "Installing $size $install_name into $THEME_NAME icon theme"
$($MKINSTALLDIRS_EXEC $install_dir) || {
echo "Failed to create directory $install_dir"
exit 1
}
$($INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path) || {
echo "Failed to install $SRC_DIR/$build_name into $install_path"
exit 1
}
if test ! -e $install_path; then
echo "Failed to install $SRC_DIR/$build_name into $install_path"
exit 1
fi
else
if test -e $install_path; then
echo "Removing $size $install_name from $THEME_NAME icon theme"
rm $install_path || {
echo "Failed to remove $install_path"
exit 1
}
fi
fi
done
if test "x$INSTALL" = "xyes"; then
gtk_update_icon_cache_bin="$((which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null)"
gtk_update_icon_cache="$gtk_update_icon_cache_bin -f -t $INSTALL_BASE_DIR"
if test -z "$INSTALL_DEST_DIR"; then
if test -x $gtk_update_icon_cache_bin; then
echo "Updating GTK icon cache"
$gtk_update_icon_cache
else
echo "*** Icon cache not updated. Could not execute $gtk_update_icon_cache_bin"
fi
else
echo "*** Icon cache not updated. After install, run this:"
echo "*** $gtk_update_icon_cache"
fi
fi

13
notify-sharp/Makefile.am Normal file
View file

@ -0,0 +1,13 @@
ASSEMBLY = NotifySharp
TARGET = library
LINK = $(REF_NOTIFY_SHARP)
SOURCES = \
Global.cs \
Notification.cs
RESOURCES =
include $(top_srcdir)/build/build.mk

4
po/LINGUAS Normal file
View file

@ -0,0 +1,4 @@
es
nl
pl

15
po/POTFILES.in Normal file
View file

@ -0,0 +1,15 @@
# List of source files containing translatable strings.
# Please keep this file in alphabetical order; run ./sort-potfiles
# after adding files here.
[encoding: UTF-8]
SparkleShare/SparkleBubble.cs
SparkleShare/SparkleDialog.cs
SparkleShare/SparkleHelpers.cs
SparkleShare/SparklePaths.cs
SparkleShare/SparklePlatform.cs
SparkleShare/SparkleRepo.cs
SparkleShare/SparkleShare.cs
SparkleShare/SparkleSpinner.cs
SparkleShare/SparkleStatusIcon.cs
SparkleShare/SparkleUI.cs
SparkleShare/SparkleWindow.cs

6
po/sort-potfiles Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
head -n 4 < POTFILES.in > POTFILES.in.tmp
grep -v "^[\\[#]" < POTFILES.in | sort >> POTFILES.in.tmp
mv POTFILES.in.tmp POTFILES.in