diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8f38009 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +yms (0.2.1-1) unstable; urgency=medium + + * Initial Debian packaging. + + -- Thomas Hooge Fri, 28 Aug 2026 11:30:00 +0200 diff --git a/debian/config b/debian/config new file mode 100755 index 0000000..9e6b70d --- /dev/null +++ b/debian/config @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_input high yms/db-name || true +db_input high yms/db-user || true +db_input high yms/db-password || true + +db_go diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..be1ab09 --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: yms +Section: misc +Priority: optional +Maintainer: Thomas Hooge +Build-Depends: + debhelper-compat (= 13), + gettext +Standards-Version: 4.7.2 +Rules-Requires-Root: no + +Package: yms +Architecture: all +Depends: + mariadb-server, + python3, + python3-gi, + gir1.2-gtk-3.0, + gir1.2-rsvg-2.0, + python3-mysqldb, + python3-bcrypt +Description: Yacht Management Software + Yacht management software with native GTK GUI and web interface. diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..ff37da8 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README +INSTALL diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..d756264 --- /dev/null +++ b/debian/install @@ -0,0 +1,28 @@ +# Database +db/*.sql usr/share/yms/db/ + +# Native GUI +ymsgui.py usr/lib/yms/ +yms/*.py usr/lib/yms/yms/ + +# GTK UI +yms/ui/* usr/share/yms/ui/ + +# Web-GUI +webgui/*.php usr/share/yms/webgui/ +webgui/globals.inc usr/share/yms/webgui/ +webgui/lib/*.inc usr/share/yms/webgui/lib/ +webgui/css/* usr/share/yms/webgui/css/ +webgui/js/* usr/share/yms/webgui/js/ +webgui/img/* usr/share/yms/webgui/img/ +webgui/locale/de_DE/LC_MESSAGES/yms.mo usr/share/yms/webgui/locale/de_DE/LC_MESSAGES/ +webgui/sailboat.svg usr/share/yms/webgui/ + +# Shared static data +shapes/* usr/share/yms/shapes/ + +# Desktop entry +yms.desktop usr/share/applications/ + +# Idesktop link file +yms.lnk usr/share/yms/ diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..4b30111 --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +yms.1 diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..42f74ce --- /dev/null +++ b/debian/postinst @@ -0,0 +1,30 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_get yms/db-name +DB_NAME="$RET" + +db_get yms/db-user +DB_USER="$RET" + +db_get yms/db-password +DB_PASSWORD="$RET" + +echo "Configuring YMS..." +echo "Checking MariaDB database '${DB_NAME}'..." + +if mariadb -N -B -e "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '${DB_NAME}'" | grep -Fxq "${DB_NAME}"; then + echo "Database '${DB_NAME}' already exists." +else + echo "Database '${DB_NAME}' does not exist." + echo "Creating database '${DB_NAME}'..." + mariadb -e "CREATE DATABASE \`${DB_NAME}\`" + echo "Database '${DB_NAME}' created." + echo "Initializing database schema..." + mariadb "${DB_NAME}" < /usr/share/yms/db/mariadb.sql + mariadb "${DB_NAME}" < /usr/share/yms/db/minimal.sql + echo "Database schema initialized." +fi +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..b5292f4 --- /dev/null +++ b/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f + +# Standard Debian build +%: + dh $@ + +# No build via Makefile +override_dh_auto_build: + +# Generate translation and install generated files +override_dh_install: + mkdir -p debian/yms/usr/share/locale/de/LC_MESSAGES + msgfmt locale/de.po -o debian/yms/usr/share/locale/de/LC_MESSAGES/ymsgui.mo + install -D -m 0644 icons/yms.svg debian/yms/usr/share/icons/hicolor/scalable/apps/yms.svg + install -D -m 0644 icons/yms48.png debian/yms/usr/share/icons/hicolor/48x48/apps/yms.png + install -D -m 0644 icons/yms64.png debian/yms/usr/share/icons/hicolor/64x64/apps/yms.png + install -D -m 0755 debian/yms-launcher debian/yms/usr/bin/yms + dh_install + +# Installation is handled by debian/install +override_dh_auto_install: + +override_dh_installdebconf: + dh_installdebconf 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) diff --git a/debian/templates b/debian/templates new file mode 100644 index 0000000..ec464aa --- /dev/null +++ b/debian/templates @@ -0,0 +1,16 @@ +Template: yms/db-name +Type: string +Default: yms +Description: Database name: + Please enter the name of the MariaDB database used by YMS. + +Template: yms/db-user +Type: string +Default: ymsweb +Description: Web GUI database user: + Please enter the MariaDB user used by the YMS web interface. + +Template: yms/db-password +Type: password +Description: Web GUI database password: + Please enter the password for the YMS web interface database user. diff --git a/debian/yms-launcher b/debian/yms-launcher new file mode 100755 index 0000000..a233137 --- /dev/null +++ b/debian/yms-launcher @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/python3 /usr/lib/yms/ymsgui.py "$@"