<?xml version="1.0"?>
<app>

<category>
Kernels
</category>

<name>
Siduction 7.1.9-1
</name>

<description>
   Siduction 7.1.9-1
</description>

<installable>
64
</installable>

<screenshot>none</screenshot>

<preinstall>
if [ $(apt-get update --print-uris | grep -c -m1 -E "/mx/repo/dists/trixie/ahs/") = 0 ]; then
MXREPO=$(apt-get update --print-uris | grep -oE "https?://.*/mx/repo/dists/ahs/main" | tail -1 | sed "s:^:deb :; s:/repo/dists/:/repo/ :; s:/main: ahs:")
: ${MXREPO:=deb http://mxrepo.com/mx/repo/ trixie ahs}
echo "$MXREPO" > /etc/apt/sources.list.d/mxpitemp.list
apt-get update 
fi
RTL_PKGS=($(dpkg-query -f '${db:Status-Abbrev}\t${Package}\n' -W  -- 'rtl*-dkms' | grep ^i | grep -- '-dkms$' | cut -d$'\t' -f2))
echo "realtek rtl package to remove are " ${RTL_PKGS[*]}
apt-get purge ${RTL_PKGS[*]}
DKMS_PKGS=($(dpkg-query -f '${db:Status-Abbrev}\t${Package}\n' -W  -- '*-dkms' | grep ^i | grep -- '-dkms$' | cut -d$'\t' -f2))
apt-get purge rtl*-dkms
apt-get install linux-image-linux-image-7.1.9-1mx25ahs-siduction-amd64 linux-headers-7.1.9-1mx25ahs-siduction-amd64 ${DKMS_PKGS[*]}
</preinstall>

<install_package_names>

</install_package_names>


<postinstall>
rebuild_dkms_packages.sh linux-image-7.1.9-1mx25ahs-siduction-amd64
if [ -f /etc/apt/sources.list.d/mxpitemp.list ]; then
rm /etc/apt/sources.list.d/mxpitemp.list
apt-get update
fi
echo "...$(gettext -d apt -s ' Done')!"
</postinstall>


<uninstall_package_names>
linux-image-7.1.9-1mx25ahs-siduction-amd64
linux-headers-7.1.9-1mx25ahs-siduction-amd64
</uninstall_package_names>
</app>
