[postr] Added autotools infrastructure
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [postr] Added autotools infrastructure
- Date: Sun, 5 Dec 2010 09:51:07 +0000 (UTC)
commit b491af0383c8b2e677e8c995adbed98ff50eb398
Author: Germán Póo-Caamaño <gpoo gnome org>
Date: Sun Dec 5 01:50:06 2010 -0800
Added autotools infrastructure
First attempt to use autotools with postr. The python scripts
have not been updated in order to look the proper directories.
So, you can use autogen.sh/configure, make (install, distcheck,
etc.), everything will look fine but postr will not work in the
installed directory :-)
You still can use setup.py or run the uninstalled postr.
Signed-off-by: Germán Póo-Caamaño <gpoo gnome org>
Makefile.am | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++++
autogen.sh | 39 ++++++++++++++
configure.ac | 50 +++++++++++++++++
data/postr.desktop | 10 ----
4 files changed, 238 insertions(+), 10 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..4c39546
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,149 @@
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
+SUBDIRS = help po
+
+bin_SCRIPTS = postr
+
+uidir = $(datadir)/postr
+ui_DATA = src/postr.glade
+
+postrdir = $(pythondir)/postr
+
+postr_PYTHON = \
+ src/AboutDialog.py \
+ src/AuthenticationDialog.py \
+ src/ContentTypeCombo.py \
+ src/DummyUnique.py \
+ src/EXIF.py \
+ src/ErrorDialog.py \
+ src/GroupSelector.py \
+ src/ImageList.py \
+ src/ImageStore.py \
+ src/LicenseCombo.py \
+ src/PrivacyCombo.py \
+ src/ProgressDialog.py \
+ src/PyUnique.py \
+ src/SafetyCombo.py \
+ src/SetCombo.py \
+ src/StatusBar.py \
+ src/TagsEntry.py \
+ src/__init__.py \
+ src/flickrest.py \
+ src/iptcinfo.py \
+ src/postr.py \
+ src/proxyclient.py \
+ src/util.py \
+ src/version.py
+
+# Nautilus extension
+postrnautilusdir = $(nautilusextensiondir)/
+postrnautilus_PYTHON = nautilus/postrExtension.py
+
+# icons
+iconthemedir = $(datadir)/icons/hicolor
+appicon16dir = $(iconthemedir)/16x16/apps
+appicon22dir = $(iconthemedir)/22x22/apps
+appicon24dir = $(iconthemedir)/24x24/apps
+appicon32dir = $(iconthemedir)/32x32/apps
+appiconscdir = $(iconthemedir)/scalable/apps
+
+dist_appicon16_DATA = data/16x16/postr.png
+dist_appicon22_DATA = data/22x22/postr.png
+dist_appicon24_DATA = data/24x24/postr.png
+dist_appicon32_DATA = data/32x32/postr.png
+dist_appiconsc_DATA = data/scalable/postr.svg
+
+noinst_icons = data/16x16/postr.svg \
+ data/22x22/postr.svg \
+ data/32x32/postr.svg
+
+dist_noinst_DATA = $(noinst_icons)
+
+# desktop file & translation
+ INTLTOOL_DESKTOP_RULE@
+desktopdir = $(datadir)/applications
+desktop_in_in_files = data/postr.desktop.in.in
+desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+
+DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
+
+dist_noinst_SCRIPTS = autogen.sh
+
+EXTRA_DIST = \
+ $(bin_SCRIPTS) \
+ $(ui_DATA) \
+ $(desktop_in_in_files) \
+ gnome-doc-utils.make
+
+CLEANFILES = $(desktop_DATA)
+
+DISTCLEANFILES = \
+ $(desktop_in_files) \
+ intltool-extract \
+ intltool-merge \
+ intltool-update \
+ $(srcdir)/po/Rules-quot \
+ $(srcdir)/po/Makevars.template \
+ $(srcdir)/po/*.sin \
+ $(srcdir)/po/*.sed \
+ $(srcdir)/po/en * header \
+ ChangeLog
+
+# MAINTAINERCLEANFILES is ad-hoc and it does not follow the
+# heuristic recommended in the documentation. It is used to
+# clean as much as possible the directory to leave as close
+# to the repository. So, you are warned if you would like
+# to use it as template for your own Makefile's rules.
+MAINTAINERCLEANFILES = \
+ $(dist_docutils) $(dist_intltool) \
+ $(srcdir)/ABOUT-NLS \
+ $(srcdir)/INSTALL \
+ $(srcdir)/gnome-doc-utils.make \
+ $(srcdir)/Makefile.in \
+ $(srcdir)/aclocal.m4 \
+ $(srcdir)/config.h.in \
+ $(srcdir)/install-sh \
+ $(srcdir)/missing \
+ $(srcdir)/mkinstalldirs \
+ $(srcdir)/py-compile \
+ $(srcdir)/config.rpath \
+ $(srcdir)/config.sub \
+ $(srcdir)/config.rpath \
+ $(srcdir)/config.guess \
+ $(srcdir)/configure
+
+maintainer-clean-local: maintainer-clean-local-check
+# We are tough! (or just stupid)
+maintainer-clean-local-check:
+ rm -rf m4
+ rm -f po/Makefile.*~
+
+ChangeLog:
+ @echo Creating $@
+ @if test -d "$(srcdir)/.git"; then \
+ (GIT_DIR=$(top_srcdir)/.git ./missing --run git log --stat -M -C --name-status --date=short --no-color) | fmt --split-only > $ tmp \
+ && mv -f $ tmp $@ \
+ || ($(RM) $ tmp; \
+ echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+ (test -f $@ || echo git-log is required to generate this file >> $@)); \
+ else \
+ test -f $@ || \
+ (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+ echo A git checkout and git-log is required to generate this file >> $@); \
+ fi
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+update-icon-cache:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache); \
+ else \
+ echo "*** Icon cache not updated. After (un)install, run this:"; \
+ echo "*** $(gtk_update_icon_cache)"; \
+ fi
+
+.PHONY: ChangeLog maintainer-clean-local-check
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..9722696
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+PKG_NAME="postr"
+ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
+
+(test -f $srcdir/configure.ac \
+ && test -f $srcdir/autogen.sh) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level $PKG_NAME directory"
+ exit 1
+}
+
+DIE=0
+
+gnome_autogen=
+gnome_datadir=
+
+ifs_save="$IFS"; IFS=":"
+for dir in $PATH ; do
+ test -z "$dir" && dir=.
+ if test -f $dir/gnome-autogen.sh ; then
+ gnome_autogen="$dir/gnome-autogen.sh"
+ gnome_datadir=`echo $dir | sed -e 's,/bin$,/share,'`
+ break
+ fi
+done
+IFS="$ifs_save"
+
+if test -z "$gnome_autogen" ; then
+ echo "You need to install the gnome-common module and make"
+ echo "sure the gnome-autogen.sh script is in your \$PATH."
+ exit 1
+fi
+
+GNOME_DATADIR="$gnome_datadir" USE_GNOME2_MACROS=1 . $gnome_autogen
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..0db9902
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,50 @@
+AC_PREREQ([2.67])
+
+AC_INIT([Postr],[0.12.90],[https://bugzilla.gnome.org/browse.cgi?product=postr],[postr],[http://projects.gnome.org/postr/])
+AC_CONFIG_SRCDIR([src/postr.py])
+AM_INIT_AUTOMAKE([1.11.1])
+
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_PATH_PYTHON
+PKG_CHECK_MODULES(POSTR,
+ pygtk-2.0
+ nautilus-python >= 0.6.1)
+
+AC_ARG_WITH(nautilus-extension-dir,
+ [AS_HELP_STRING([--with-nautilus-extension-dir],
+ [specify the nautilus extension directory])])
+
+AC_MSG_CHECKING([for nautilus extension directory])
+if test -n "$with_nautilus_extension_dir"; then
+ NAUTILUS_EXTENSION_DIR=$with_nautilus_extension_dir
+else
+dnl nautilus-python provides the pythondir variable, however its
+dnl path is absolute and the prefix can not be overrided (aarrgh!).
+dnl So, we have to use a workaround.
+ test "x$prefix" != "xNONE" && NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=pythondir nautilus-python | sed -n -e 's,/$,,' -e '/.*\/lib\/nautilus\/.*\/python$/{s,.*/\(lib/nautilus/.*/python\)$,\1,;p;q;}'`
+ NAUTILUS_EXTENSION_DIR=[$prefix/$NAUTILUS_EXTENSION_DIR]
+fi
+AC_SUBST([nautilusextensiondir], [$NAUTILUS_EXTENSION_DIR])
+
+dnl i10n support / gettext
+IT_PROG_INTLTOOL([0.40.0])
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.17])
+GETTEXT_PACKAGE="postr"
+AC_SUBST([GETTEXT_PACKAGE])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Gettext package])
+
+GNOME_DOC_INIT
+
+AC_CONFIG_FILES([
+Makefile
+po/Makefile.in
+data/postr.desktop.in
+help/Makefile
+])
+AC_OUTPUT
+
+echo $PACKAGE......... : $VERSION
+echo Prefix........... : $prefix
+echo Nautilus Python.. : $nautilusextensiondir
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]