#!/bin/sh
#
#    Copyright (C) 2026  Luis Guzman <ark@switnet.org>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#


VERSION=0

. ./config

# Add the build missing dependency
sed -i 's/libzxing-dev/qtmultimedia5-dev, libzxing-dev/' debian/control

# Restore the base scanner library into the main package
echo "usr/lib/*/libKF5PrisonScanner.so.*" >> debian/libkf5prison5.install
echo "usr/lib/*/libKF5PrisonScanner.so" >> debian/libkf5prison-dev.install

# Restore the QML camera plugin into the QML package
echo "usr/lib/*/qt5/qml/org/kde/prison/scanner/" >> debian/qml-module-org-kde-prison.install

# Restore the C++ development headers into the dev package
echo "usr/include/KF5/PrisonScanner/" >> debian/libkf5prison-dev.install

# Restore the API documentation into the doc package
echo "usr/share/qt5/doc/KF5PrisonScanner.*" >> debian/libkf5prison-doc.install

changelog "Restore prisonscanner library and QML module from build directory."

package
