From f58260b675f650da8ddb05d0a980c83541c7fbd0 Mon Sep 17 00:00:00 2001 From: adam Date: Fri, 15 Feb 2013 23:46:19 +0700 Subject: [PATCH] pyejdb deb pkg --- .gitignore | 16 ++++++++ .idea/vcs.xml | 1 - Makefile | 2 + pyejdb/Makefile | 11 +++++- pyejdb/README.md | 14 +++++-- pyejdb/debian/changelog | 5 +++ pyejdb/debian/compat | 1 + pyejdb/debian/control | 30 +++++++++++++++ pyejdb/debian/copyright | 76 ++++++++++++++++++++++++++++++++++++++ pyejdb/debian/python3-ejdb.install | 1 + pyejdb/debian/rules | 23 ++++++++++++ pyejdb/debian/rules.mk | 1 + pyejdb/debian/source/format | 1 + pyejdb/pyejdb.iml | 2 +- 14 files changed, 178 insertions(+), 6 deletions(-) create mode 100644 pyejdb/debian/changelog create mode 100644 pyejdb/debian/compat create mode 100644 pyejdb/debian/control create mode 100644 pyejdb/debian/copyright create mode 100644 pyejdb/debian/python3-ejdb.install create mode 100755 pyejdb/debian/rules create mode 120000 pyejdb/debian/rules.mk create mode 100644 pyejdb/debian/source/format diff --git a/.gitignore b/.gitignore index 7a11950..4fa1cf3 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,19 @@ tcejdb/debian/*.debhelper /pyejdb/testdb* /pyejdb/dist/ /pyejdb/pyejdb.egg-info/ + + +/pyejdb/debian/files +/pyejdb/debian/python3-ejdb.debhelper.log +/pyejdb/debian/python3-ejdb.postinst.debhelper +/pyejdb/debian/python3-ejdb.prerm.debhelper +/pyejdb/debian/python3-ejdb.substvars +/pyejdb/debian/python3-ejdb/ +/pyejdb/debian/tmp/ +/python-ejdb_*.build +/python-ejdb_*.dsc +/python-ejdb_*.gz +/python-ejdb_*.build +/python-ejdb_*.changes +/python3-ejdb_*.deb + diff --git a/.idea/vcs.xml b/.idea/vcs.xml index e22fa7f..f372c8c 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -3,7 +3,6 @@ - diff --git a/Makefile b/Makefile index e5b43de..1b822c0 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,12 @@ clean: - rm -rf ./build - rm -rf ./var/* - rm -f libtcejdb*.tar.gz libtcejdb*.deb libtcejdb*.changes libtcejdb*.build libtcejdb*.dsc + - rm -f python*.tar.gz python*.deb python*.changes python*.build python*.dsc deb-packages: fix-changelogs cd ./tcejdb && autoconf && ./configure $(MAKE) -C ./tcejdb deb-packages + $(MAKE) -C ./pyejdb deb-packages deb-source-packages: fix-changelogs $(MAKE) -C ./ deb-packages DEBUILD_OPTS="-S" diff --git a/pyejdb/Makefile b/pyejdb/Makefile index 529b068..95373f0 100644 --- a/pyejdb/Makefile +++ b/pyejdb/Makefile @@ -1,3 +1,12 @@ all: - ./setup.py clean build sdist \ No newline at end of file + ./setup.py clean build sdist + +clean: + - rm -f ./testdb* + - rm -f ./dist + +deb-packages: clean + debuild $(DEBUILD_OPTS) + +.PHONY: all clean deb-packages \ No newline at end of file diff --git a/pyejdb/README.md b/pyejdb/README.md index 12d4b29..3c940b8 100644 --- a/pyejdb/README.md +++ b/pyejdb/README.md @@ -11,7 +11,7 @@ Installation * **Python3 >= 3.2** * EJDB C library **libtcejdb** ([from sources](https://github.com/Softmotions/ejdb#manual-installation) or as [debian packages](https://github.com/Softmotions/ejdb/wiki/Debian-Ubuntu-installation)) -**(A)** +**(A) Using pip** `pip` for python3 should be installed (`sudo apt-get install python3-pip`) @@ -22,15 +22,23 @@ Upgrading: sudo pip-3.2 install pyejdb --upgrade ``` -**(B)** +**(B) Installing directly from sources** ``` git clone https://github.com/Softmotions/ejdb.git cd ./pyejdb -python3 ./setup.py install +sudo python3 ./setup.py install ``` +**(C) Installing on Ubuntu/Debian** + +``` +sudo add-apt-repository ppa:adamansky/ejdb +sudo apt-get update +sudo apt-get install python3-ejdb +``` + One snippet intro --------------------------------- diff --git a/pyejdb/debian/changelog b/pyejdb/debian/changelog new file mode 100644 index 0000000..18ce8b9 --- /dev/null +++ b/pyejdb/debian/changelog @@ -0,0 +1,5 @@ +python-ejdb (1.0.4) unstable; urgency=low + + * Initial release. + + -- Anton Adamansky Fri, 15 Feb 2013 19:45:15 +0700 diff --git a/pyejdb/debian/compat b/pyejdb/debian/compat new file mode 100644 index 0000000..f11c82a --- /dev/null +++ b/pyejdb/debian/compat @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/pyejdb/debian/control b/pyejdb/debian/control new file mode 100644 index 0000000..8f1c824 --- /dev/null +++ b/pyejdb/debian/control @@ -0,0 +1,30 @@ +Source: python-ejdb +Section: database +Priority: optional +Maintainer: Anton Adamansky +Build-Depends: + debhelper (>= 9), + libtcejdb9-dev (>= 1.0.65), + python3-dev +Standards-Version: 3.9.3 +X-Python3-Version: >= 3.2 +Homepage: http://ejdb.org +Vcs-Browser: https://github.com/Softmotions/ejdb +Vcs-Git: https://github.com/Softmotions/ejdb.git + +Package: python3-ejdb +Section: python +Architecture: any +Depends: + ${misc:Depends}, + ${python3:Depends}, + ${shlibs:Depends}, + libtcejdb9 (>= 1.0.65) +Provides: + ${python3:Provides} +Description: Python3 binding for EJDB + EJDB aims to be a fast MongoDB-like library which can be embedded into C/C++ and NodeJS + applications under terms of LGPL license. + . + This package provides a Python3 wrapper for EJDB. + diff --git a/pyejdb/debian/copyright b/pyejdb/debian/copyright new file mode 100644 index 0000000..f463cc8 --- /dev/null +++ b/pyejdb/debian/copyright @@ -0,0 +1,76 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ejdb +Upstream-Contact: Anton Adamansky +Comment: This package was dowloaded from https://github.com/Softmotions/ejdb + +Files: debian/* +Copyright: Copyright (c) 2012-2013 Anton Adamansky +Comment: The Debian Packaging is under the BSD license. +License: BSD + Copyright (c) 2012-2013 Anton Adamansky + All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + . + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: pyejdb/bson.py pyejdb/typecheck.py +Copyright: Copyright (c) 2005-2012, Dmitry Dvoinikov +License: BSD + Copyright (c) 2005-2012, Dmitry Dvoinikov + All rights reserved. + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + . + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Files: * +Copyright: Copyright (c) 2012-2013 Anton Adamansky +License: LGPL-2.1+ + EJDB is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2.1 of the License or any later + version. EJDB is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser + General Public License for more details. + . + You should have received a copy of the GNU Lesser General Public License + along with EJDB; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + . + On Debian GNU/Linux systems, the complete text of the GNU Lesser General + Public License can be found in `/usr/share/common-licenses/LGPL-2.1'. diff --git a/pyejdb/debian/python3-ejdb.install b/pyejdb/debian/python3-ejdb.install new file mode 100644 index 0000000..389365a --- /dev/null +++ b/pyejdb/debian/python3-ejdb.install @@ -0,0 +1 @@ +usr/lib/python3 \ No newline at end of file diff --git a/pyejdb/debian/rules b/pyejdb/debian/rules new file mode 100755 index 0000000..55f514f --- /dev/null +++ b/pyejdb/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f + +PYTHON3=$(shell py3versions -vr) + +%: + dh $@ --with python3 + +build-python%: + python$* setup.py build + +override_dh_auto_build: $(PYTHON3:%=build-python%) + dh_auto_build + +install-python%: + python$* setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb + +override_dh_auto_install: $(PYTHON3:%=install-python%) + dh_auto_install + +override_dh_auto_clean: + dh_auto_clean + rm -rf build + rm -rf *.egg-info diff --git a/pyejdb/debian/rules.mk b/pyejdb/debian/rules.mk new file mode 120000 index 0000000..f7358b2 --- /dev/null +++ b/pyejdb/debian/rules.mk @@ -0,0 +1 @@ +./rules \ No newline at end of file diff --git a/pyejdb/debian/source/format b/pyejdb/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/pyejdb/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/pyejdb/pyejdb.iml b/pyejdb/pyejdb.iml index 8052f2d..2abe1f2 100644 --- a/pyejdb/pyejdb.iml +++ b/pyejdb/pyejdb.iml @@ -15,7 +15,7 @@ - + -- 2.7.4