tags 735516 patch thanks Hi Maintainer
The attached patch to src:liblas builds the python-liblas package as well. I haven't done extensive testing, but it builds in my Ubuntu PPA and seems to produce debs with all the correct files in place. If this is going to be uploaded, src:python-liblas will need to be removed from the archive first. Regards Graham
diff -Nru liblas-1.7.0+dfsg/debian/clean liblas-1.7.0+dfsg/debian/clean --- liblas-1.7.0+dfsg/debian/clean 1970-01-01 02:00:00.000000000 +0200 +++ liblas-1.7.0+dfsg/debian/clean 2014-02-03 16:03:25.000000000 +0200 @@ -0,0 +1,2 @@ +README.txt +python/libLAS.egg-info/* diff -Nru liblas-1.7.0+dfsg/debian/control liblas-1.7.0+dfsg/debian/control --- liblas-1.7.0+dfsg/debian/control 2014-01-07 13:04:07.000000000 +0200 +++ liblas-1.7.0+dfsg/debian/control 2014-02-03 16:04:27.000000000 +0200 @@ -13,6 +13,10 @@ , libboost-dev , libboost-program-options-dev , libboost-thread-dev + , python-all (>= 2.6.6-3~) +Build-Depends-Indep: + dh-python + , python-setuptools Standards-Version: 3.9.5 Homepage: http://liblas.org/ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/liblas.git @@ -119,3 +123,22 @@ . This package contains the essential toolset to manage LiDAR data: lasinfo, lasmerge, las2las, las2txt, txt2las, las2ogr. + +Package: python-liblas +Section: python +Architecture: all +Depends: + ${misc:Depends} + , ${python:Depends} + , liblas-c2 +Description: Python module to use the ASPRS LiDAR data translation library + libLAS is a C/C++ library for reading and writing ASPRS LAS versions + 1.0, 1.1 and 1.2 data. The LAS format is a sequential binary format + used to store data from sensors and as intermediate processing storage + by some LiDAR-related applications. LiDAR (Light Detection and Ranging) + is an optical remote sensing technology that measures properties of + scattered light to find range and/or other information of a distant + target. The prevalent method to determine distance to an object or + surface is to use laser pulses. + . + This package contains a Python module to use libLAS. diff -Nru liblas-1.7.0+dfsg/debian/patches/fix_library_search liblas-1.7.0+dfsg/debian/patches/fix_library_search --- liblas-1.7.0+dfsg/debian/patches/fix_library_search 1970-01-01 02:00:00.000000000 +0200 +++ liblas-1.7.0+dfsg/debian/patches/fix_library_search 2014-02-03 16:03:25.000000000 +0200 @@ -0,0 +1,18 @@ +From: David Paleino <da...@debian.org> +Subject: fix incorrect usage of ctypes' find_library +Bug-Debian: http://bugs.debian.org/595603 + http://bugs.debian.org/595608 +Forwarded: no +Last-Update: 2014-02-03 + +--- a/python/liblas/core.py ++++ b/python/liblas/core.py +@@ -153,7 +153,7 @@ + free = ctypes.CDLL(find_library('libc')).free + else: + lib_name = 'liblas_c.so' +- free = ctypes.CDLL(find_library('libc.so.6')).free ++ free = ctypes.CDLL(find_library('c')).free + las = ctypes.CDLL(lib_name) + else: + raise LASException('Unsupported OS "%s"' % os.name) diff -Nru liblas-1.7.0+dfsg/debian/patches/series liblas-1.7.0+dfsg/debian/patches/series --- liblas-1.7.0+dfsg/debian/patches/series 2014-01-07 13:04:07.000000000 +0200 +++ liblas-1.7.0+dfsg/debian/patches/series 2014-02-03 16:03:25.000000000 +0200 @@ -1 +1,2 @@ boost +fix_library_search diff -Nru liblas-1.7.0+dfsg/debian/python-liblas.install liblas-1.7.0+dfsg/debian/python-liblas.install --- liblas-1.7.0+dfsg/debian/python-liblas.install 1970-01-01 02:00:00.000000000 +0200 +++ liblas-1.7.0+dfsg/debian/python-liblas.install 2014-02-03 16:03:25.000000000 +0200 @@ -0,0 +1,2 @@ +usr/lib/python* +python/scripts/oci2las.py usr/bin diff -Nru liblas-1.7.0+dfsg/debian/rules liblas-1.7.0+dfsg/debian/rules --- liblas-1.7.0+dfsg/debian/rules 2014-01-07 13:04:07.000000000 +0200 +++ liblas-1.7.0+dfsg/debian/rules 2014-02-03 17:00:31.000000000 +0200 @@ -1,20 +1,36 @@ #!/usr/bin/make -f %: - dh $@ \ - -Scmake + dh $@ -Scmake --parallel + +override_dh_auto_clean-indep: + rm -rf python/.pybuild override_dh_auto_configure: - dh_auto_configure -Scmake -- \ + dh_auto_configure -- \ -DWITH_GDAL=TRUE \ -DWITH_GEOTIFF=TRUE \ -DGEOTIFF_INCLUDE_DIR=/usr/include/geotiff -override_dh_install: - dh_install +override_dh_auto_configure-indep: + dh_auto_configure -Spybuild -Dpython - # remove capi from liblas-dev - rm -vrf $(CURDIR)/debian/liblas-dev/usr/include/liblas/capi/ +override_dh_auto_build-indep: + dh_auto_build -Spybuild -Dpython override_dh_auto_test: # don't run tests + +override_dh_auto_install-indep: + dh_auto_install -Spybuild -Dpython + +override_dh_install-arch: + dh_install --arch + # remove capi from liblas-dev + rm -vrf $(CURDIR)/debian/liblas-dev/usr/include/liblas/capi/ + +override_dh_install-indep: + dh_install --indep + dh_python2 --indep + mv $(CURDIR)/debian/python-liblas/usr/bin/oci2las.py \ + $(CURDIR)/debian/python-liblas/usr/bin/oci2las