[caribou] Added automake
- From: Eitan Isaacson <eitani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou] Added automake
- Date: Tue, 4 May 2010 06:25:37 +0000 (UTC)
commit ee151fca17e12d31fb2baf75c6441b1e5e219f8d
Author: Eitan Isaacson <eitan monotonous org>
Date: Mon May 3 23:12:51 2010 -0700
Added automake
AUTHORS | 2 +
ChangeLog | 1 +
Makefile.am | 1 +
src/caribou/__init__.py => NEWS | 0
autogen.sh | 7 ++++++
bin/Makefile.am | 6 +++++
src/caribou.py => bin/caribou.in | 23 ++++++++++++++++++++-
caribou/Makefile.am | 12 +++++++++++
{src/caribou => caribou}/__init__.py | 0
{src/caribou => caribou}/animation.py | 0
{src/caribou => caribou}/caribou-prefs.ui | 0
{src/caribou => caribou}/keyboard.py | 0
{src/caribou => caribou}/keyboards/__init__.py | 0
{src/caribou => caribou}/keyboards/keysyms.py | 0
{src/caribou => caribou}/keyboards/qwerty.py | 0
{src/caribou => caribou}/keyboards/qwerty_es.py | 0
{src/caribou => caribou}/keyboards/qwerty_sv.py | 0
{src/caribou => caribou}/main.py | 0
{src/caribou => caribou}/opacity.py | 0
{src/caribou => caribou}/window.py | 0
configure.ac | 24 +++++++++++++++++++++++
21 files changed, 74 insertions(+), 2 deletions(-)
---
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..c376263
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,2 @@
+Ben Konrath <ben bagu org>
+Eitan Isaacson <eitan monotonous org>
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..8ba3ad0
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1 @@
+git log
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..5f5605c
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = caribou bin
diff --git a/src/caribou/__init__.py b/NEWS
similarity index 100%
copy from src/caribou/__init__.py
copy to NEWS
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..74df883
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,7 @@
+# Calls gnome-autogen to build Makefiles and run configure
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+REQUIRED_AUTOMAKE_VERSION=1.7.2
+USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100644
index 0000000..cae01c9
--- /dev/null
+++ b/bin/Makefile.am
@@ -0,0 +1,6 @@
+bin_SCRIPTS = caribou
+
+CLEANFILES = $(bin_SCRIPTS)
+
+all: $(bin_SCRIPTS)
+ @chmod +x $(bin_SCRIPTS)
diff --git a/src/caribou.py b/bin/caribou.in
old mode 100755
new mode 100644
similarity index 69%
rename from src/caribou.py
rename to bin/caribou.in
index e0d68ce..89f9d4b
--- a/src/caribou.py
+++ b/bin/caribou.in
@@ -26,8 +26,26 @@
from optparse import OptionParser
import gettext
-import gtk
import sys
+import gtk
+import os
+
+# We can't rely on prefix if we're installed by relocated RPM. Instead, we
+# use __file__ and for now hope that lib is relative to bin.
+sys.prefix = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
+libs = os.path.join(sys.prefix, 'lib',
+ 'python PYTHON_VERSION@', 'site-packages')
+# point to the proper site-packages path
+sys.path.insert(1, libs)
+
+# This might be run from the build dir.
+_dirname = os.path.dirname(__file__)
+if os.path.dirname(__file__) != "@prefix@/bin":
+ srcdir = os.path.normpath(os.path.join(_dirname, '..'))
+ sys.path.insert(1, srcdir)
+ import caribou
+else:
+ import caribou
import caribou.window as window
import caribou.keyboard as keyboard
@@ -36,7 +54,8 @@ import caribou.main as main
_ = gettext.gettext
if __name__ == "__main__":
- parser = OptionParser(usage="usage: %prog [options]", version="%prog 0.0.2")
+ parser = OptionParser(usage="usage: %prog [options]",
+ version="%prog @VERSION@")
parser.add_option("-d", "--debug",
action="store_true", dest="debug", default=False,
help="print debug messages on stdout")
diff --git a/caribou/Makefile.am b/caribou/Makefile.am
new file mode 100644
index 0000000..1a42dad
--- /dev/null
+++ b/caribou/Makefile.am
@@ -0,0 +1,12 @@
+cariboudir = $(pkgpythondir)/
+
+caribou_PYTHON = \
+ animation.py \
+ __init__.py \
+ keyboard.py \
+ main.py \
+ opacity.py \
+ window.py
+
+clean-local:
+ rm -rf *.pyc *.pyo
diff --git a/src/caribou/__init__.py b/caribou/__init__.py
similarity index 100%
rename from src/caribou/__init__.py
rename to caribou/__init__.py
diff --git a/src/caribou/animation.py b/caribou/animation.py
similarity index 100%
rename from src/caribou/animation.py
rename to caribou/animation.py
diff --git a/src/caribou/caribou-prefs.ui b/caribou/caribou-prefs.ui
similarity index 100%
rename from src/caribou/caribou-prefs.ui
rename to caribou/caribou-prefs.ui
diff --git a/src/caribou/keyboard.py b/caribou/keyboard.py
similarity index 100%
rename from src/caribou/keyboard.py
rename to caribou/keyboard.py
diff --git a/src/caribou/keyboards/__init__.py b/caribou/keyboards/__init__.py
similarity index 100%
rename from src/caribou/keyboards/__init__.py
rename to caribou/keyboards/__init__.py
diff --git a/src/caribou/keyboards/keysyms.py b/caribou/keyboards/keysyms.py
similarity index 100%
rename from src/caribou/keyboards/keysyms.py
rename to caribou/keyboards/keysyms.py
diff --git a/src/caribou/keyboards/qwerty.py b/caribou/keyboards/qwerty.py
similarity index 100%
rename from src/caribou/keyboards/qwerty.py
rename to caribou/keyboards/qwerty.py
diff --git a/src/caribou/keyboards/qwerty_es.py b/caribou/keyboards/qwerty_es.py
similarity index 100%
rename from src/caribou/keyboards/qwerty_es.py
rename to caribou/keyboards/qwerty_es.py
diff --git a/src/caribou/keyboards/qwerty_sv.py b/caribou/keyboards/qwerty_sv.py
similarity index 100%
rename from src/caribou/keyboards/qwerty_sv.py
rename to caribou/keyboards/qwerty_sv.py
diff --git a/src/caribou/main.py b/caribou/main.py
similarity index 100%
rename from src/caribou/main.py
rename to caribou/main.py
diff --git a/src/caribou/opacity.py b/caribou/opacity.py
similarity index 100%
rename from src/caribou/opacity.py
rename to caribou/opacity.py
diff --git a/src/caribou/window.py b/caribou/window.py
similarity index 100%
rename from src/caribou/window.py
rename to caribou/window.py
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..1b4639b
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,24 @@
+AC_INIT(caribou, 0.1.0, eitan monotonous org)
+AM_INIT_AUTOMAKE
+AM_MAINTAINER_MODE
+GNOME_DOC_INIT
+
+dnl == check for python ==
+AM_PATH_PYTHON(2.4)
+
+dnl == i18n ==
+#GETTEXT_PACKAGE=caribou
+#AC_SUBST(GETTEXT_PACKAGE)
+#AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package])
+#AM_GLIB_GNU_GETTEXT
+
+dnl == intltool check ==
+#IT_PROG_INTLTOOL([0.35.0])
+
+dnl == generate makefiles ==
+AC_OUTPUT([
+Makefile
+caribou/Makefile
+bin/Makefile
+bin/caribou
+])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]