added setup scripts
authorMax Usachev <maxusachev@gmail.com>
Wed, 16 Jun 2010 08:53:29 +0000 (11:53 +0300)
committerMax Usachev <maxusachev@gmail.com>
Wed, 16 Jun 2010 08:58:14 +0000 (11:58 +0300)
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/meabook.postinst [new file with mode: 0755]
debian/optify [new file with mode: 0644]
debian/rules [new file with mode: 0755]
maemo/meabook.desktop [new file with mode: 0644]
maemo/meabook.service [new file with mode: 0644]
setup.py [new file with mode: 0644]

diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..1cb66dd
--- /dev/null
@@ -0,0 +1,5 @@
+meabook (0.1) unstable; urgency=low
+
+  * Initial release
+
+ -- Max Usachev <maxusachev@gmail.com>  Wed, 16 Jun 2010 11:07:41 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..09a746f
--- /dev/null
@@ -0,0 +1,14 @@
+Source: meabook
+Section: user/office
+Priority: optional
+Maintainer: Max Usachev <maxusachev@gmail.com>
+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 (file)
index 0000000..e772481
--- /dev/null
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/meabook.postinst b/debian/meabook.postinst
new file mode 100755 (executable)
index 0000000..1d49e8d
--- /dev/null
@@ -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 (file)
index 0000000..865faf1
--- /dev/null
@@ -0,0 +1 @@
+auto
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..346e1b4
--- /dev/null
@@ -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 (file)
index 0000000..0f9100c
--- /dev/null
@@ -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 (file)
index 0000000..3d2ea9d
--- /dev/null
@@ -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 (file)
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])
+    ])