From 2ff7175056cef292380b00c81b47617cf142fb26 Mon Sep 17 00:00:00 2001 From: Evgeny S Maksimov Date: Wed, 2 Feb 2022 22:17:23 +0300 Subject: [PATCH 1/2] Debianization --- debian/ch341eeprom.install | 2 ++ debian/changelog | 5 +++++ debian/control | 14 +++++++++++++ debian/postinst | 40 ++++++++++++++++++++++++++++++++++++++ debian/postrm | 38 ++++++++++++++++++++++++++++++++++++ debian/rules | 25 ++++++++++++++++++++++++ debian/source/format | 1 + 7 files changed, 125 insertions(+) create mode 100644 debian/ch341eeprom.install create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/postinst create mode 100644 debian/postrm create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/debian/ch341eeprom.install b/debian/ch341eeprom.install new file mode 100644 index 0000000..586270f --- /dev/null +++ b/debian/ch341eeprom.install @@ -0,0 +1,2 @@ +ch341eeprom usr/bin +99-CH341.rules etc/udev/rules.d diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8998645 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +ch341eeprom (0.1-0) unstable; urgency=medium + + * Initial release + + -- Evgeny S Maksimov Wed, 02 Feb 2022 19:57:22 +0300 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..61f0372 --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: ch341eeprom +Section: universe/electronics +Priority: optional +Maintainer: Evgeny S Maksimov +Build-Depends: debhelper-compat (= 11), libusb-1.0-0-dev, clang +Standards-Version: 4.5.1 +Vcs-Browser: https://github.com/command-tab/ch341eeprom +Vcs-Git: https://github.com/command-tab/ch341eeprom.git +Rules-Requires-Root: no + +Package: ch341eeprom +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: A libusb based programming tool for 24Cxx EEPROMs using the CH341A I2C diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..fabd4a5 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,40 @@ +#!/bin/sh +# postinst script for ch341eeprom +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + udevadm control --reload-rules + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..b085be6 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,38 @@ +#!/bin/sh +# postrm script for ch341eeprom +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see https://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + udevadm control --reload-rules + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..59ea751 --- /dev/null +++ b/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- \ +# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) From af9d0e44f7ea94a56be5f295f1223741dbf08931 Mon Sep 17 00:00:00 2001 From: Evgeny S Maksimov Date: Wed, 2 Feb 2022 22:37:04 +0300 Subject: [PATCH 2/2] Bump version --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8998645..d899d96 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ch341eeprom (0.1-0) unstable; urgency=medium +ch341eeprom (0.5-0) unstable; urgency=medium * Initial release