Skip to content

Commit

Permalink
Merge branch 'autotools' of https://github.com/telemaco/books into te…
Browse files Browse the repository at this point in the history
…lemaco-autotools
  • Loading branch information
alvaropg committed Oct 20, 2013
2 parents fb3782b + b737597 commit 8c003da
Show file tree
Hide file tree
Showing 15 changed files with 172 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# http://www.gnu.org/software/automake

Makefile
Makefile.in

# http://www.gnu.org/software/autoconf
Expand All @@ -11,3 +12,15 @@ Makefile.in
/depcomp
/install-sh
/missing

config.log
config.status
config/
libtool
m4/
po/Makefile
po/Makefile.in.in
po/POTFILES
po/stamp-it
src/Makefile
src/gnome-books
14 changes: 14 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
SUBDIRS = src po

EXTRA_DIST = \
autogen.sh \
LICENSE \
NEWS

MAINTAINERCLEANFILES = \
INSTALL \
aclocal.m4 \
config.log \
config.status \
configure

Empty file added NEWS
Empty file.
25 changes: 25 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

PKG_NAME="gnome-documents"
ACLOCAL_FLAGS="-I libgd $ACLOCAL_FLAGS"

(test -f $srcdir/src/main.js) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}

which gnome-autogen.sh || {
echo "You need to install gnome-common from the GNOME git"
exit 1
}

REQUIRED_AUTOCONF_VERSION=2.59
REQUIRED_AUTOMAKE_VERSION=1.9
REQUIRED_INTLTOOL_VERSION=0.40.0
REQUIRED_PKG_CONFIG_VERSION=0.22
. gnome-autogen.sh
3 changes: 0 additions & 3 deletions books

This file was deleted.

70 changes: 70 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
dnl -*- mode: m4 -*-
AC_PREREQ(2.63)
AC_INIT([gnome-books],[3.11.0],[],[gnome-books])

AC_CONFIG_SRCDIR([src/main.js])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])

m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_CANONICAL_TARGET

# require automake 1.11
AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign])
AM_MAINTAINER_MODE([enable])

GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
IT_PROG_INTLTOOL(0.50.1)
PKG_PROG_PKG_CONFIG([0.22])

## don't rerun to this point if we abort
AC_CACHE_SAVE

AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_ISC_POSIX
AC_HEADER_STDC

# no stupid static libraries
AM_DISABLE_STATIC
# enable libtool
AC_PROG_LIBTOOL
# avoid libtool for LTCOMPILE, use it only to link

## don't rerun to this point if we abort
AC_CACHE_SAVE

GLIB_GSETTINGS

PKG_CHECK_MODULES(BOOKS, gjs-1.0)

GJS_CONSOLE=`$PKG_CONFIG --variable=gjs_console gjs-1.0`
AC_SUBST(GJS_CONSOLE)

GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)

AC_PATH_PROG(DESKTOP_FILE_VALIDATE, desktop-file-validate)

AC_CONFIG_FILES([
Makefile
src/Makefile
po/Makefile.in
])

AC_OUTPUT

dnl ==========================================================================
echo "

gnome-books $VERSION
====================

prefix: ${prefix}

Now type 'make' to build $PACKAGE
"
Empty file added po/LINGUAS
Empty file.
Empty file added po/POTFILES.in
Empty file.
Empty file added po/POTFILES.skip
Empty file.
30 changes: 30 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
bin_SCRIPTS = gnome-books

do_subst = sed -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
-e 's|@localedir[@]|$(localedir)|g' \
-e 's|@bindir[@]|$(bindir)|g' \
-e 's|@libdir[@]|$(libdir)|g' \
-e 's|@libexecdir[@]|$(libexecdir)|g' \
-e 's|@pkglibdir[@]|$(pkglibdir)|g' \
-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
-e 's|@GJS_CONSOLE[@]|$(GJS_CONSOLE)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
-e 's|@GETTEXT_PACKAGE[@]|$(GETTEXT_PACKAGE)|g'

gnome-books: gnome-books.in
$(AM_V_GEN) $(do_subst) $< > $@
chmod +x $@

jsdir = $(pkgdatadir)/js/
dist_js_DATA = \
application.js \
main.js \
mainWindow.js \
workModel.js

CLEANFILES = \
gnome-books
EXTRA_DIST = \
gnome-books.in
File renamed without changes.
20 changes: 20 additions & 0 deletions src/gnome-books.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

export GJS_PATH="@pkgdatadir@/js${GJS_PATH:+:$GJS_PATH}"
export GI_TYPELIB_PATH="@pkglibdir@/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
export LD_LIBRARY_PATH="@pkglibdir@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"

if test x"$GJS_DEBUG_OUTPUT" = x ; then
export GJS_DEBUG_OUTPUT=stderr
fi

if test x"$GJS_DEBUG_TOPICS" = x ; then
export GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
fi

DEBUG_COMMAND=""
if test x"$DOCUMENTS_RUN_DEBUG" != x; then
DEBUG_COMMAND="gdb --args"
fi

exec $DEBUG_COMMAND @GJS_CONSOLE@ -I @pkgdatadir@/js -c "const Main = imports.main; Main.start();" "$@"
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8c003da

Please sign in to comment.