[libgames-support] Rename the library and reorganize the repository



commit 878af02292e3f6b09acc25e14a9009a1bfaad136
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Feb 22 10:25:33 2015 -0600

    Rename the library and reorganize the repository
    
    Notably, switch to nonrecursive automake, because I don't know how to
    make Vala produce a single header and vapi otherwise.

 Makefile.am                                     |   76 +++++++++++++++++++++--
 autogen.sh                                      |   23 +++----
 src/config.vapi => config.vapi                  |    0
 configure.ac                                    |   15 ++---
 libgames-scores.pc.in => libgames-support.pc.in |    6 +-
 {src => scores}/Makefile.am                     |    0
 {src => scores}/category.vala                   |    0
 {src => scores}/context.vala                    |    0
 {src => scores}/dialog.vala                     |    0
 {src => scores}/score.vala                      |    0
 {src => scores}/test-scores.vala                |    0
 11 files changed, 90 insertions(+), 30 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index f19cc6b..91bbd01 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,21 +1,85 @@
-SUBDIRS = src po
+SUBDIRS = po
 
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
 pkgconfigdir = $(libdir)/pkgconfig
 
-pkgconfig_DATA = libgames-scores.pc
+pkgconfig_DATA = libgames-support.pc
+
+lib_LTLIBRARIES = libgames-support.la
+
+libgames_support_la_SOURCES = \
+       config.vapi             \
+       scores/category.vala    \
+       scores/context.vala     \
+       scores/dialog.vala      \
+       scores/score.vala
+
+libgames_support_la_CFLAGS = \
+       -w
+
+libgames_support_la_CPPFLAGS = \
+       -I$(top_srcdir)/include                         \
+       -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"        \
+       -DLOCALEDIR=\"$(localedir)\"                    \
+       $(LIBGAMES_SUPPORT_CFLAGS)
+
+libgames_support_la_LDFLAGS = \
+       -version-info $(LIBGAMES_SUPPORT_LT_VERSION) \
+       -no-undefined \
+       $(LIBGAMES_SUPPORT_LIBS)
+
+libgames_support_la_VALAFLAGS = \
+       --pkg glib-2.0                  \
+       --pkg gtk+-3.0                  \
+       --pkg gio-2.0                   \
+       --pkg gee-0.8                   \
+       --header=games-support.h        \
+       --vapi=games-support.vapi
+
+games-support.h games-support.vapi : libgames_support_la_vala.stamp
+
+games_includedir = $(includedir)/gnome-games
+dist_games_include_HEADERS = games-support.h
+
+vapidir = $(datadir)/vala/vapi
+dist_vapi_DATA = games-support.vapi
+
+noinst_PROGRAMS = test-scores
+
+TESTS = test-scores
+
+test_scores_SOURCES = \
+       games-support.vapi \
+       scores/test-scores.vala
+
+test_scores_CFLAGS = \
+       -w
+
+test_scores_CPPFLAGS = \
+       $(LIBGAMES_SUPPORT_CFLAGS)
+
+test_scores_LDADD = \
+       libgames-support.la \
+       $(LIBGAMES_SUPPORT_LIBS)
+
+test_scores_VALAFLAGS = \
+       --pkg gee-0.8 \
+       --pkg glib-2.0 \
+       --pkg gio-2.0 \
+       --pkg gtk+-3.0
 
 EXTRA_DIST = \
-       autogen.sh \
        COPYING.LESSER
 
 MAINTAINERCLEANFILES = \
-       $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
-       $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
+       games-support.h                                 \
+       games-support.vapi                              \
+       $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL)      \
+       $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN)   \
        $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL)
 
 # We currently have no custom macros
 GITIGNOREFILES = m4
 
--include $(top_srcdir)/git.mk
+-include git.mk
diff --git a/autogen.sh b/autogen.sh
index 86ee4d3..fc1676d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,18 +1,15 @@
 #!/bin/sh
-# Run this to generate all the initial makefiles, etc.
+srcdir=`dirname $0`
+[ -z "$srcdir" ] && srcdir=.
+
+if [ ! -f "$srcdir/configure.ac" ]; then
+ echo "$srcdir doesn't look like source directory for $PKG_NAME" >&2
+ exit 1
+fi
 
 which gnome-autogen.sh || {
-    echo "You need to install gnome-common from GNOME git (or from"
-    echo "your OS vendor's package manager)."
-    exit 1
+       echo "You need to install gnome-common from GNOME Git"
+       exit 1
 }
 
-# This blurb from systemd, LGPL v2.1+
-if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
-        # This part is allowed to fail
-        cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
-        chmod +x .git/hooks/pre-commit && \
-        echo "Activated pre-commit hook." || :
-fi
-
-. gnome-autogen.sh
+. gnome-autogen.sh "$@"
diff --git a/src/config.vapi b/config.vapi
similarity index 100%
rename from src/config.vapi
rename to config.vapi
diff --git a/configure.ac b/configure.ac
index b75de36..51d9cbe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.69])
-AC_INIT([libgames-scores], [0.1], [https://bugzilla.gnome.org])
+AC_INIT([libgames-support], [0.1], [https://bugzilla.gnome.org])
 
 dnl * If the library source code has changed at all since the last update, then
 dnl   increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
@@ -11,14 +11,14 @@ dnl * If any interfaces have been removed or changed since the last public
 dnl   release, then set age to 0)
 dnl
 dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
-LIBGAMES_SCORES_LT_VERSION=0:0:0
-AC_SUBST(LIBGAMES_SCORES_LT_VERSION)
+LIBGAMES_SUPPORT_LT_VERSION=0:0:0
+AC_SUBST(LIBGAMES_SUPPORT_LT_VERSION)
 
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_SRCDIR([src/context.vala])
+AC_CONFIG_SRCDIR([scores/context.vala])
 
-AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign])
+AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz foreign subdir-objects])
 AM_SILENT_RULES([yes])
 AM_MAINTAINER_MODE([enable])
 
@@ -29,7 +29,7 @@ AM_PROG_VALAC([0.24])
 LT_PREREQ([2.2])
 LT_INIT([disable-static])
 
-PKG_CHECK_MODULES(LIBGAMES_SCORES, [
+PKG_CHECK_MODULES(LIBGAMES_SUPPORT, [
   glib-2.0 >= 2.40
   gio-2.0 >= 2.40
   gtk+-3.0 >= 3.12
@@ -42,8 +42,7 @@ IT_PROG_INTLTOOL(0.50.2)
 
 AC_CONFIG_FILES([
        Makefile
-       libgames-scores.pc
-       src/Makefile
+       libgames-support.pc
        po/Makefile.in
 ])
 
diff --git a/libgames-scores.pc.in b/libgames-support.pc.in
similarity index 59%
rename from libgames-scores.pc.in
rename to libgames-support.pc.in
index 5c305dc..d8bf4f4 100644
--- a/libgames-scores.pc.in
+++ b/libgames-support.pc.in
@@ -3,9 +3,9 @@ exec_prefix= exec_prefix@
 libdir= libdir@
 includedir= includedir@
 
-Name: libgames-scores
-Description: Tracks players' scores and presents a scores dialog
+Name: libgames-support
+Description: Useful functionality shared among GNOME games
 Version: @VERSION@
 Requires: glib-2.0 gio-2.0 gtk+-3.0
-Libs: -L${libdir} -lgames-scores
+Libs: -L${libdir} -lgames-support
 Cflags: -I${includedir}/gnome-games
diff --git a/src/Makefile.am b/scores/Makefile.am
similarity index 100%
rename from src/Makefile.am
rename to scores/Makefile.am
diff --git a/src/category.vala b/scores/category.vala
similarity index 100%
rename from src/category.vala
rename to scores/category.vala
diff --git a/src/context.vala b/scores/context.vala
similarity index 100%
rename from src/context.vala
rename to scores/context.vala
diff --git a/src/dialog.vala b/scores/dialog.vala
similarity index 100%
rename from src/dialog.vala
rename to scores/dialog.vala
diff --git a/src/score.vala b/scores/score.vala
similarity index 100%
rename from src/score.vala
rename to scores/score.vala
diff --git a/src/test-scores.vala b/scores/test-scores.vala
similarity index 100%
rename from src/test-scores.vala
rename to scores/test-scores.vala


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]