diff --git a/cmake/packaging/deb/changelog b/cmake/packaging/deb/changelog index ec65e6744..24bb0152b 100644 --- a/cmake/packaging/deb/changelog +++ b/cmake/packaging/deb/changelog @@ -1,5 +1,5 @@ -stlink (1.6.1+ds-1) unstable; urgency=medium +stlink (1.6.1) unstable; urgency=medium * Initial cpack-based package release for Debian/Ubuntu - -- Nightwalker-87 Sat, 06 Jun 2020 00:00:00 +0100 + -- Nightwalker-87 Mon, 01 Jun 2020 00:00:00 +0100 diff --git a/cmake/packaging/deb/control b/cmake/packaging/deb/control index 9f17b0042..759668ba6 100644 --- a/cmake/packaging/deb/control +++ b/cmake/packaging/deb/control @@ -1,9 +1,10 @@ Source: stlink +Priority: optional Maintainer: stlink-org Build-Depends: cmake, dh-cmake, debhelper (>= 9), libusb-1.0-0-dev, libgtk-3-dev Standards-Version: 4.5.0 +Rules-Requires-Root: no Section: electronics -Priority: optional Homepage: https://github.com/stlink-org/stlink Vcs-Git: https://github.com/stlink-org/stlink.git Vcs-Browser: https://github.com/stlink-org/stlink diff --git a/cmake/packaging/deb/copyright b/cmake/packaging/deb/copyright index fb1c49d74..f5dfdc51b 100644 --- a/cmake/packaging/deb/copyright +++ b/cmake/packaging/deb/copyright @@ -1,7 +1,8 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: stlink -Upstream-Contact: stlink-org +Upstream-Contact: Nightwalker-87 Source: https://github.com/stlink-org/stlink +Files-Excluded: stlinkv1_macos_driver Files: * Copyright: 2011-2020 stlink-org @@ -10,7 +11,7 @@ Copyright: 2011-2020 stlink-org Jerry Jacobs [xor-gate] [Nightwalker-87] and many others... - A list of contributors can be found in "contributors.txt". + An extended list of contributors can be found in "contributors.txt". License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 000000000..7624d1c9b --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,10 @@ +.debhelper +files +debhelper-build-stamp +*.log +*.substvars +libstlink-dev +libstlink +stlink-gui +stlink-tools +tmp diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..c54850340 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,74 @@ +stlink (1.6.1+ds-2) unstable; urgency=medium + + * Update d/copyright to remove GPL-2+ stanza about flashloaders + * Update upstream URLs for new Github org + * Patch CMake's hard-coded define of XML gui file location (Closes: + #963219) + + -- Luca Boccassi Sun, 21 Jun 2020 13:41:37 +0100 + +stlink (1.6.1+ds-1) unstable; urgency=medium + + * Merge tag 'v1.6.1' into debian + * Update Files-Excluded in d/copyright for new layout + * Fix d/watch intermediary file name + * Drop cross.patch, merged upstream in v1.6.1 + * Bump Build-Depends to cmake >= 3.4.2 + * Add new symbols from upstream version 1.6.1 + * Adjust install files, some files moved + * Remove unused variable from d/rules + * Generate pkgconfig file from d/rules, upstream doesn't do it + * Switch to debhelper-compat 12 + + -- Luca Boccassi Sat, 06 Jun 2020 14:44:54 +0100 + +stlink (1.6.0+ds-1) unstable; urgency=medium + + * Merge tag 'v1.6.0' into debian + * Bump Standards-Version to 4.5.0, no changes. + * Update libstlink1 symbols file for 1.6.0. + + -- Luca Boccassi Tue, 25 Feb 2020 22:08:33 +0000 + +stlink (1.5.1+ds-2) unstable; urgency=medium + + * Mark library packages as Multi-Arch: same. + * Apply cross.patch to fix cross-compiling the GUI. Thanks Helmut for + the patch! (Closes: #941320) + * Vcs-Git: add -b debian + * Set Rules-Requires-Root: no + * Bump Standards-Version to 4.4.0 + + -- Luca Boccassi Sun, 29 Sep 2019 12:50:58 +0100 + +stlink (1.5.1+ds-1) unstable; urgency=medium + + * Merge tag 'v1.5.1' into debian. See upstream changelog for info: + https://github.com/stlink-org/stlink/releases/tag/v1.5.1 + * Mark packages as linux-any, other systems not supported. + + -- Luca Boccassi Fri, 28 Sep 2018 10:26:39 +0100 + +stlink (1.5.0+ds-1) unstable; urgency=medium + + * Upload to unstable. (Closes: #869421) + + -- Luca Boccassi Fri, 16 Mar 2018 16:56:17 +0000 + +stlink (1.4.0) unstable; urgency=low + + -- Andrew 'Necromant' Andrianov Sat, 01 Jul 2017 00:00:00 +0000 + +stlink (1.3.1) unstable; urgency=low + + -- Andrew 'Necromant' Andrianov Sat, 25 Feb 2017 00:00:00 +0000 + +stlink (1.3.0) unstable; urgency=low + + -- Andrew 'Necromant' Andrianov Sat, 28 Jan 2017 00:00:00 +0000 + +stlink (1.2.1) unstable; urgency=low + + * Initial Debian-Packaged Release. + + -- Andrew 'Necromant' Andrianov Sat, 09 Jul 2016 23:16:07 +0300 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..598e0e89f --- /dev/null +++ b/debian/control @@ -0,0 +1,44 @@ +Source: stlink +Priority: optional +Maintainer: Luca Boccassi +Build-Depends: debhelper-compat (= 12), cmake (>= 3.4.2), libusb-1.0-0-dev, libgtk-3-dev +Standards-Version: 4.5.0 +Rules-Requires-Root: no +Section: electronics +Homepage: https://github.com/stlink-org/stlink +Vcs-Git: https://github.com/bluca/stlink.git -b debian +Vcs-Browser: https://github.com/bluca/stlink + +Package: libstlink-dev +Section: libdevel +Architecture: linux-any +Multi-Arch: same +Depends: libstlink1 (= ${binary:Version}), ${misc:Depends} +Description: Open source STM32 MCU programming toolset. + . + This package contains the development files for stlink. + +Package: libstlink1 +Section: libs +Architecture: linux-any +Multi-Arch: same +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Open source STM32 MCU programming toolset. + . + This package contains the shared library for stlink. + +Package: stlink-tools +Architecture: linux-any +Depends: libstlink1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Open source STM32 MCU programming toolset. + . + This package contains commandline utilities for stlink, modprobe- and + udev-rules. + +Package: stlink-gui +Architecture: linux-any +Depends: libstlink1 (= ${binary:Version}), stlink-tools (= ${binary:Version}), + ${shlibs:Depends}, ${misc:Depends} +Description: Open source STM32 MCU programming toolset. + . + This package contains a GUI for stlink. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..8329cc250 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,37 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: stlink +Upstream-Contact: Luca Boccassi +Source: https://github.com/stlink-org/stlink +Files-Excluded: stlinkv1_macos_driver + +Files: * +Copyright: 2011-2020 stlink-org + Martin Capitanio [capnm] + Fabien Le Mentec [texane] + Jerry Jacobs [xor-gate] + [Nightwalker-87] + and many others... + An extended list of contributors can be found in "contributors.txt". +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. 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. + 3. Neither the name of the copyright holder 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 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. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 000000000..418e536e9 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,7 @@ +[buildpackage] +upstream-tag = %(version)s +debian-branch = debian + +[dch] +git-log = --first-parent +customizations = /usr/share/doc/git-buildpackage/examples/wrap_cl.py diff --git a/debian/libstlink-dev.install b/debian/libstlink-dev.install new file mode 100644 index 000000000..4e0e0d184 --- /dev/null +++ b/debian/libstlink-dev.install @@ -0,0 +1,4 @@ +usr/include/* +usr/lib/*/lib*.a +usr/lib/*/pkgconfig/* +usr/lib/*/lib*.so diff --git a/debian/libstlink1.install b/debian/libstlink1.install new file mode 100644 index 000000000..3ddde5841 --- /dev/null +++ b/debian/libstlink1.install @@ -0,0 +1 @@ +usr/lib/*/lib*.so.* diff --git a/debian/libstlink1.symbols b/debian/libstlink1.symbols new file mode 100644 index 000000000..159f27d0f --- /dev/null +++ b/debian/libstlink1.symbols @@ -0,0 +1,141 @@ +libstlink.so.1 libstlink1 #MINVER# + Md5Calculate@Base 1.6.1 + Md5Finalise@Base 1.6.1 + Md5Initialise@Base 1.6.1 + Md5Update@Base 1.6.1 + _parse_version@Base 1.5.0 + _stlink_sg_close@Base 1.5.0 + _stlink_sg_core_id@Base 1.5.0 + _stlink_sg_current_mode@Base 1.5.0 + _stlink_sg_enter_jtag_mode@Base 1.5.0 + _stlink_sg_enter_swd_mode@Base 1.5.0 + _stlink_sg_exit_debug_mode@Base 1.5.0 + _stlink_sg_exit_dfu_mode@Base 1.5.0 + _stlink_sg_force_debug@Base 1.5.0 + _stlink_sg_jtag_reset@Base 1.5.0 + _stlink_sg_read_all_regs@Base 1.5.0 + _stlink_sg_read_debug32@Base 1.5.0 + _stlink_sg_read_mem32@Base 1.5.0 + _stlink_sg_read_reg@Base 1.5.0 + _stlink_sg_reset@Base 1.5.0 + _stlink_sg_run@Base 1.5.0 + _stlink_sg_status@Base 1.5.0 + _stlink_sg_step@Base 1.5.0 + _stlink_sg_version@Base 1.5.0 + _stlink_sg_write_debug32@Base 1.5.0 + _stlink_sg_write_mem32@Base 1.5.0 + _stlink_sg_write_mem8@Base 1.5.0 + _stlink_sg_write_reg@Base 1.5.0 + _stlink_usb_close@Base 1.5.0 + _stlink_usb_core_id@Base 1.5.0 + _stlink_usb_current_mode@Base 1.5.0 + _stlink_usb_enter_swd_mode@Base 1.5.0 + _stlink_usb_exit_debug_mode@Base 1.5.0 + _stlink_usb_exit_dfu_mode@Base 1.5.0 + _stlink_usb_force_debug@Base 1.5.0 + _stlink_usb_get_rw_status@Base 1.6.1 + _stlink_usb_jtag_reset@Base 1.5.0 + _stlink_usb_read_all_regs@Base 1.5.0 + _stlink_usb_read_all_unsupported_regs@Base 1.5.0 + _stlink_usb_read_debug32@Base 1.5.0 + _stlink_usb_read_mem32@Base 1.5.0 + _stlink_usb_read_reg@Base 1.5.0 + _stlink_usb_read_unsupported_reg@Base 1.5.0 + _stlink_usb_reset@Base 1.5.0 + _stlink_usb_run@Base 1.5.0 + _stlink_usb_set_swdclk@Base 1.5.0 + _stlink_usb_status@Base 1.5.0 + _stlink_usb_status_v2@Base 1.6.1 + _stlink_usb_step@Base 1.5.0 + _stlink_usb_target_voltage@Base 1.5.0 + _stlink_usb_version@Base 1.5.0 + _stlink_usb_write_debug32@Base 1.5.0 + _stlink_usb_write_mem32@Base 1.5.0 + _stlink_usb_write_mem8@Base 1.5.0 + _stlink_usb_write_reg@Base 1.5.0 + _stlink_usb_write_unsupported_reg@Base 1.5.0 + calculate_F4_sectornum@Base 1.5.0 + calculate_F7_sectornum@Base 1.5.0 + calculate_L4_page@Base 1.5.0 + is_bigendian@Base 1.5.0 + read_uint16@Base 1.5.0 + read_uint32@Base 1.5.0 + send_recv@Base 1.5.0 + send_usb_data_only@Base 1.5.0 + send_usb_mass_storage_command@Base 1.5.0 + stlink_calculate_pagesize@Base 1.5.0 + stlink_chip_id@Base 1.5.0 + stlink_chipid_get_params@Base 1.5.0 + stlink_close@Base 1.5.0 + stlink_clr_hw_bp@Base 1.5.0 + stlink_core_id@Base 1.5.0 + stlink_core_stat@Base 1.5.0 + stlink_cpu_id@Base 1.5.0 + stlink_current_mode@Base 1.5.0 + stlink_enter_swd_mode@Base 1.5.0 + stlink_erase_flash_mass@Base 1.5.0 + stlink_erase_flash_page@Base 1.5.0 + stlink_exit_debug_mode@Base 1.5.0 + stlink_exit_dfu_mode@Base 1.5.0 + stlink_fcheck_flash@Base 1.5.0 + stlink_flash_loader_init@Base 1.5.0 + stlink_flash_loader_run@Base 1.5.0 + stlink_flash_loader_write_to_sram@Base 1.5.0 + stlink_force_debug@Base 1.5.0 + stlink_fread@Base 1.5.0 + stlink_fwrite_flash@Base 1.5.0 + stlink_fwrite_option_bytes@Base 1.6.0 +#MISSING: 1.6.1# stlink_fwrite_option_bytes_32bit@Base 1.6.0 + stlink_fwrite_sram@Base 1.5.0 + stlink_get_erased_pattern@Base 1.5.0 + stlink_is_core_halted@Base 1.5.0 + stlink_jtag_reset@Base 1.5.0 + stlink_load_device_params@Base 1.5.0 + stlink_mwrite_flash@Base 1.5.0 + stlink_mwrite_sram@Base 1.5.0 + stlink_open_usb@Base 1.5.0 + stlink_parse_ihex@Base 1.5.0 + stlink_print_data@Base 1.5.0 + stlink_probe_usb@Base 1.5.0 + stlink_probe_usb_free@Base 1.5.0 + stlink_q@Base 1.5.0 + stlink_read_all_regs@Base 1.5.0 + stlink_read_all_unsupported_regs@Base 1.5.0 + stlink_read_debug32@Base 1.5.0 + stlink_read_mem32@Base 1.5.0 + stlink_read_option_bytes32@Base 1.6.1 + stlink_read_option_bytes_Gx@Base 1.6.1 + stlink_read_option_bytes_f2@Base 1.6.0 + stlink_read_option_bytes_f4@Base 1.6.0 + stlink_read_option_bytes_generic@Base 1.6.1 + stlink_read_reg@Base 1.5.0 + stlink_read_unsupported_reg@Base 1.5.0 + stlink_reset@Base 1.5.0 + stlink_run@Base 1.5.0 + stlink_run_at@Base 1.5.0 + stlink_set_hw_bp@Base 1.5.0 + stlink_set_swdclk@Base 1.5.0 + stlink_stat@Base 1.5.0 + stlink_status@Base 1.5.0 + stlink_step@Base 1.5.0 + stlink_target_voltage@Base 1.5.0 + stlink_v1_open@Base 1.5.0 + stlink_v1_open_inner@Base 1.5.0 + stlink_verify_write_flash@Base 1.5.0 + stlink_version@Base 1.5.0 + stlink_write_debug32@Base 1.5.0 + stlink_write_dreg@Base 1.5.0 + stlink_write_flash@Base 1.5.0 + stlink_write_mem32@Base 1.5.0 + stlink_write_mem8@Base 1.5.0 + stlink_write_option_bytes32@Base 1.6.1 + stlink_write_option_bytes@Base 1.6.0 + stlink_write_reg@Base 1.5.0 + stlink_write_unsupported_reg@Base 1.5.0 + stm32l1_write_half_pages@Base 1.5.0 + ugly_init@Base 1.5.0 + ugly_libusb_log_level@Base 1.6.1 + ugly_log@Base 1.5.0 + write_buffer_to_sram@Base 1.5.0 + write_uint16@Base 1.5.0 + write_uint32@Base 1.5.0 diff --git a/debian/patches/guipath.patch b/debian/patches/guipath.patch new file mode 100644 index 000000000..d3effc92b --- /dev/null +++ b/debian/patches/guipath.patch @@ -0,0 +1,11 @@ +--- a/src/stlink-gui/CMakeLists.txt ++++ b/src/stlink-gui/CMakeLists.txt +@@ -32,7 +32,7 @@ + add_executable(stlink-gui ${GUI_SOURCES}) + install(FILES stlink-gui.ui DESTINATION ${CMAKE_INSTALL_BINDIR}) + set_target_properties(stlink-gui PROPERTIES +- COMPILE_DEFINITIONS STLINK_UI_DIR="${CMAKE_INSTALL_PREFIX}/bin") ++ COMPILE_DEFINITIONS STLINK_UI_DIR="/usr/share/stlink") + target_link_libraries(stlink-gui ${STLINK_LIB_SHARED} ${SSP_LIB} ${GTK3_LDFLAGS}) + install(TARGETS stlink-gui DESTINATION ${CMAKE_INSTALL_BINDIR}) + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000..1fdcf9977 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +guipath.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..512bd533f --- /dev/null +++ b/debian/rules @@ -0,0 +1,23 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#DH_VERBOSE = 1 + +# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk + +# see FEATURE AREAS in dpkg-buildflags(1) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +%: + dh $@ --buildsystem cmake + +override_dh_auto_configure: + dh_auto_configure -- \ + -DSTLINK_UDEV_RULES_DIR='/lib/udev/rules.d' + +override_dh_auto_install: + dh_auto_install + mkdir -p $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig + sed -e "s/@VERSION@/$(DEB_VERSION_UPSTREAM)/" -e "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/" $(CURDIR)/debian/stlink.pc.in > $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/stlink.pc diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 000000000..506210d2c --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore=stlinkv1_macos_driver diff --git a/debian/stlink-gui.install b/debian/stlink-gui.install new file mode 100644 index 000000000..96c55213f --- /dev/null +++ b/debian/stlink-gui.install @@ -0,0 +1,4 @@ +/usr/bin/stlink-gui +/usr/share/stlink/stlink-gui.ui +/usr/share/applications/stlink-gui.desktop +/usr/share/icons/hicolor/scalable/apps/stlink-gui.svg diff --git a/debian/stlink-tools.install b/debian/stlink-tools.install new file mode 100644 index 000000000..ca875a0e6 --- /dev/null +++ b/debian/stlink-tools.install @@ -0,0 +1,3 @@ +/usr/bin/st-* +lib/udev/rules.d/*.rules +etc/modprobe.d/*.conf diff --git a/debian/stlink-tools.manpages b/debian/stlink-tools.manpages new file mode 100644 index 000000000..049509abe --- /dev/null +++ b/debian/stlink-tools.manpages @@ -0,0 +1,3 @@ +usr/share/stlink/man/man1/st-flash.1 +usr/share/stlink/man/man1/st-info.1 +usr/share/stlink/man/man1/st-util.1 diff --git a/debian/stlink.pc.in b/debian/stlink.pc.in new file mode 100644 index 000000000..9f740ba09 --- /dev/null +++ b/debian/stlink.pc.in @@ -0,0 +1,10 @@ +prefix=/usr +includedir=${prefix}/include/stlink +libdir=${prefix}/lib/@DEB_HOST_MULTIARCH@ + +Name: stlink +Description: Open source STM32 MCU programming toolset +Version: @VERSION@ +Requires: libusb-1.0 +Libs: -L${libdir} -lstlink +Cflags: -I${includedir} diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..6eb6b78d6 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=dversionmangle=s/\+ds$//,repacksuffix=+ds,filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/stlink-$1\.tar\.gz/ \ + https://github.com/stlink-org/stlink/tags .*/v?(\d\S+)\.tar\.gz