Commit 61f84094 authored by Og B. Maciel's avatar Og B. Maciel

Migrating back to autotools; Automatic installation of schemas is not working...

Migrating back to autotools; Automatic installation of schemas is not working and app doesn't install yet

svn path=/trunk/; revision=614
parent e3aeef16
## Process this file with automake to produce Makefile.in
SUBDIRS = data man po src
bin_SCRIPTS = \
billreminder \
billreminderd
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
EXTRA_DIST = \
intltool-extract.in \
intltool-merge.in \
intltool-update.in
CLEANFILES = \
src/*/*.pyc \
src/*/*.pyo
billreminder: billreminder.in
-sed -e s!\@PYTHONDIR\@!$(pythondir)! \
< $< > $@
EXTRA_DIST += billreminder.in
CLEANFILES += billreminderd
billreminderd: billreminderd.in
-sed -e s!\@PYTHONDIR\@!$(pythondir)! \
< $< > $@
EXTRA_DIST += billreminderd.in
CLEANFILES += billreminderd
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="billreminder"
REQUIRED_AUTOCONF_VERSION=2.60
REQUIRED_AUTOMAKE_VERSION=1.9.2
(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
dnl -*- Mode: autoconf -*-
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT(billreminder, 0.3.1, http://billreminder.sourceforge.net/)
AC_CONFIG_SRCDIR(billreminder.in)
AM_INIT_AUTOMAKE([1.7])
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
dnl put the ACLOCAL flags in the makefile
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
GETTEXT_PACKAGE=billreminder
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])
AM_PATH_PYTHON(2.4)
AC_ARG_WITH([session_bus_services_dir],
AC_HELP_STRING([--with-session-bus-services-dir], [Path to DBus services directory]))
if test "x$with_dbus_service_dir" != "x"; then
DBUS_SERVICES_DIR=$with_dbus_service_dir
else
DBUS_SERVICES_DIR=${datadir}/dbus-1/services
fi
AC_SUBST(DBUS_SERVICES_DIR)
AM_CHECK_PYMOD([gobject], , , AC_MSG_ERROR([Python module gobject required to run BillReminder]))
AM_CHECK_PYMOD_VERSION([pysqlite2.dbapi2], [version], [2.3.0], , AC_MSG_ERROR([Python module pysqlite2 >= 2.3.0 required to run BillReminder]))
AM_CHECK_PYMOD([dbus], , , AC_MSG_ERROR([Python module dbus required to run BillReminder]))
AC_OUTPUT([
Makefile
data/Makefile
data/images/Makefile
man/Makefile
po/Makefile.in
src/Makefile
src/daemon/Makefile
src/db/Makefile
src/gui/Makefile
src/gui/widgets/Makefile
src/lib/Makefile
])
## Process this file with automake to produce Makefile.in
SUBDIRS = images
configdir = $(datadir)/billreminder
config_DATA = billreminder.cfg
EXTRA_DIST = $(config_DATA)
schema_in_files = billreminder.schemas.in
@INTLTOOL_SCHEMAS_RULE@
if GCONF_SCHEMAS_INSTALL
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
EXTRA_DIST += $(schemas_DATA)
endif
servicedir = $(DBUS_SERVICES_DIR)
service_in_files = billreminder.service.in
service_DATA = billreminder.service
EXTRA_DIST += $(service_in_files)
CLEANFILES = $(service_DATA)
%.service: %.service.in
sed -e s!\@bindir\@!$(bindir)! \
< $< > $@
desktopdir = $(datadir)/applications
desktop_in_files = billreminder.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
EXTRA_DIST += $(desktop_in_files)
CLEANFILES += $(desktop_DATA)
autostartdir = $(sysconfdir)/xdg/autostart
autostart_in_files = billreminderd.desktop.in
autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
EXTRA_DIST += $(autostart_in_files)
CLEANFILES += $(autostart_DATA)
if GCONF_SCHEMAS_INSTALL
install-data-local:
@GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) \
--makefile-install-rule $(schema_DATA) || \
(echo ;\
echo "*****************************************************"; \
echo "Installation of schemas failed, install them manually"; \
echo "*****************************************************";)
@true
else
install-data-local:
@echo "***************************************************************"
@echo "Not installing schemas, disabled with --disable-schemas-install"
@echo "***************************************************************"
@true
endif
## Process this file with automake to produce Makefile.in
pixmapdir = $(datadir)/pixmaps
pixmap_DATA = billreminder.png
hicolordir = $(datadir)/icons/hicolor
tango_icons = \
billreminder16.png \
billreminder20.png \
billreminder22.png \
billreminder24.png \
billreminder32.png \
billreminder48.png \
billreminder64.png \
billreminder72.png \
billreminder96.png \
billreminder128.png \
billreminder.png \
billreminder.svg
install-data-local:
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/16x16/apps
$(INSTALL_DATA) $(srcdir)/billreminder16.png $(DESTDIR)$(hicolordir)/16x16/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/20x20/apps
$(INSTALL_DATA) $(srcdir)/billreminder20.png $(DESTDIR)$(hicolordir)/20x20/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/22x22/apps
$(INSTALL_DATA) $(srcdir)/billreminder22.png $(DESTDIR)$(hicolordir)/22x22/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/24x24/apps
$(INSTALL_DATA) $(srcdir)/billreminder24.png $(DESTDIR)$(hicolordir)/24x24/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/32x32/apps
$(INSTALL_DATA) $(srcdir)/billreminder32.png $(DESTDIR)$(hicolordir)/32x32/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/48x48/apps
$(INSTALL_DATA) $(srcdir)/billreminder48.png $(DESTDIR)$(hicolordir)/48x48/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/64x64/apps
$(INSTALL_DATA) $(srcdir)/billreminder64.png $(DESTDIR)$(hicolordir)/64x64/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/72x72/apps
$(INSTALL_DATA) $(srcdir)/billreminder72.png $(DESTDIR)$(hicolordir)/72x72/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/96x96/apps
$(INSTALL_DATA) $(srcdir)/billreminder96.png $(DESTDIR)$(hicolordir)/96x96/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/128x128/apps
$(INSTALL_DATA) $(srcdir)/billreminder128.png $(DESTDIR)$(hicolordir)/128x128/apps/billreminder.png
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/scalable/apps
$(INSTALL_DATA) $(srcdir)/billreminder.svg $(DESTDIR)$(hicolordir)/scalable/apps/billreminder.svg
uninstall-hook:
rm -f $(DESTDIR)$(hicolordir)/scalable/apps/billreminder.svg
rm -f $(DESTDIR)$(hicolordir)/128x128/apps/billreminder.png
rm -f $(DESTDIR)$(hicolordir)/96x96/apps/billreminder.png
rm -f $(DESTDIR)$(hicolordir)/72x72/apps/billreminder.png
rm -f $(DESTDIR)$(hicolordir)/64x64/apps/billreminder.png
rm -f $(DESTDIR)$(hicolordir)/48x48/apps/billreminder.png
rm -f $(DESTDIR)$(hicolordir)/32x32/apps/billreminder.png
rm -f $(DESTDIR)$(hicolordir)/24x24/apps/billreminder.png
rm -f $(DESTDIR)$(hicolordir)/22x22/apps/billreminder.png
rm -f $(DESTDIR)$(hicolordir)/20x20/apps/billreminder.png
rm -f $(DESTDIR)$(hicolordir)/16x16/apps/billreminder.png
imagesdir = $(datadir)/billreminder/images
images_DATA = \
billreminder.png \
billreminder16.png
EXTRA_DIST = $(images_DATA)
noinst_DATA = \
applet-critical.png \
billreminder.ico \
header.jpg
EXTRA_DIST += \
$(noinst_DATA) \
$(pixmap_DATA) \
$(tango_icons)
CLEANFILES =
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
install-data-hook:
@-if test -z "$(DESTDIR)"; then \
echo "Updating Gtk icon cache."; \
$(gtk_update_icon_cache); \
else \
echo "*** Icon cache not updated. After install, run this:"; \
echo "*** $(gtk_update_icon_cache)"; \
fi
## Process this file with automake to produce Makefile.in
man_MANS = billreminder.1 billreminderd.1
EXTRA_DIST = $(man_MANS)
cs de en_CA en_GB es fi fr hr hu it nb nl no pl pt_BR pt ro ru sl sv tl tr
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
data/billreminderd.desktop.in
data/billreminder.desktop.in
src/billreminder.py
src/billreminderd.py
src/daemon/alarm.py
src/daemon/dbus_manager.py
src/daemon/device.py
src/daemon/main.py
src/db/billstable.py
src/db/categoriestable.py
src/db/fieldstable.py
src/db/generictable.py
src/db/versionstable.py
src/gui/aboutdialog.py
src/gui/adddialog.py
src/gui/categoriesdialog.py
src/gui/maindialog.py
src/gui/prefdialog.py
src/gui/widgets/datebutton.py
src/gui/widgets/genericlistview.py
src/gui/widgets/statusbar.py
src/gui/widgets/timewidget.py
src/gui/widgets/toolbar.py
src/gui/widgets/trayicon.py
src/gui/widgets/viewbill.py
src/gui/widgets/viewcategory.py
src/lib/actions.py
src/lib/bill.py
src/lib/bubble.py
src/lib/common.py
src/lib/config.py
src/lib/dal.py
src/lib/dbus_actions.py
src/lib/dialogs.py
src/lib/utils.py
src/lib/scheduler.py
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
src/db/billstable.py
src/db/categoriestable.py
src/db/configtable.py
src/db/fieldstable.py
src/db/versionstable.py
src/gui/widgets/genericlistview.py
#!/bin/sh
# List of source files containing translatable strings.
xgettext -L python -o billreminder.pot ../data/*.desktop ../src/*.py ../src/daemon/*.py ../src/db/*.py ../src/gui/*.py ../src/gui/widgets/*.py ../src/lib/*.py
#!/usr/bin/env python
from distutils.core import setup
from distutils.command.install_data import install_data
from distutils.dist import Distribution
from distutils.command.build import build
from distutils.dep_util import newer
from distutils.log import info
import glob
import os
import sys
import subprocess
import platform
from src.lib.common import APPVERSION
PO_DIR = 'po'
MO_DIR = os.path.join('build', 'mo')
class BillReminderDist(Distribution):
global_options = Distribution.global_options + [
("without-gettext", None, "Don't build/install gettext .mo files")]
def __init__ (self, *args):
self.without_gettext = False
Distribution.__init__(self, *args)
class BuildData(build):
def run (self):
build.run (self)
if self.distribution.without_gettext:
return
for po in glob.glob (os.path.join (PO_DIR, '*.po')):
lang = os.path.basename(po[:-3])
mo = os.path.join(MO_DIR, lang, 'billreminder.mo')
directory = os.path.dirname(mo)
if not os.path.exists(directory):
info('creating %s' % directory)
os.makedirs(directory)
if newer(po, mo):
info('compiling %s -> %s' % (po, mo))
try:
rc = subprocess.call(['msgfmt', '-o', mo, po])
if rc != 0:
raise Warning, "msgfmt returned %d" % rc
except Exception, e:
print "Building gettext files failed. Try setup.py --without-gettext [build|install]"
print "%s: %s" % (type(e), e)
sys.exit(1)
class InstallSchema(build):
def run(self):
cmd = ["GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`",
'gconftool-2',
'--makefile-install-rule',
'data/billreminder.schemas']
try:
os.system('GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule data/billreminder.schemas')
"""
rc = subprocess.call(cmd)
if rc != 0:
raise Warning, "gconftool returned %d" % rc
"""
except Exception, e:
print "Registering the gconf schema has failed."
print "%s: %s" % (type(e), e)
sys.exit(1)
class InstallData(install_data):
def run (self):
self.data_files.extend (self._find_mo_files ())
install_data.run (self)
def _find_mo_files (self):
data_files = []
if not self.distribution.without_gettext:
for mo in glob.glob (os.path.join (MO_DIR, '*', 'billreminder.mo')):
lang = os.path.basename(os.path.dirname(mo))
dest = os.path.join('share', 'locale', lang, 'LC_MESSAGES')
data_files.append((dest, [mo]))
return data_files
if platform.system() == 'FreeBSD':
man_dir = 'man'
else:
man_dir = 'share/man'
setup(name='BillReminder',
version=APPVERSION,
description="BillReminder, We may not pay your bills, but we'll do our best to help you remember to pay them!",
author='Og Maciel',
author_email='ogmaciel@gnome.org',
url='http://billreminder.gnulinuxbrasil.org',
license='BSD',
scripts=['billreminder', 'billreminderd'],
data_files=[
('share/applications', ['data/billreminder.desktop']),
('/etc/gconf/schemas', ['data/billreminder.schemas']),
(os.path.join(man_dir, 'man1'), ['man/billreminder.1', 'man/billreminderd.1']),
('share/dbus-1/services', ['data/billreminder.service']),
('share/doc/billreminder-%s' % APPVERSION,
['AUTHORS', 'ChangeLog', 'CONTRIBUTORS', 'COPYING', 'COPYRIGHT', 'INSTALL',
'LICENSE', 'NEWS', 'MAINTAINERS', 'README', 'TODO']),
('/etc/xdg/autostart', ['data/billreminderd.desktop']),
('share/billreminder/images',
['data/images/billreminder16.png', 'images/applet-critical.png', 'images/billreminder.ico', 'images/billreminder.png', 'images/header.jpg', 'images/header.png']),
('share/pixmaps', ['data/images/billreminder.png']),
('share/icons/hicolor/scalable/apps', glob.glob('data/images/billreminder.svg')),
('share/icons/hicolor/16x16/apps', glob.glob('data/images/billreminder16.png')),
('share/icons/hicolor/22x22/apps', glob.glob('data/images/billreminder22.png')),
('share/icons/hicolor/24x24/apps', glob.glob('data/images/billreminder24.png')),
('share/icons/hicolor/48x48/apps', glob.glob('data/images/billreminder48.png')),
('share/icons/hicolor/96x96/apps', glob.glob('data/images/billreminder96.png')),
('share/icons/hicolor/128x128/apps', glob.glob('data/images/billreminder128.png')),
('share/icons/hicolor/16x16/actions', glob.glob('data/images/billreminder16.png')),
],
package_dir={'billreminder': 'src'},
packages=['billreminder', 'billreminder.daemon', 'billreminder.db', 'billreminder.gui',
'billreminder.gui.widgets', 'billreminder.lib', 'data', 'data/images'],
cmdclass={'build': BuildData, 'install_data': InstallData},
#cmdclass={'build': BuildData, 'build': InstallSchema, 'install_data': InstallData},
distclass=BillReminderDist
)
## Process this file with automake to produce Makefile.in
SUBDIRS = daemon db gui lib
billreminderdir = $(pythondir)/billreminder
billreminder_PYTHON = \
__init__.py \
billreminder.py \
billreminderd.py
## Process this file with automake to produce Makefile.in
billreminder_daemondir = $(pythondir)/billreminder/daemon
billreminder_daemon_PYTHON = \
__init__.py \
alarm.py \
dbus_manager.py \
device.py \
main.py
## Process this file with automake to produce Makefile.in
billreminder_dbdir = $(pythondir)/billreminder/db
billreminder_db_PYTHON = \
__init__.py \
alarmstable.py \
billstable.py \
categoriestable.py \
fieldstable.py \
generictable.py \
versionstable.py
## Process this file with automake to produce Makefile.in
SUBDIRS = widgets
billreminder_guidir = $(pythondir)/billreminder/gui
billreminder_gui_PYTHON = \
__init__.py \
aboutdialog.py \
adddialog.py \
categoriesdialog.py \
maindialog.py \
prefdialog.py
## Process this file with automake to produce Makefile.in
billreminder_widgetsdir = $(pythondir)/billreminder/gui/widgets
billreminder_widgets_PYTHON = \
__init__.py \
datebutton.py \
genericlistview.py \
statusbar.py \
timewidget.py \
toolbar.py \
trayicon.py \
viewbill.py \
viewcategory.py
## Process this file with automake to produce Makefile.in
billreminder_libdir = $(pythondir)/billreminder/lib
billreminder_lib_in_files = sysvars.py.in
billreminder_lib_PYTHON = \
__init__.py \
actions.py \
bill.py \
bubble.py \
common.py \
config.py \
dal.py \
dbus_actions.py \
dialogs.py \
i18n.py \
scheduler.py \
sysvars.py \
utils.py
sysvars.py: sysvars.py.in
sed -e s!\@datadir\@!$(datadir)! \
< $< > $@
EXTRA_DIST = sysvars.py.in
CLEANFILES = sysvars.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment