diff options
-rw-r--r-- | debian/changelog | 38 | ||||
-rw-r--r-- | debian/cmake/FindPythonInterp.cmake | 43 | ||||
-rw-r--r-- | debian/cmake/FindPythonLibs.cmake | 193 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 64 | ||||
-rw-r--r-- | debian/copyright | 72 | ||||
-rw-r--r-- | debian/libshiboken-dev.install | 4 | ||||
-rw-r--r-- | debian/libshiboken.postinst.debhelper | 5 | ||||
-rw-r--r-- | debian/libshiboken.postrm.debhelper | 5 | ||||
-rw-r--r-- | debian/libshiboken.substvars | 2 | ||||
-rw-r--r-- | debian/libshiboken0.3.install | 1 | ||||
-rw-r--r-- | debian/libshiboken0.lintian-overrides | 4 | ||||
-rw-r--r-- | debian/patches/.dpkg-source-applied | 3 | ||||
-rw-r--r-- | debian/patches/fix_tests.patch | 45 | ||||
-rw-r--r-- | debian/patches/series | 3 | ||||
-rw-r--r-- | debian/patches/use_original_sparsehash.patch | 18 | ||||
-rw-r--r-- | debian/patches/use_soname_from_version.patch | 17 | ||||
-rwxr-xr-x | debian/rules | 103 | ||||
-rw-r--r-- | debian/shiboken.1 | 73 | ||||
-rw-r--r-- | debian/shiboken.install | 2 | ||||
-rw-r--r-- | debian/shiboken.manpages | 1 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/watch | 2 |
23 files changed, 700 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..6b8257aa --- /dev/null +++ b/debian/changelog @@ -0,0 +1,38 @@ +shiboken (0.3.1-0) unstable; urgency=low + + * Bump to 0.3.1 based on maemo 0.2.0 packaging. + + -- Lauro Neto <lauro.neto@openbossa.org> Tue, 04 May 2010 11:56:36 -0300 + +shiboken (0.2.0-1maemo1) unstable; urgency=low + + * Maemo 5 build. + + -- Willer Moreira <willer.moreira@openbossa.org> Fri, 26 Mar 2010 12:31:26 -0400 + +shiboken (0.2.0-1pyside0~ppa1) karmic; urgency=low + + * Reuse Debian packaging for Ubuntu (PPA) and Maemo builds. + * debian/source/format: downgrade to 1.0 format for karmic. + * Remove dpkg-dev and libsparsehash-dev build dependencies. + * Remove debian/libshiboken0.symbols (requires newer dpkg-dev) + + -- Anderson Lizardo <anderson.lizardo@openbossa.org> Fri, 26 Mar 2010 09:31:26 -0400 + +shiboken (0.2.0-1) experimental; urgency=low + + * Initial upload (Closes: #569173). + + * Add symbols for libshiboken0 using (c++) filter. + * Build for multiple python versions. + * Update Build-Depends + * Enable the build-tests + * Add debian/watch file. + * Add help2man manpage for shiboken + * Patches + + use_original_sparsehash.patch: Don't use embedded sparsehash. + + fix_tests.patch: Work for different python versions. + + use_soname_from_version.patch: Force a SONAME (MAJOR_version) to + libshiboken + + -- Didier Raboud <didier@raboud.com> Fri, 26 Mar 2010 12:56:52 +0000 diff --git a/debian/cmake/FindPythonInterp.cmake b/debian/cmake/FindPythonInterp.cmake new file mode 100644 index 00000000..827cc4a5 --- /dev/null +++ b/debian/cmake/FindPythonInterp.cmake @@ -0,0 +1,43 @@ +# - Find python interpreter +# This module finds if Python interpreter is installed and determines where the +# executables are. This code sets the following variables: +# +# PYTHONINTERP_FOUND - Was the Python executable found +# PYTHON_EXECUTABLE - path to the Python interpreter +# + +#============================================================================= +# Copyright 2005-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + +# Allows to choose your python version by setting CMAKE_PYTHON_VERSION to e.g. "2.6" +if (CMAKE_PYTHON_VERSION) + SET(CMAKE_PYTHON_VERSIONS ${CMAKE_PYTHON_VERSION}) +else (CMAKE_PYTHON_VERSION) + SET(CMAKE_PYTHON_VERSIONS 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) +endif (CMAKE_PYTHON_VERSION) + +FOREACH(_CURRENT_VERSION ${CMAKE_PYTHON_VERSIONS}) + FIND_PROGRAM(PYTHON_EXECUTABLE + NAMES python${_CURRENT_VERSION} + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] + ) +ENDFOREACH(_CURRENT_VERSION) + +# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp DEFAULT_MSG PYTHON_EXECUTABLE) + +MARK_AS_ADVANCED(PYTHON_EXECUTABLE) + diff --git a/debian/cmake/FindPythonLibs.cmake b/debian/cmake/FindPythonLibs.cmake new file mode 100644 index 00000000..fff19932 --- /dev/null +++ b/debian/cmake/FindPythonLibs.cmake @@ -0,0 +1,193 @@ +# - Find python libraries +# This module finds if Python is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# PYTHONLIBS_FOUND - have the Python libs been found +# PYTHON_LIBRARIES - path to the python library +# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated) +# PYTHON_INCLUDE_DIRS - path to where Python.h is found +# PYTHON_DEBUG_LIBRARIES - path to the debug library +# + +#============================================================================= +# Copyright 2001-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + +INCLUDE(CMakeFindFrameworks) +# Search for the python framework on Apple. +CMAKE_FIND_FRAMEWORKS(Python) + +# Allows to choose your python version by setting CMAKE_PYTHON_VERSION to e.g. "2.6" +if (CMAKE_PYTHONLIB_VERSION) + SET(CMAKE_PYTHONLIB_VERSIONS ${CMAKE_PYTHONLIB_VERSION}) +else (CMAKE_PYTHONLIB_VERSION) + SET(CMAKE_PYTHONLIB_VERSIONS 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) +endif (CMAKE_PYTHONLIB_VERSION) + +FOREACH(_CURRENT_VERSION ${CMAKE_PYTHONLIB_VERSIONS}) + STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION}) + IF(WIN32) + FIND_LIBRARY(PYTHON_DEBUG_LIBRARY + NAMES python${_CURRENT_VERSION_NO_DOTS}_d python + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs ) + ENDIF(WIN32) + + FIND_LIBRARY(PYTHON_LIBRARY + NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION} + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + # Avoid finding the .dll in the PATH. We want the .lib. + NO_SYSTEM_ENVIRONMENT_PATH + ) + + # For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if + # PYTHON_INCLUDE_DIR is not set. + IF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR) + SET(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH + "Path to where Python.h is found" FORCE) + ENDIF(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR) + + SET(PYTHON_FRAMEWORK_INCLUDES) + IF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR) + FOREACH(dir ${Python_FRAMEWORKS}) + SET(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES} + ${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION}) + ENDFOREACH(dir) + ENDIF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR) + + FIND_PATH(PYTHON_INCLUDE_DIR + NAMES Python.h + PATHS + ${PYTHON_FRAMEWORK_INCLUDES} + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include + PATH_SUFFIXES + python${_CURRENT_VERSION} + ) + + # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal. + SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL + "Path to where Python.h is found (deprecated)") + +ENDFOREACH(_CURRENT_VERSION) + +MARK_AS_ADVANCED( + PYTHON_DEBUG_LIBRARY + PYTHON_LIBRARY + PYTHON_INCLUDE_DIR +) + +# Python Should be built and installed as a Framework on OSX +IF(Python_FRAMEWORKS) + # If a framework has been selected for the include path, + # make sure "-framework" is used to link it. + IF("${PYTHON_INCLUDE_DIR}" MATCHES "Python\\.framework") + SET(PYTHON_LIBRARY "") + SET(PYTHON_DEBUG_LIBRARY "") + ENDIF("${PYTHON_INCLUDE_DIR}" MATCHES "Python\\.framework") + IF(NOT PYTHON_LIBRARY) + SET (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE) + ENDIF(NOT PYTHON_LIBRARY) + IF(NOT PYTHON_DEBUG_LIBRARY) + SET (PYTHON_DEBUG_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE) + ENDIF(NOT PYTHON_DEBUG_LIBRARY) +ENDIF(Python_FRAMEWORKS) + +# We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the +# cache entries because they are meant to specify the location of a single +# library. We now set the variables listed by the documentation for this +# module. +SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}") +SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}") +SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}") + + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) + + +# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python. +# PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include +# in your sources to initialize the static python modules + +GET_PROPERTY(_TARGET_SUPPORTS_SHARED_LIBS + GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) + +FUNCTION(PYTHON_ADD_MODULE _NAME ) + OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE) + OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS}) + + IF(PYTHON_ENABLE_MODULE_${_NAME}) + IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED) + SET(PY_MODULE_TYPE MODULE) + ELSE(PYTHON_MODULE_${_NAME}_BUILD_SHARED) + SET(PY_MODULE_TYPE STATIC) + SET_PROPERTY(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME}) + ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED) + + SET_PROPERTY(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME}) + ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN}) +# TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES}) + + ENDIF(PYTHON_ENABLE_MODULE_${_NAME}) +ENDFUNCTION(PYTHON_ADD_MODULE) + +FUNCTION(PYTHON_WRITE_MODULES_HEADER _filename) + + GET_PROPERTY(PY_STATIC_MODULES_LIST GLOBAL PROPERTY PY_STATIC_MODULES_LIST) + + GET_FILENAME_COMPONENT(_name "${_filename}" NAME) + STRING(REPLACE "." "_" _name "${_name}") + STRING(TOUPPER ${_name} _name) + + SET(_filenameTmp "${_filename}.in") + FILE(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n") + FILE(APPEND ${_filenameTmp} +"#ifndef ${_name} +#define ${_name} + +#include <Python.h> + +#ifdef __cplusplus +extern \"C\" { +#endif /* __cplusplus */ + +") + + FOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + FILE(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n") + ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + + FILE(APPEND ${_filenameTmp} +"#ifdef __cplusplus +} +#endif /* __cplusplus */ + +") + + + FOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n") + ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + + FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n") + FOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + FILE(APPEND ${_filenameTmp} " CMakeLoadPythonModule_${_currentModule}();\n") + ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + FILE(APPEND ${_filenameTmp} "}\n#endif\n\n#endif\n") + +# with CONFIGURE_FILE() cmake complains that you may not use a file created using FILE(WRITE) as input file for CONFIGURE_FILE() + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET) + +ENDFUNCTION(PYTHON_WRITE_MODULES_HEADER) diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..7f8f011e --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..ea21b369 --- /dev/null +++ b/debian/control @@ -0,0 +1,64 @@ +Source: shiboken +Section: devel +Priority: extra +Maintainer: PySide Team <pyside@openbossa.org> +XSBC-Original-Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> +Build-Depends: debhelper (>= 7.3.12), cmake (>= 2.6.0), + libqt4-dev (>= 4.5.0), libapiextractor-dev (>= 0.5.1), generatorrunner (>= 0.4.2), libgenrunner-dev (>= 0.4.2), + python-all-dev, python-all-dbg +XS-Python-Version: >= 2.5 +Standards-Version: 3.8.4 +Vcs-Svn: svn://svn.debian.org/python-modules/packages/shiboken/trunk/ +Vcs-Browser: http://svn.debian.org/wsvn/python-modules/packages/shiboken/?op=log +Homepage: http://www.pyside.org/ + +Package: shiboken +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: CPython bindings generator for C++ libraries + Shiboken is a bindings generator for C++ libraries that outputs CPython + source code. It uses generatorrunner and apiextractor to collect information + from library headers, merging modifications and handwritten code defined in the + typesystem description. + . + Shiboken is the binding generator used to create the PySide bindings. + +Package: libshiboken0.3 +Section: libs +Architecture: any +Conflicts: libshiboken0 (<< 0.3.0) +Replaces: libshiboken0 (<< 0.3.0) +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: CPython bindings generator for C++ libraries - shared library + Shiboken is a bindings generator for C++ libraries that outputs CPython + source code. It uses generatorrunner and apiextractor to collect information + from library headers, merging modifications and handwritten code defined in the + typesystem description. + . + This is the shared library used by shiboken. + +Package: libshiboken-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libshiboken0.3 (= ${binary:Version}) +Description: development files for the shiboken bindings generator library + Shiboken is a bindings generator for C++ libraries that outputs CPython + source code. It uses generatorrunner and apiextractor to collect information + from library headers, merging modifications and handwritten code defined in the + typesystem description. + . + This package contains the development files for the library. + +Package: shiboken-dbg +Section: debug +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, + libshiboken0.3 (= ${binary:Version}), + shiboken (= ${binary:Version}) +Description: debugging symbols for shiboken and its library + Shiboken is a bindings generator for C++ libraries that outputs CPython + source code. It uses generatorrunner and apiextractor to collect information + from library headers, merging modifications and handwritten code defined in the + typesystem description. + . + This package contains the debugging symbols for shiboken and libshiboken0. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..c0cda3a3 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,72 @@ +This package was debianized by Didier Raboud on Thu, 10 Feb 2010 12:15:24 +0100. + +Upstream Author: + + PySide team <contact@pyside.org> + +Copyright: + + Copyright (C) 2009 Nokia Corporation and/or its subsidiary(ies) + +Licenses: + + The shiboken code is under GPL-2 : + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + On Debian systems, the complete text of the GNU General Public License + can be found in `/usr/share/common-licenses/GPL-2'. + + The shiboken library and the tests are under LGPL-2.1 : + + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + version 2.1 as published by the Free Software Foundation. Please + review the following information to ensure the GNU Lesser General + Public License version 2.1 requirements will be met: + http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + + As a special exception to the GNU Lesser General Public License + version 2.1, the object code form of a "work that uses the Library" + may incorporate material from a header file that is part of the + Library. You may distribute such object code under terms of your + choice, provided that the incorporated material (i) does not exceed + more than 5% of the total size of the Library; and (ii) is limited to + numerical parameters, data structure layouts, accessors, macros, + inline functions and templates. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA + + On Debian systems, the complete text of the GNU Lesser General Public + License can be found in `/usr/share/common-licenses/LGPL-2.1` + +It was downloaded from http://www.pyside.org/downloads/. + +The Debian packaging is + + Copyright (C) 2009, Didier Raboud + +and is dual-licensed under the GPL (see `/usr/share/common-licenses/GPL-2') and +the LGPL (see `/usr/share/common-licenses/LGPL-2.1`). + diff --git a/debian/libshiboken-dev.install b/debian/libshiboken-dev.install new file mode 100644 index 00000000..d8ad3f26 --- /dev/null +++ b/debian/libshiboken-dev.install @@ -0,0 +1,4 @@ +usr/include/* +usr/lib/*.so +usr/lib/pkgconfig/* +usr/lib/cmake/* diff --git a/debian/libshiboken.postinst.debhelper b/debian/libshiboken.postinst.debhelper new file mode 100644 index 00000000..3d89d3ef --- /dev/null +++ b/debian/libshiboken.postinst.debhelper @@ -0,0 +1,5 @@ +# Automatically added by dh_makeshlibs +if [ "$1" = "configure" ]; then + ldconfig +fi +# End automatically added section diff --git a/debian/libshiboken.postrm.debhelper b/debian/libshiboken.postrm.debhelper new file mode 100644 index 00000000..7f440472 --- /dev/null +++ b/debian/libshiboken.postrm.debhelper @@ -0,0 +1,5 @@ +# Automatically added by dh_makeshlibs +if [ "$1" = "remove" ]; then + ldconfig +fi +# End automatically added section diff --git a/debian/libshiboken.substvars b/debian/libshiboken.substvars new file mode 100644 index 00000000..3f01d300 --- /dev/null +++ b/debian/libshiboken.substvars @@ -0,0 +1,2 @@ +shlibs:Depends=libc6 (>= 2.2.5), libgcc1 (>= 1:4.1.1), libpython2.6 (>= 2.6), libstdc++6 (>= 4.3), python2.5 (>= 2.5) +misc:Depends= diff --git a/debian/libshiboken0.3.install b/debian/libshiboken0.3.install new file mode 100644 index 00000000..27dbfbd2 --- /dev/null +++ b/debian/libshiboken0.3.install @@ -0,0 +1 @@ +usr/lib/libshiboken*.so.* diff --git a/debian/libshiboken0.lintian-overrides b/debian/libshiboken0.lintian-overrides new file mode 100644 index 00000000..dabd0a20 --- /dev/null +++ b/debian/libshiboken0.lintian-overrides @@ -0,0 +1,4 @@ +# We ship compiled versions for each supported python version, with a symlink +# to the default version +package-name-doesnt-match-sonames + diff --git a/debian/patches/.dpkg-source-applied b/debian/patches/.dpkg-source-applied new file mode 100644 index 00000000..924ddf63 --- /dev/null +++ b/debian/patches/.dpkg-source-applied @@ -0,0 +1,3 @@ +use_original_sparsehash.patch +fix_tests.patch +use_soname_from_version.patch diff --git a/debian/patches/fix_tests.patch b/debian/patches/fix_tests.patch new file mode 100644 index 00000000..012cfd6d --- /dev/null +++ b/debian/patches/fix_tests.patch @@ -0,0 +1,45 @@ +Description: Fixes the build-tests by including the library postfixes in the program calls +Origin: vendor +Forwarded: no (distribution-specific shipping of POSTFIX-ed libraries) +Author: Didier Raboud <didier@raboud.com> +Last-Update: 2010-03-24 + +Index: shiboken-0.2.0/tests/otherbinding/CMakeLists.txt +=================================================================== +--- shiboken-0.2.0.orig/tests/otherbinding/CMakeLists.txt 2010-03-24 13:24:46.000000000 +0100 ++++ shiboken-0.2.0/tests/otherbinding/CMakeLists.txt 2010-03-24 13:25:14.000000000 +0100 +@@ -16,7 +16,7 @@ + find_program(GENERATOR generatorrunner REQUIRED) + + add_custom_command(OUTPUT ${other_SRC} +-COMMAND ${GENERATOR} --generatorSet=${shiboken_BINARY_DIR}/shiboken_generator --enable-parent-ctor-heuristic ++COMMAND ${GENERATOR} --generatorSet=${shiboken_BINARY_DIR}/shiboken_generator${CMAKE_RELEASE_POSTFIX}${CMAKE_DEBUG_POSTFIX} --enable-parent-ctor-heuristic + ${CMAKE_CURRENT_SOURCE_DIR}/global.h + --include-paths=${libother_SOURCE_DIR}:${libsample_SOURCE_DIR}:${libsample_SOURCE_DIR}/.. + --typesystem-paths=${CMAKE_CURRENT_SOURCE_DIR}:${sample_SOURCE_DIR} +Index: shiboken-0.2.0/tests/samplebinding/CMakeLists.txt +=================================================================== +--- shiboken-0.2.0.orig/tests/samplebinding/CMakeLists.txt 2010-03-24 13:24:46.000000000 +0100 ++++ shiboken-0.2.0/tests/samplebinding/CMakeLists.txt 2010-03-24 13:25:14.000000000 +0100 +@@ -69,7 +69,7 @@ + find_program(GENERATOR generatorrunner REQUIRED) + + add_custom_command(OUTPUT ${sample_SRC} +-COMMAND ${GENERATOR} --generatorSet=${shiboken_BINARY_DIR}/shiboken_generator --enable-parent-ctor-heuristic ++COMMAND ${GENERATOR} --generatorSet=${shiboken_BINARY_DIR}/shiboken_generator${CMAKE_RELEASE_POSTFIX}${CMAKE_DEBUG_POSTFIX} --enable-parent-ctor-heuristic + ${CMAKE_CURRENT_SOURCE_DIR}/global.h + --include-paths=${libsample_SOURCE_DIR} + --typesystem-paths=${CMAKE_CURRENT_SOURCE_DIR} +Index: shiboken-0.2.0/tests/CMakeLists.txt +=================================================================== +--- shiboken-0.2.0.orig/tests/CMakeLists.txt 2010-03-24 13:24:46.000000000 +0100 ++++ shiboken-0.2.0/tests/CMakeLists.txt 2010-03-24 13:25:14.000000000 +0100 +@@ -14,7 +14,7 @@ + list(FIND test_blacklist ${CMAKE_MATCH_1} expect_fail) + add_test("${CMAKE_MATCH_1}" sh + "${CMAKE_CURRENT_SOURCE_DIR}/run_test.sh" +- "${libsample_BINARY_DIR}:${libshiboken_BINARY_DIR}" ++ "${libsample_BINARY_DIR}:${libother_BINARY_DIR}:${libshiboken_BINARY_DIR}" + "${sample_BINARY_DIR}:${other_BINARY_DIR}" + "${PYTHON_EXECUTABLE}" + "${test_file}") diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..924ddf63 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +use_original_sparsehash.patch +fix_tests.patch +use_soname_from_version.patch diff --git a/debian/patches/use_original_sparsehash.patch b/debian/patches/use_original_sparsehash.patch new file mode 100644 index 00000000..e68d4e3e --- /dev/null +++ b/debian/patches/use_original_sparsehash.patch @@ -0,0 +1,18 @@ +Description: Use Debian-provided libsparsehash-dev +Origin: vendor +Forwarded: http://bugs.openbossa.org/148 +Author: Didier Raboud <didier@raboud.com> +Last-Updated: 2010-02-12 +Index: shiboken-0.2.0/libshiboken/CMakeLists.txt +=================================================================== +--- shiboken-0.2.0.orig/libshiboken/CMakeLists.txt 2010-03-24 13:24:46.000000000 +0100 ++++ shiboken-0.2.0/libshiboken/CMakeLists.txt 2010-03-24 13:24:48.000000000 +0100 +@@ -25,7 +25,7 @@ + + include_directories(${CMAKE_CURRENT_SOURCE_DIR} + ${PYTHON_INCLUDE_PATH} +- ${CMAKE_SOURCE_DIR}/ext/sparsehash) ++ ) + add_library(libshiboken SHARED ${libshiboken_SRC}) + set_property(TARGET libshiboken PROPERTY PREFIX "") + target_link_libraries(libshiboken diff --git a/debian/patches/use_soname_from_version.patch b/debian/patches/use_soname_from_version.patch new file mode 100644 index 00000000..927a7eb0 --- /dev/null +++ b/debian/patches/use_soname_from_version.patch @@ -0,0 +1,17 @@ +Description: Forces a SONAME to libshiboken +Author: Didier Raboud <didier@raboud.com> +Origin: vendor +Forwarded: http://bugs.openbossa.org/192 +Last-Update: 2010-03-24 +Index: shiboken-0.2.0/libshiboken/CMakeLists.txt +=================================================================== +--- shiboken-0.2.0.orig/libshiboken/CMakeLists.txt 2010-03-24 18:35:55.000000000 +0100 ++++ shiboken-0.2.0/libshiboken/CMakeLists.txt 2010-03-24 18:36:42.000000000 +0100 +@@ -30,6 +30,7 @@ + set_property(TARGET libshiboken PROPERTY PREFIX "") + target_link_libraries(libshiboken + ${PYTHON_LIBRARIES}) ++set_target_properties(libshiboken PROPERTIES VERSION ${libshiboken_VERSION} SOVERSION ${libshiboken_MAJOR_VERSION}) + + install(DIRECTORY . DESTINATION include/shiboken + FILES_MATCHING PATTERN "*.h" diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..c6888820 --- /dev/null +++ b/debian/rules @@ -0,0 +1,103 @@ +#!/usr/bin/make -f + +# Allow to find Qt 4.6 on Maemo +PATH := /usr/bin/dh7:$(PATH) +export PATH + +%: + dh --buildsystem=cmake --parallel $@ + +# Python versions (default is first) +PYVERSIONS=$(shell pyversions -v -r) +DEFAULT_PY=$(shell pyversions -v -d) + +#### CONFIGURE #### + +override_dh_auto_configure: $(PYVERSIONS:%=override_dh_auto_configure-%) + +override_dh_auto_configure_dbg-%: + mkdir -p build-$*-dbg + dh_auto_configure --builddirectory=build-$*-dbg -- \ + -DCMAKE_BUILD_TYPE:STRING="Debug" \ + -DCMAKE_SKIP_RPATH=true \ + -DCMAKE_MODULE_PATH="$(shell pwd)/debian/cmake" \ + -DCMAKE_PYTHON_VERSION="$*-dbg;$*" \ + -DCMAKE_PYTHONLIB_VERSION="$*_d;$*" \ + -DBUILD_TESTS=FALSE \ + -DCMAKE_DEBUG_POSTFIX=$(shell echo -py$*_d | sed -e 's/\.//g' -) + +override_dh_auto_configure-%: + mkdir -p build-$* + dh_auto_configure --builddirectory=build-$* -- \ + -DCMAKE_BUILD_TYPE:STRING="Release" \ + -DCMAKE_SKIP_RPATH=true \ + -DCMAKE_MODULE_PATH="$(shell pwd)/debian/cmake" \ + -DCMAKE_PYTHON_VERSION=$* \ + -DCMAKE_PYTHONLIB_VERSION=$* \ + -DBUILD_TESTS=FALSE \ + -DCMAKE_RELEASE_POSTFIX=$(shell echo -py$* | sed -e 's/\.//g' -) + +#### BUILD #### + +override_dh_auto_build: $(PYVERSIONS:%=override_dh_auto_build-%) + +override_dh_auto_build_dbg-%: + dh_auto_build --builddirectory=build-$*-dbg + +override_dh_auto_build-%: + dh_auto_build --builddirectory=build-$* + +#### INSTALL #### + +override_dh_auto_install: $(PYVERSIONS:%=override_dh_auto_install-%) + +override_dh_auto_install_dbg-%: + dh_auto_install --builddirectory=build-$*-dbg --destdir=debian/tmp-dbg + +override_dh_auto_install-%: + dh_auto_install --builddirectory=build-$* + +#### STRIP #### +override_dh_strip: + dh_strip --dbg-package=shiboken-dbg --exclude=_d.so + +#### TEST #### + +override_dh_auto_test: $(PYVERSIONS:%=override_dh_auto_test-%) + +override_dh_auto_test_dbg-%: + dh_auto_test --builddirectory=build-$*-dbg + +override_dh_auto_test-%: prepare_test-% + dh_auto_test --builddirectory=build-$* + +prepare_test-%: + # Prepare the convenience symlinks for the tests + $(shell ln -s libother`echo -py$* | sed -e 's/\.//g' -`.so \ + build-$*/tests/libother/libother.so ) + $(shell ln -s libsample`echo -py$* | sed -e 's/\.//g' -`.so \ + build-$*/tests/libsample/libsample.so ) + $(shell ln -s other`echo -py$* | sed -e 's/\.//g' -`.so \ + build-$*/tests/otherbinding/other.so ) + $(shell ln -s sample`echo -py$* | sed -e 's/\.//g' -`.so \ + build-$*/tests/samplebinding/sample.so ) + +#### CLEAN #### +override_dh_auto_clean: + rm -rf build-* + rm -rf debian/tmp-dbg + +#### DEBIAN INSTALL #### + +override_dh_install: + # Install symlinks for default version + $(shell ln -s libshiboken_generator`echo -py${DEFAULT_PY} | sed -e 's/\.//g' -`.so \ + debian/tmp/usr/lib/generatorrunner/libshiboken_generator.so ) + $(shell ln -s libshiboken`echo -py${DEFAULT_PY} | sed -e 's/\.//g' -`.so \ + debian/tmp/usr/lib/libshiboken.so ) + dh_install --list-missing + +#### Shared libs #### +override_dh_makeshlibs: + # Package shiboken ships a usr/lib/generatorrunner/*.so plugin. No shared libs in there. + dh_makeshlibs -Nshiboken diff --git a/debian/shiboken.1 b/debian/shiboken.1 new file mode 100644 index 00000000..8aa25a7d --- /dev/null +++ b/debian/shiboken.1 @@ -0,0 +1,73 @@ +.TH SHIBOKEN "1" "March 2010" "shiboken v0.2.0" "User Commands" +.SH NAME +shiboken \- CPython bindings generator for C++ libraries +.SH DESCRIPTION +.SS "Usage:" +.IP +shiboken [options] header\-file typesystem\-file +.SS "General options:" +.TP +\fB\-\-debug\-level\fR=\fI[sparse\fR|medium|full] +Set the debug level +.TP +\fB\-\-documentation\-only\fR +Do not generates any code, just the documentation +.TP +\fB\-\-generatorSet\fR +generatorSet to be used. e.g. qtdoc +.TP +\fB\-\-help\fR +Display this help and exit +.TP +\fB\-\-include\-paths=\fR<path>[:<path>:...] +Include paths used by the C++ parser +.TP +\fB\-\-license\-file\fR=\fI[licensefile]\fR +File used for copyright headers of generated files +.TP +\fB\-\-no\-suppress\-warnings\fR +Show all warnings +.TP +\fB\-\-output\-directory\fR=\fI[dir]\fR +The directory where the generated files will be written +.TP +\fB\-\-silent\fR +Avoid printing any message +.TP +\fB\-\-typesystem\-paths=\fR<path>[:<path>:...] +Paths used when searching for typesystems +.TP +\fB\-\-version\fR +Output version information and exit +.SS "Shiboken options:" +.TP +\fB\-\-disable\-verbose\-error\-messages\fR +Disable verbose error messages. Turn the python code hard to debug but safe few kB on the generated bindings. +.TP +\fB\-\-enable\-parent\-ctor\-heuristic\fR +Enable heuristics to detect parent relationship on constructors. +.TP +\fB\-\-enable\-pyside\-extensions\fR +Enable PySide extensions, such as support for signal/slots, use this if you are creating a binding for a Qt\-based library. +.TP +\fB\-\-enable\-return\-value\-heuristic\fR +Enable heuristics to detect parent relationship on return values (USE WITH CAUTION!) +.SS "Shiboken options:" +.TP +\fB\-\-disable\-verbose\-error\-messages\fR +Disable verbose error messages. Turn the python code hard to debug but safe few kB on the generated bindings. +.TP +\fB\-\-enable\-parent\-ctor\-heuristic\fR +Enable heuristics to detect parent relationship on constructors. +.TP +\fB\-\-enable\-pyside\-extensions\fR +Enable PySide extensions, such as support for signal/slots, use this if you are creating a binding for a Qt\-based library. +.TP +\fB\-\-enable\-return\-value\-heuristic\fR +Enable heuristics to detect parent relationship on return values (USE WITH CAUTION!) +.SH COPYRIGHT +Copyright \(co 2009\-2010 Nokia Corporation and/or its subsidiary(\fB\-ies\fR) +.SH AUTHOR +.PP +This manpage was written for Debian, starting with a help2man output, by +Didier Raboud <didier@raboud.com>, on the 26. March 2010. diff --git a/debian/shiboken.install b/debian/shiboken.install new file mode 100644 index 00000000..77f73188 --- /dev/null +++ b/debian/shiboken.install @@ -0,0 +1,2 @@ +usr/bin/shiboken +usr/lib/generatorrunner/libshiboken_generator*.so diff --git a/debian/shiboken.manpages b/debian/shiboken.manpages new file mode 100644 index 00000000..65d3dd9a --- /dev/null +++ b/debian/shiboken.manpages @@ -0,0 +1 @@ +debian/shiboken.1 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..76d94f6b --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://www.pyside.org/files/shiboken-([\d\.]*).tar.bz2 |