# Packager: Didier Spaier didieratslintdotfr

# Do not include in the installation ISO

pkgname=aaa_remove-obsoletes
pkgver=14.2.1
pkgrel=1slint
arch=noarch
rm -rf build
mkdir -p build/install
echo "aaa-remove-obsoletes (Remove packages removed from Slint64-4.2.1)" > build/install/slack-desc
cat <<-'EOF' > build/install/doinst.sh
if ! grep -q "^Slint 14.2.1$" /etc/slint-version; then
	exit
fi
obsoletes="
flash-plugin
libsecccomp
pygtksourceview
fluid-soundfont
gtksourceview3
python-magick
libburn
libisoburn
libisofs"
for i in $obsoletes; do
	removethis=$(ls /var/log/packages/|grep $i|grep slint$)
		if [ ! "$removethis" = "" ];
	then /sbin/removepkg $removethis; fi
done
EOF
cd build
/sbin/makepkg -p -l y -c n ../${pkgname}-${pkgver}-${arch}-${pkgrel}.txz