[hamradio-commits] [limesuite] 03/03: Add and modify debian/ files based on upstream's

Andreas E. Bombe aeb at moszumanska.debian.org
Thu Dec 22 02:17:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

aeb pushed a commit to branch master
in repository limesuite.

commit 8693daaa00273cb1542d8942288d9ed4eccb63b5
Author: Andreas Bombe <aeb at debian.org>
Date:   Wed Dec 21 00:18:29 2016 +0100

    Add and modify debian/ files based on upstream's
---
 debian/changelog                         |  22 +-----
 debian/compat                            |   2 +-
 debian/control                           | 123 ++++++++++++++++++-------------
 debian/copyright                         | 118 ++++++++++++++++++++++++++++-
 debian/limesuite.install                 |   6 +-
 debian/limesuite.lintian-overrides       |   1 -
 debian/limesuite.postinst                |   8 --
 debian/limesuite.prerm                   |   8 --
 debian/patches/fix-icon-install          |  41 +++++++++++
 debian/patches/override-build-timestamp  |  24 ++++++
 debian/patches/series                    |   4 +
 debian/patches/use-system-glew           |  60 +++++++++++++++
 debian/patches/version-string            |  49 ++++++++++++
 debian/rules                             |  21 ++++--
 debian/soapysdr0.5-2-module-lms7.install |   1 -
 15 files changed, 384 insertions(+), 104 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 97bcc92..43ab042 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,21 +1,5 @@
-limesuite (16.8.1.819) unstable; urgency=low
+limesuite (16.8.23.819+git20161221+dfsg-1) unstable; urgency=medium
 
-  * updated debian packaging for latest version.h
-  * set standards version to 3.9.7
-  * update ABI version to 16.8-1
-  * disable CMAKE_INSTALL_RPATH
+  * Initial release (Closes: #847798)
 
- -- Lime Microsystems <info at limemicro.com>  Thu, 25 Aug 2016 11:41:35 -0700
-
-limesuite (16.6.6.818) unstable; urgency=low
-
-  * updated debian packaging for latest version.h
-
- -- Lime Microsystems <info at limemicro.com>  Sun, 26 Jun 2016 09:24:35 -0700
-
-
-limesuite (16.5.12.816) unstable; urgency=low
-
-  * debian packaging work for lime suite
-
- -- Lime Microsystems <info at limemicro.com>  Wed, 18 May 2016 18:18:06 -0700
+ -- Andreas Bombe <aeb at debian.org>  Thu, 22 Dec 2016 02:11:19 +0100
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index 3f67ea3..d4f9913 100644
--- a/debian/control
+++ b/debian/control
@@ -1,75 +1,94 @@
 Source: limesuite
-Section: comm
+Section: hamradio
 Priority: optional
-Maintainer: Lime Microsystems <info at limemicro.com>
-Build-Depends:
-    debhelper (>= 9.0.0),
-    cmake (>= 3.1.3),
-    libusb-1.0-0-dev,
-    libwxgtk3.0-dev,
-    libsoapysdr-dev,
-    libi2c-dev,
-    freeglut3-dev,
-    libsqlite3-dev
-Standards-Version: 3.9.7
+Maintainer: Debian Hamradio Maintainers <debian-hams at lists.debian.org>
+Uploaders: Andreas Bombe <aeb at debian.org>
+Build-Depends: debhelper (>= 10),
+               cmake,
+               pkg-config,
+               libusb-1.0-0-dev,
+               libwxgtk3.0-dev,
+               libsoapysdr-dev,
+               libi2c-dev,
+               freeglut3-dev,
+               libglew-dev,
+               libsqlite3-dev
+Standards-Version: 3.9.8
 Homepage: https://myriadrf.org/projects/lime-suite/
-Vcs-Git: https://github.com/myriadrf/LimeSuite.git
-Vcs-Browser: https://github.com/myriadrf/LimeSuite.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-hamradio/limesuite.git
+Vcs-Git: https://anonscm.debian.org/git/pkg-hamradio/limesuite.git
+
+Package: limesuite
+Architecture: any
+Depends: liblimesuite16.8-1 (>= ${binary:Version}),
+         python, python-soapysdr,
+         ${shlibs:Depends}, ${misc:Depends}
+Description: tools to test, control and update LMS7 transceiver based hardware
+ Lime Suite is a collection of software supporting Lime Microsystems LMS7 RF
+ transceiver based hardware such as the LimeSDR, LMS7002M UNITE board, or the
+ Novena with LMS7 RF board.
+ .
+ This package contains the command line and GUI tools to control and update the
+ hardware devices.
 
 Package: liblimesuite16.8-1
 Section: libs
 Architecture: any
 Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Recommends: limesuite-udev
-Description: Lime Suite - shared library
- Lime Suite application software.
+Recommends: limesuite-udev [linux-any]
+Description: library to access LMS7 transceiver based hardware
+ Lime Suite is a collection of software supporting Lime Microsystems LMS7 RF
+ transceiver based hardware such as the LimeSDR, LMS7002M UNITE board, or the
+ Novena with LMS7 RF board.
+ .
+ This package contains the shared library to access LMS7 based hardware.
 
 Package: liblimesuite-dev
 Section: libdevel
 Architecture: any
-Depends:
-    liblimesuite16.8-1 (= ${binary:Version}),
-    ${misc:Depends}
-Description: Lime Suite - development files
- Lime Suite application software.
+Depends: liblimesuite16.8-1 (= ${binary:Version}),
+         ${misc:Depends}
+Description: library to access LMS7 transceiver based hardware (development)
+ Lime Suite is a collection of software supporting Lime Microsystems LMS7 RF
+ transceiver based hardware such as the LimeSDR, LMS7002M UNITE board, or the
+ Novena with LMS7 RF board.
+ .
+ This package contains the development files for liblimesuite.
 
-Package: limesuite
-Section: comm
+Package: soapysdr0.5-2-module-lms7
 Architecture: any
-Depends:
-    liblimesuite16.8-1 (= ${binary:Version}),
-    ${shlibs:Depends},
-    ${misc:Depends},
-    xdg-utils
-Description: Lime Suite - Library applications
- Lime Suite application software.
+Multi-Arch: same
+Depends: liblimesuite16.8-1 (>= ${binary:Version}),
+         ${shlibs:Depends}, ${misc:Depends}
+Description: Lime Microsystems LMS7 device support for SoapySDR
+ Lime Suite is a collection of software supporting Lime Microsystems LMS7 RF
+ transceiver based hardware such as the LimeSDR, LMS7002M UNITE board, or the
+ Novena with LMS7 RF board.
+ .
+ This package contains a SoapySDR module to use LMS7 based hardware to transmit
+ and receive.
 
 Package: soapysdr-module-lms7
-Section: libs
-Architecture: all
-Pre-Depends: ${misc:Pre-Depends}
-Depends: soapysdr0.5-2-module-lms7, ${misc:Depends}
-Description: Lime Suite - SoapySDR bindings metapackage
- Lime Suite application software.
-
-Package: soapysdr0.5-2-module-lms7
-Section: comm
 Architecture: any
 Multi-Arch: same
-Depends:
-    liblimesuite16.8-1 (= ${binary:Version}),
-    ${shlibs:Depends},
-    ${misc:Depends},
-    python, python-soapysdr
-Description: Lime Suite - SoapySDR bindings
- Lime Suite application software.
+Depends: soapysdr0.5-2-module-lms7, ${misc:Depends}
+Description: Lime Microsystems LMS7 device support for SoapySDR (default version)
+ Lime Suite is a collection of software supporting Lime Microsystems LMS7 RF
+ transceiver based hardware such as the LimeSDR, LMS7002M UNITE board, or the
+ Novena with LMS7 RF board.
+ .
+ This is an ampty dependency package that pulls in the LMS7 support module for
+ the default version of libsoapysdr.
 
 Package: limesuite-udev
 Section: libs
-Architecture: any
-Multi-Arch: same
-Depends: ${shlibs:Depends}, ${misc:Depends}, udev
+Architecture: all
+Depends: ${misc:Depends}
 Description: Lime Suite - USB rules for udev
- Lime Suite application software.
+ Lime Suite is a collection of software supporting Lime Microsystems LMS7 RF
+ transceiver based hardware such as the LimeSDR, LMS7002M UNITE board, or the
+ Novena with LMS7 RF board.
+ .
+ This package contains the udev rules to make LMS7 based hardware accessible to
+ users in the plugdev group.
diff --git a/debian/copyright b/debian/copyright
index f3d7e98..64db4f8 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,10 +1,120 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: limesuite
 Source: https://myriadrf.org/projects/lime-suite/
+Files-Excluded: build
+                src/Connection_uLimeSDR/FTD3XXLibrary
+                src/Connection_uLimeSDR/DRV_DriverInterface.cpp
+                src/Connection_uLimeSDR/DRV_DriverInterface.h
+                src/oglGraph/glew
+                external/msvc
+                external/sqlite-3.12
 
 Files: *
-Copyright: 2015-2016 Lime Microsystems <info at limemicro.com>
+Copyright: Copyright 2013 Lime Microsystems Ltd
 License: Apache-2.0
- On Debian systems, the full text of the Apache
- License version 2.0 can be found in the file
- `/usr/share/common-licenses/Apache-2.0'.
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+     http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian systems, the full text of the Apache License version 2.0 can
+ be found in the file `/usr/share/common-licenses/Apache-2.0'.
+
+Files: src/kissFFT/*
+Copyright: 2003-2010 Mark Borgerding
+License: BSD-3-clause
+ 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.
+     * Neither the author nor the names of any contributors may be used to
+       endorse or promote products derived from this software without specific
+       prior written permission.
+ .
+ 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 OWNER 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: ./external/cpp-feather-ini-parser/*
+Copyright: 2014 Turbine1991
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+Files: ./cmake/Modules/Findlibusb-1.0.cmake
+Copyright: 2006 Andreas Schneider <mail at cynapses.org>
+           2008 Kyle Machulis <kyle at nonpolynomial.com>
+License: Cmake-Modules-BSD-3-clause
+ 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.
+ .
+ * Neither the name of the CMake-Modules Project nor the names of its
+   contributors may be used to endorse or promote products derived from this
+   software without specific prior written permission.
+ .
+ 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 OWNER 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: ./cmake/GetGitRevisionDescription.cmake
+ ./cmake/GetGitRevisionDescription.cmake.in
+Copyright: Iowa State University 2009-2010.
+License: BSL-1.0
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+
+Files: ./cmake/Modules/FindSQLite3.cmake
+Copyright: 2007-2009 LuaDist.
+License: MIT
+ Redistribution and use of this file is allowed according to the terms of the MIT license.
+ For details see the COPYRIGHT file distributed with LuaDist.
diff --git a/debian/limesuite.install b/debian/limesuite.install
index 030287c..d44036a 100644
--- a/debian/limesuite.install
+++ b/debian/limesuite.install
@@ -1,3 +1,3 @@
-usr/bin/LimeSuiteGUI
-usr/bin/LimeUtil
-usr/share/Lime
+usr/bin
+usr/share/applications
+usr/share/icons
diff --git a/debian/limesuite.lintian-overrides b/debian/limesuite.lintian-overrides
deleted file mode 100644
index e93a87f..0000000
--- a/debian/limesuite.lintian-overrides
+++ /dev/null
@@ -1 +0,0 @@
-limesuite: embedded-library usr/bin/lms7suite: glew
diff --git a/debian/limesuite.postinst b/debian/limesuite.postinst
deleted file mode 100644
index f3ff99a..0000000
--- a/debian/limesuite.postinst
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-set -e
-
-if [ "$1" = "configure" ]; then
-	/usr/share/Lime/Desktop/install
-fi
-
-#DEBHELPER#
diff --git a/debian/limesuite.prerm b/debian/limesuite.prerm
deleted file mode 100644
index 0cd4b61..0000000
--- a/debian/limesuite.prerm
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-set -e
-
-if [ "$1" = "remove" ]; then
-	/usr/share/Lime/Desktop/uninstall
-fi
-
-#DEBHELPER#
diff --git a/debian/patches/fix-icon-install b/debian/patches/fix-icon-install
new file mode 100644
index 0000000..199b31e
--- /dev/null
+++ b/debian/patches/fix-icon-install
@@ -0,0 +1,41 @@
+Description: Install icon and desktop files directly to correct locations
+ Upstream installs icon and desktop files to a central location and has
+ a script move them to the correct locations at postinst time. This
+ patch changes it to place it directly in their final locations.
+Author: Andreas Bombe <aeb at debian.org>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Desktop/CMakeLists.txt
++++ b/Desktop/CMakeLists.txt
+@@ -13,24 +13,11 @@
+     return()
+ endif()
+ 
+-########################################################################
+-# menu launcher and MIME type
+-########################################################################
+-file(GLOB lime_suite_png_icons ${CMAKE_CURRENT_SOURCE_DIR}/lime-suite-*.png)
++install(FILES lime-suite-16.png  DESTINATION share/icons/hicolor/16x16/apps   RENAME lime-suite.png)
++install(FILES lime-suite-22.png  DESTINATION share/icons/hicolor/22x22/apps   RENAME lime-suite.png)
++install(FILES lime-suite-32.png  DESTINATION share/icons/hicolor/32x32/apps   RENAME lime-suite.png)
++install(FILES lime-suite-48.png  DESTINATION share/icons/hicolor/48x48/apps   RENAME lime-suite.png)
++install(FILES lime-suite-64.png  DESTINATION share/icons/hicolor/64x64/apps   RENAME lime-suite.png)
++install(FILES lime-suite-128.png DESTINATION share/icons/hicolor/128x128/apps RENAME lime-suite.png)
+ 
+-install(
+-    FILES
+-        lime-suite.desktop
+-        ${lime_suite_png_icons}
+-    DESTINATION share/Lime/Desktop
+-)
+-
+-########################################################################
+-# install/uninstall scripts
+-########################################################################
+-install(
+-    PROGRAMS
+-        install
+-        uninstall
+-    DESTINATION share/Lime/Desktop
+-)
++install(FILES lime-suite.desktop DESTINATION share/applications)
diff --git a/debian/patches/override-build-timestamp b/debian/patches/override-build-timestamp
new file mode 100644
index 0000000..8059af0
--- /dev/null
+++ b/debian/patches/override-build-timestamp
@@ -0,0 +1,24 @@
+Description: Substitute changelog entry time for build time
+ Upstream compiles a build time string into the program, which breaks
+ build reproducibility. This patch adds an override option to
+ CMakeLists.txt and the debian/rules uses this to pass in the date of
+ the latest debian/changelog entry.
+Author: Andreas Bombe <aeb at debian.org>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -55,7 +55,12 @@
+ endif()
+ 
+ set(LIME_SUITE_VERSION "${LIME_SUITE_LIBVER}-${LIME_SUITE_EXTVER}")
+-string(TIMESTAMP BUILD_TIMESTAMP "%Y-%m-%d")
++
++if (NOT OVERRIDE_TIMESTAMP)
++    message(FATAL_ERROR "OVERRIDE_TIMESTAMP not set")
++else (NOT OVERRIDE_TIMESTAMP)
++    string(TIMESTAMP BUILD_TIMESTAMP "${OVERRIDE_TIMESTAMP}")
++endif (NOT OVERRIDE_TIMESTAMP)
+ 
+ ########################################################################
+ ## compiler flags
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..369f890
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+override-build-timestamp
+version-string
+use-system-glew
+fix-icon-install
diff --git a/debian/patches/use-system-glew b/debian/patches/use-system-glew
new file mode 100644
index 0000000..6a92870
--- /dev/null
+++ b/debian/patches/use-system-glew
@@ -0,0 +1,60 @@
+Description: Change build to use system libglew instead of local copy
+Author: Andreas Bombe <aeb at debian.org>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/oglGraph/CMakeLists.txt
++++ b/src/oglGraph/CMakeLists.txt
+@@ -2,26 +2,20 @@
+ 	dlgMarkers.cpp
+ 	GLFont.cpp
+ 	OpenGLGraph.cpp
+-	glew/glew.c
+ )
+-include_directories(glew)
+-include_directories(glew/GL)
++
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(GLEW REQUIRED glew)
++include_directories(${GLEW_INCLUDE_DIRS})
+ 
+ #ignore warnings about narrowing: static font header
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ 	add_definitions(-Wno-narrowing)
+ endif()
+ 
+-ADD_DEFINITIONS(-DGLEW_STATIC)
+ add_library(oglGraph STATIC ${oglGraph_src_files})
+ target_include_directories(oglGraph PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+ 
+-if (APPLE)
+-	set(GL_LIBS "-framework OpenGL" "-framework GLUT")
+-elseif (UNIX)
+-	set(GL_LIBS GL)
+-endif()
+-
+ if(UNIX)
+-	target_link_libraries(oglGraph ${GL_LIBS} ${wxWidgets_LIBRARIES})
++	target_link_libraries(oglGraph ${GLEW_LIBRARIES} ${wxWidgets_LIBRARIES})
+ endif()
+--- a/src/oglGraph/OpenGLGraph.h
++++ b/src/oglGraph/OpenGLGraph.h
+@@ -7,7 +7,7 @@
+ #ifndef OPENGL_GRAPH
+ #define OPENGL_GRAPH
+ 
+-#include "glew/GL/glew.h"
++#include <GL/glew.h>
+ #if defined(__APPLE__)
+ #include <OpenGL/gl.h>
+ #else
+--- a/src/oglGraph/GLFont.h
++++ b/src/oglGraph/GLFont.h
+@@ -1,7 +1,7 @@
+ #ifndef GL_FONT_H
+ #define GL_FONT_H
+ 
+-#include "glew/GL/glew.h"
++#include <GL/glew.h>
+ #if defined(__APPLE__)
+ #include <OpenGL/gl.h>
+ #else
diff --git a/debian/patches/version-string b/debian/patches/version-string
new file mode 100644
index 0000000..628048d
--- /dev/null
+++ b/debian/patches/version-string
@@ -0,0 +1,49 @@
+Description: Allow overriding version string
+ Add an override option for the version string in CMakeLists.txt. The
+ original tries to combine its own string and EXTVER, so to make this
+ the Debian package version we would have to filter out the version
+ number from the changelog version.
+ .
+ Using the override we can simply pass the whole Debian version in
+ without using complex sed or awk filtering.
+Author: Andreas Bombe <aeb at debian.org>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -42,19 +42,23 @@
+ # number if there are changes within the major.minor release series
+ set(LIME_SUITE_SOVER "${VERSION_MAJOR}.${VERSION_MINOR}-1")
+ 
+-# packagers may specify -DLIME_SUITE_EXTVER="foo" to replace the git hash
+-if (NOT LIME_SUITE_EXTVER)
+-    include(${PROJECT_SOURCE_DIR}/cmake/GetGitRevisionDescription.cmake)
+-    get_git_head_revision(GITREFSPEC GITHASH)
+-    if (GITHASH)
+-        string(SUBSTRING "${GITHASH}" 0 8 GITHASH)
+-        set(LIME_SUITE_EXTVER "g${GITHASH}")
+-    else (GITHASH)
+-        set(LIME_SUITE_EXTVER "unknown")
+-    endif (GITHASH)
+-endif()
++if (NOT OVERRIDE_LIME_SUITE_VERSION)
++    # packagers may specify -DLIME_SUITE_EXTVER="foo" to replace the git hash
++    if (NOT LIME_SUITE_EXTVER)
++	include(${PROJECT_SOURCE_DIR}/cmake/GetGitRevisionDescription.cmake)
++	get_git_head_revision(GITREFSPEC GITHASH)
++	if (GITHASH)
++	    string(SUBSTRING "${GITHASH}" 0 8 GITHASH)
++	    set(LIME_SUITE_EXTVER "g${GITHASH}")
++	else (GITHASH)
++	    set(LIME_SUITE_EXTVER "unknown")
++	endif (GITHASH)
++    endif()
+ 
+-set(LIME_SUITE_VERSION "${LIME_SUITE_LIBVER}-${LIME_SUITE_EXTVER}")
++    set(LIME_SUITE_VERSION "${LIME_SUITE_LIBVER}-${LIME_SUITE_EXTVER}")
++else (NOT OVERRIDE_LIME_SUITE_VERSION)
++    set(LIME_SUITE_VERSION "${OVERRIDE_LIME_SUITE_VERSION}")
++endif (NOT OVERRIDE_LIME_SUITE_VERSION)
+ 
+ if (NOT OVERRIDE_TIMESTAMP)
+     message(FATAL_ERROR "OVERRIDE_TIMESTAMP not set")
diff --git a/debian/rules b/debian/rules
old mode 100644
new mode 100755
index 3e7e49a..97bd423
--- a/debian/rules
+++ b/debian/rules
@@ -1,21 +1,22 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
 # extract the architecture for setting the library path suffix
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 # extract the last section of the changelog version for extra info
-DEB_VERSION_EXTVER ?= $(shell dpkg-parsechangelog | grep ^Version: | rev | cut -d'-' -f1 | rev)
+DEB_VERSION ?= $(shell dpkg-parsechangelog -S Version)
+
+# use changelog timestamp instead of build timestamp for reproducible builds
+DEB_TIMESTAMP ?= $(shell date --date=@$(shell dpkg-parsechangelog -S Timestamp) +%Y-%m-%d)
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
-
-
 %:
-	dh $@ --buildsystem=cmake --parallel
+	dh $@ --buildsystem=cmake
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
@@ -23,4 +24,10 @@ override_dh_auto_configure:
 		-DCMAKE_AUTOSET_INSTALL_RPATH=FALSE \
 		-DUDEV_RULES_PATH=/lib/udev/rules.d \
 		-DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" \
-		-DLIME_SUITE_EXTVER="$(DEB_VERSION_EXTVER)"
+		-DOVERRIDE_LIME_SUITE_VERSION="$(DEB_VERSION)" \
+		-DOVERRIDE_TIMESTAMP="$(DEB_TIMESTAMP)"
+
+override_dh_installdocs:
+	dh_installdocs -p soapysdr-module-lms7 \
+                --link-doc=soapysdr0.5-2-module-lms7
+	dh_installdocs --remaining-packages
diff --git a/debian/soapysdr0.5-2-module-lms7.install b/debian/soapysdr0.5-2-module-lms7.install
index dd33c71..56a9b13 100644
--- a/debian/soapysdr0.5-2-module-lms7.install
+++ b/debian/soapysdr0.5-2-module-lms7.install
@@ -1,2 +1 @@
 usr/lib/*/SoapySDR/modules*
-usr/bin/LimeSuiteCalibrate

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/limesuite.git



More information about the pkg-hamradio-commits mailing list