#!/usr/bin/sh
#----------------------------------------------------------------------------
# /tmp/preinstall.sh - libhplip0 preinstallation
#
# Creation   :  2026-02-25 holbru
# Last update:  $Id$
#
# Copyright (c) 2026-@@YEAR@@ Holger Bruenjes, holgerbruenjes(at)gmx(dot)net
#
# 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.
#----------------------------------------------------------------------------

# set package name
package_name=libhplip0

# ---------------------------------------------------------------------------
# cleqn up
# ---------------------------------------------------------------------------
installed=$(/usr/bin/eisman check hplip-hpijs)
if [ "${installed}" = "installed" ]
then
    if [ -f /etc/filelist.d/hplip-hpijs-files.txt ]
    then
        /usr/bin/sed -i '/libhpip.so/d' /etc/filelist.d/hplip-hpijs-files.txt
        /usr/bin/sed -i '/libhpipp.so/d' /etc/filelist.d/hplip-hpijs-files.txt
        /usr/bin/sed -i '/libhpmud.so/d' /etc/filelist.d/hplip-hpijs-files.txt
        /usr/bin/sed -i '/libhpdiscovery.so/d' /etc/filelist.d/hplip-hpijs-files.txt
    fi
fi

exit 0
# ---------------------------------------------------------------------------
# end
# ---------------------------------------------------------------------------
