From f77ef3ceb3b828724a60c4838b3524e8f7c5115b Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Sat, 14 Jul 2018 19:33:03 +0200 Subject: Debian packaging --- debian/changelog | 5 ++ debian/compat | 1 + debian/control | 65 ++++++++++++++++++ debian/copyright | 168 +++++++++++++++++++++++++++++++++++++++++++++ debian/rules | 13 ++++ debian/shopsystem.config | 16 +++++ debian/shopsystem.links | 20 ++++++ debian/shopsystem.postinst | 19 +++++ debian/shopsystem.postrm | 15 ++++ debian/shopsystem.prerm | 17 +++++ debian/shopsystem.sysuser | 1 + debian/source/format | 1 + 12 files changed, 341 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules create mode 100644 debian/shopsystem.config create mode 100644 debian/shopsystem.links create mode 100644 debian/shopsystem.postinst create mode 100644 debian/shopsystem.postrm create mode 100644 debian/shopsystem.prerm create mode 100644 debian/shopsystem.sysuser create mode 100644 debian/source/format (limited to 'debian') diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..c39a51e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +shopsystem (0.1) UNRELEASED; urgency=medium + + * Initial release. + + -- Sebastian Reichel Sat, 14 Jul 2018 18:27:59 +0200 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..479528b --- /dev/null +++ b/debian/control @@ -0,0 +1,65 @@ +Source: shopsystem +Section: misc +Priority: optional +Maintainer: Sebastian Reichel +Build-Depends: + debhelper (>= 11~), + dh-sysuser, + libarchive-dev, + libesmtp-dev, + libgee-0.8-dev, + libgmime-3.0-dev, + libgpgme11-dev, + libgstreamer1.0-dev, + libncursesw5-dev, + libncurses5-dev, + libpango1.0-dev, + librsvg2-dev, + libsqlite3-dev, + libsoup2.4-dev, + libssl-dev, + meson, + udev, + valac +Standards-Version: 4.1.5 + +Package: shopsystem +Architecture: any +Depends: ${misc:Depends}, + ${shlibs:Depends}, + console-setup, + dbconfig-common, + dbconfig-sqlite3 | dbconfig-no-thanks, + dbus-x11, + policykit-1, + fonts-lmodern, + kbd, + gstreamer1.0-alsa, + gstreamer1.0-plugins-base, + libjs-bootstrap, + libjs-c3, + libjs-d3, + libjs-jquery, + libjs-jquery-datatables, + libjs-jquery-flot, + libjs-jquery-mousewheel, + udev +Recommends: postfix, nginx +Suggests: sqlite3 +Description: Kiosk shop system for hackspaces + The software has been developed as a credit based system for members of + hackspaces. The system depends on a standard USB barcode scanner, which + is used to establish user sessions (by scanning CODE39 based user codes) + and buying products (by scanning their EAN). The members receive an invoice + at the end of the month, which is also send to the hackspace's treasurer + for further processing. + . + It is recommended to use nginx as reverse proxy for the web support + and postfix as local mail server, that queues any outgoing mail when + network/internet connection is temporarily unavailable. Also it's + recommended to start kernel with "console=tty1" parameter to avoid + systemd messages on the curses UI. + . + NOTE: This package does not follow Debian packaging guidelines in all + aspects and is not intended to be integrated into the official + Debian archive. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..8ec92f9 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,168 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://github.com/ktt-ol/serial-barcode-scanner/ + +Files: * +Copyright: 2012-2018, Sebastian Reichel + 2017-2018, Johannes Rudolph + 2015, Holger Cremer + 2018, Malte Modler +License: ISC + +Files: data/sound/system/* +Copyright: 2008, Corsica_S +License: CC-BY-3.0 + +Files: data/sound/user/sexy/* +Copyright: 2008, Corsica_S + 2009-2010, epanody +License: CC-BY-3.0 + +Files: data/sound/user/beep/error/buzzer.ogg +Copyright: 2008, guitarguy1985 +License: CC0 + +Files: data/sound/user/beep/login/toycaralarm.ogg data/sound/user/beep/purchase/beep.ogg +Copyright: 2007, AMPUL + 2008, KorgMS2000B +License: CC-sampling+ + +Files: data/sound/user/beep/logout/cha\ ching.ogg data/sound/user/beep/purchase/camera.ogg +Copyright: 2009, creek23 + 2007, FreqMan +License: CC-BY-3.0 + +Files: data/sound/user/dude/* +Copyright: ecfike +License: CC0 + +Files: data/sound/user/girlfriend/* +Copyright: 2009-2010, epanody +License: CC-BY-3.0 + +Files: data/sound/user/japanese/* +Copyright: 2015, yugi16dm + 2014, Reitanna +License: CC0 + +Files: data/sound/user/robot/* +Copyright: 2009, liquidhot + 2010, epanody +License: CC-BY-3.0 + +Files: data/templates/js/sorttable.js +Copyright: 2007, Stuart Langridge +License: Expat + +Files: data/templates/js/jquery.js +Copyright: 2012, jQuery Foundation and contributors +License: Expat + +Files: data/templates/js/jquery.mousewheel.js +Copyright: 2011, Brandon Aaron (http://brandonaaron.net) +License: Expat + +Files: data/templates/js/jquery.flot.js + data/templates/js/jquery.flot.navigate.js + data/templates/js/jquery.flot.selection.js +Copyright: 2007-2012, Ole Laursen + 2007-2012, IOLA + 2008, Three Dub Media (http://threedubmedia.com) +License: Expat + +Files: data/templates/js/jquery.flot.pie.js +Copyright: 2009, Brian Medendorp + 2009, btburnett3 + 2009, Anthony Aragues + 2009, Xavi Ivars +License: Expat + +Files: data/templates/css/bootstrap.css + data/templates/js/bootstrap.js +Copyright: Bootstrap +License: Apache-2.0 + +Files: data/templates/img/glyphicons-halflings.png + data/templates/img/glyphicons-halflings-white.png +Copyright: Glyphicons +License: CC-BY-3.0 + + +License: ISC + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +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 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. + +License: 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 + . + /usr/share/common-licenses/Apache-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. + +License: CC-BY-3.0 + Licensed under the Creative Commons CC-BY License, Version 3.0; + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://creativecommons.org/licenses/by/3.0/legalcode + . + There exists an simple overview of the licenses conditions on + . + http://creativecommons.org/licenses/by/3.0/ + . + Basically it allows you to use, modify and share the files, as long + as proper attribution is given. + +License: CC0 + Licensed under the Creative Commons CC0 License, Version 1.0; + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://creativecommons.org/publicdomain/zero/1.0/legalcode + . + There exists an simple overview of the licenses conditions on + . + https://creativecommons.org/publicdomain/zero/1.0/ + . + This work is basically public domain. + +License: CC-sampling+ + Licensed under the Creative Commons CC-Sampling+ License, Version 1.0; + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://creativecommons.org/licenses/sampling+/1.0/legalcode + . + There exists an simple overview of the licenses conditions on + . + https://creativecommons.org/licenses/sampling+/1.0/ diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..ac0c346 --- /dev/null +++ b/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + +%: + dh $@ --buildsystem=meson --with=sysuser + +override_dh_install: + dh_install + mkdir -p debian/shopsystem/usr/share/dbconfig-common/data/shopsystem/install + cat data/sql/tables.sql data/sql/trigger.sql data/sql/views.sql > debian/shopsystem/usr/share/dbconfig-common/data/shopsystem/install/sqlite3 + find debian/shopsystem/usr/share/shopsystem/sounds -name LICENSE -exec rm {} \; diff --git a/debian/shopsystem.config b/debian/shopsystem.config new file mode 100644 index 0000000..53aeb36 --- /dev/null +++ b/debian/shopsystem.config @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -f /usr/share/dbconfig-common/dpkg/config ]; then + dbc_dbtypes="sqlite3" + dbc_basepath="/var/lib/shopsystem" + dbc_dbname="shopsystem.db" + . /usr/share/dbconfig-common/dpkg/config + dbc_go shopsystem $@ +fi + +exit 0 diff --git a/debian/shopsystem.links b/debian/shopsystem.links new file mode 100644 index 0000000..a3e559d --- /dev/null +++ b/debian/shopsystem.links @@ -0,0 +1,20 @@ +/usr/share/javascript/c3/c3.min.css /usr/share/shopsystem/templates/css/c3.css +/usr/share/javascript/c3/c3.min.js /usr/share/shopsystem/templates/js/c3.js +/usr/share/javascript/d3/d3.min.js /usr/share/shopsystem/templates/js/d3.js +/usr/share/javascript/jquery/jquery.min.js /usr/share/shopsystem/templates/js/jquery.js +/usr/share/javascript/jquery-flot/jquery.flot.min.js /usr/share/shopsystem/templates/js/jquery.flot.js +/usr/share/javascript/jquery-flot/jquery.flot.navigate.min.js /usr/share/shopsystem/templates/js/jquery.flot.navigate.js +/usr/share/javascript/jquery-flot/jquery.flot.pie.min.js /usr/share/shopsystem/templates/js/jquery.flot.pie.js +/usr/share/javascript/jquery-flot/jquery.flot.selection.min.js /usr/share/shopsystem/templates/js/jquery.flot.selection.js +/usr/share/javascript/jquery-mousewheel/jquery.mousewheel.min.js /usr/share/shopsystem/templates/js/jquery.mousewheel.js +/usr/share/javascript/bootstrap/css/bootstrap.min.css /usr/share/shopsystem/templates/css/bootstrap.css +/usr/share/javascript/bootstrap/css/bootstrap-theme.min.css /usr/share/shopsystem/templates/css/bootstrap-theme.css +/usr/share/javascript/bootstrap/js/bootstrap.min.js /usr/share/shopsystem/templates/js/bootstrap.js +/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.eot /usr/share/shopsystem/templates/fonts/glyphicons-halflings-regular.eot +/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.svg /usr/share/shopsystem/templates/fonts/glyphicons-halflings-regular.svg +/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.ttf /usr/share/shopsystem/templates/fonts/glyphicons-halflings-regular.ttf +/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.woff /usr/share/shopsystem/templates/fonts/glyphicons-halflings-regular.woff +/usr/share/javascript/bootstrap/fonts/glyphicons-halflings-regular.woff2 /usr/share/shopsystem/templates/fonts/glyphicons-halflings-regular.woff2 +/usr/share/javascript/jquery-datatables/css/dataTables.bootstrap.min.css /usr/share/shopsystem/templates/css/dataTables.bootstrap.css +/usr/share/javascript/jquery-datatables/dataTables.bootstrap.min.js /usr/share/shopsystem/templates/js/dataTables.bootstrap.js +/usr/share/javascript/jquery-datatables/jquery.dataTables.min.js /usr/share/shopsystem/templates/js/jquery.dataTables.js diff --git a/debian/shopsystem.postinst b/debian/shopsystem.postinst new file mode 100644 index 0000000..1238405 --- /dev/null +++ b/debian/shopsystem.postinst @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +#DEBHELPER# + +# source debconf stuff +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -f /usr/share/dbconfig-common/dpkg/postinst ]; then + . /usr/share/dbconfig-common/dpkg/postinst + dbc_dbfile_owner="shop:shop" + dbc_go shopsystem "$@" +fi + +adduser shop audio + +exit 0 diff --git a/debian/shopsystem.postrm b/debian/shopsystem.postrm new file mode 100644 index 0000000..e3c7621 --- /dev/null +++ b/debian/shopsystem.postrm @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then + . /usr/share/dbconfig-common/dpkg/postrm + dbc_go shopsystem $@ +fi + +#DEBHELPER# + +exit 0 diff --git a/debian/shopsystem.prerm b/debian/shopsystem.prerm new file mode 100644 index 0000000..5a1612b --- /dev/null +++ b/debian/shopsystem.prerm @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ -f /usr/share/dbconfig-common/dpkg/prerm ]; then + . /usr/share/dbconfig-common/dpkg/prerm + dbc_go shopsystem $@ +fi + +deluser shop audio || true + +#DEBHELPER# + +exit 0 diff --git a/debian/shopsystem.sysuser b/debian/shopsystem.sysuser new file mode 100644 index 0000000..732e5d6 --- /dev/null +++ b/debian/shopsystem.sysuser @@ -0,0 +1 @@ +shop defaults diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- cgit v1.2.3