From 93095c630c1f258b01bbd6657d1efa88b52a470a Mon Sep 17 00:00:00 2001 From: Thomas Hooge Date: Fri, 28 Aug 2026 18:24:36 +0200 Subject: [PATCH] More work on Debian packaging --- config/apache/yms.conf | 12 ++++++++++++ db/minimal.sql | 1 + debian/config | 2 ++ debian/control | 8 +++++++- debian/install | 3 +++ debian/postinst | 6 ++++++ debian/rules | 1 + debian/templates | 9 +++++++++ 8 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 config/apache/yms.conf diff --git a/config/apache/yms.conf b/config/apache/yms.conf new file mode 100644 index 0000000..668cb0f --- /dev/null +++ b/config/apache/yms.conf @@ -0,0 +1,12 @@ +Alias /yms /usr/share/yms/webgui + + + AllowOverride None + Require all granted + + + Require all denied + + + DirectoryIndex index.php + diff --git a/db/minimal.sql b/db/minimal.sql index ba161de..d6ab09f 100644 --- a/db/minimal.sql +++ b/db/minimal.sql @@ -20,6 +20,7 @@ INSERT INTO settings (userid, sno, valint) VALUES /* setting descriptions */ INSERT INTO settings (userid, sno, valstr) VALUES +(-1, 0, 'database schema version'), (-1, 1, 'vessel id'), (-1, 2, 'date format'), (-1, 3, 'user menu'), diff --git a/debian/config b/debian/config index 9e6b70d..1b0b5e6 100755 --- a/debian/config +++ b/debian/config @@ -7,4 +7,6 @@ db_input high yms/db-name || true db_input high yms/db-user || true db_input high yms/db-password || true +db_input high yms/webgui || true + db_go diff --git a/debian/control b/debian/control index be1ab09..7ac737e 100644 --- a/debian/control +++ b/debian/control @@ -12,11 +12,17 @@ Package: yms Architecture: all Depends: mariadb-server, + httpd, python3, python3-gi, gir1.2-gtk-3.0, gir1.2-rsvg-2.0, python3-mysqldb, - python3-bcrypt + python3-bcrypt, + php (>= 8.0), + php-mysql, + php-xml, + gettext, + mupdf-tools Description: Yacht Management Software Yacht management software with native GTK GUI and web interface. diff --git a/debian/install b/debian/install index d756264..f67e409 100644 --- a/debian/install +++ b/debian/install @@ -26,3 +26,6 @@ yms.desktop usr/share/applications/ # Idesktop link file yms.lnk usr/share/yms/ + +# Webserver +config/apache/yms.conf /etc/apache2/conf-available/ diff --git a/debian/postinst b/debian/postinst index 42f74ce..a8c1368 100755 --- a/debian/postinst +++ b/debian/postinst @@ -27,4 +27,10 @@ else mariadb "${DB_NAME}" < /usr/share/yms/db/minimal.sql echo "Database schema initialized." fi + +db_get yms/webgui +if [ "$RET" = "true" ]; then + # use web gui, depends on available web server +fi + exit 0 diff --git a/debian/rules b/debian/rules index d36aced..53571db 100755 --- a/debian/rules +++ b/debian/rules @@ -17,6 +17,7 @@ override_dh_install: install -D -m 0755 debian/yms-launcher debian/yms/usr/bin/yms dh_install sed -i 's#@PREFIX@#/usr#g' debian/yms/usr/share/applications/yms.desktop + sed -i 's#@PREFIX@#/usr#g' debian/yms/usr/share/yms/yms.lnk # Installation is handled by debian/install override_dh_auto_install: diff --git a/debian/templates b/debian/templates index ec464aa..2675e96 100644 --- a/debian/templates +++ b/debian/templates @@ -14,3 +14,12 @@ Template: yms/db-password Type: password Description: Web GUI database password: Please enter the password for the YMS web interface database user. + +Template: yms/webgui +Type: boolean +Default: false +Description: Enable the YMS web interface? + The YMS package includes a web interface that can be served + by a web server. + . + Do you want to enable the web interface?