From 60885b058055010feb71e3a69cba7149a2e994fb Mon Sep 17 00:00:00 2001 From: Max Usachev Date: Wed, 16 Jun 2010 11:53:29 +0300 Subject: [PATCH] added setup scripts --- debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 14 ++++++++++++ debian/dirs | 1 + debian/meabook.postinst | 20 +++++++++++++++++ debian/optify | 1 + debian/rules | 55 +++++++++++++++++++++++++++++++++++++++++++++++ maemo/meabook.desktop | 9 ++++++++ maemo/meabook.service | 3 +++ setup.py | 26 ++++++++++++++++++++++ 10 files changed, 135 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/dirs create mode 100755 debian/meabook.postinst create mode 100644 debian/optify create mode 100755 debian/rules create mode 100644 maemo/meabook.desktop create mode 100644 maemo/meabook.service create mode 100644 setup.py diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..1cb66dd --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +meabook (0.1) unstable; urgency=low + + * Initial release + + -- Max Usachev Wed, 16 Jun 2010 11:07:41 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..09a746f --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: meabook +Section: user/office +Priority: optional +Maintainer: Max Usachev +Build-Depends: debhelper (>= 5), python2.5, python-setuptools | python2.5-setuptools +Standards-Version: 3.8.0 + +Package: meabook +Homepage: https://garage.maemo.org/projects/meabook/ +Architecture: all +Depends: python2.5, python2.5-gtk2, python-osso | python2.5-osso | python-gtk2, python2.5-hildon | python-hildon +Description: Enterprise address book +XB-Vcs-Browser: http://vcs.maemo.org/git/meabook/ +XB-Maemo-Display-Name: Meabook diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..e772481 --- /dev/null +++ b/debian/dirs @@ -0,0 +1 @@ +usr/bin diff --git a/debian/meabook.postinst b/debian/meabook.postinst new file mode 100755 index 0000000..1d49e8d --- /dev/null +++ b/debian/meabook.postinst @@ -0,0 +1,20 @@ +#!/bin/sh -e + +PKG="meabook" +USER="user" + +DOC_DIR="/home/$USER/MyDocs/.documents" +DESTDIR="$DOC_DIR/$PKG" + +mkdir $DESTDIR + +if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f /usr/share/icons/hicolor +fi + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database +fi + +exit 0 + diff --git a/debian/optify b/debian/optify new file mode 100644 index 0000000..865faf1 --- /dev/null +++ b/debian/optify @@ -0,0 +1 @@ +auto diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..346e1b4 --- /dev/null +++ b/debian/rules @@ -0,0 +1,55 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +PACKAGE := $(shell head -1 $(CURDIR)/debian/changelog | sed 's/^\([^ ]\+\) .*/\1/') +PREFIX := $(CURDIR)/debian/$(PACKAGE) +PYTHON := PYTHONOPTIMIZE=2 python2.5 + +build: build-stamp + +build-stamp: + dh_testdir + $(PYTHON) setup.py build + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + $(PYTHON) setup.py clean + rm -rf ./build + rm -rf ./*.egg-info + rm -f *.py[co] + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(PYTHON) setup.py install --root=$(PREFIX) --prefix=/opt/maemo/usr + cp $(PACKAGE) $(PREFIX)/usr/bin/$(PACKAGE) + mkdir -p $(CURDIR)/debian/$(PACKAGE)/usr/lib/python2.5/site-packages + ln -s /opt/maemo/usr/lib/python2.5/site-packages/meabook $(CURDIR)/debian/$(PACKAGE)/usr/lib/python2.5/site-packages/meabook + +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installmenu + #dh_python + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: build install + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff --git a/maemo/meabook.desktop b/maemo/meabook.desktop new file mode 100644 index 0000000..0f9100c --- /dev/null +++ b/maemo/meabook.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=0.1 +Name=Meabook +Exec=/usr/bin/meabook +Type=Application +Icon=meabook +X-Osso-Service=meabook +X-Osso-Type=application/x-executable diff --git a/maemo/meabook.service b/maemo/meabook.service new file mode 100644 index 0000000..3d2ea9d --- /dev/null +++ b/maemo/meabook.service @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=meabook +Exec=/usr/bin/meabook diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..865d910 --- /dev/null +++ b/setup.py @@ -0,0 +1,26 @@ +#!/usr/bin/python -tt + +""" Setup """ + +import os +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +PKG = open('debian/changelog').readline().split(' ')[0] + +setup(name=PKG, + description='Enterprise address book', + version=open('debian/changelog').readline().split(' ')[1][1:-1], + license='GPL 2', + packages=['meabook.database', 'meabook.parsers', 'meabook.ui', 'meabook'], + package_dir={'meabook': ''}, + data_files = [ + ('/usr/share/dbus-1/services', ['maemo/%s.service' % PKG]), + ('/usr/share/applications/hildon', ['maemo/%s.desktop' % PKG]), + #('/usr/share/icons/hicolor/48x48/apps/', \ + # ['./maemo/icons/48x48/%s.png' % PKG]), + #('/usr/share/icons/hicolor/64x64/apps/', \ + # ['./maemo/icons/64x64/%s.png' % PKG]) + ]) -- 1.7.9.5