POSTIN
/bin/sh
/usr/bin/rebuild-gcj-db
if [ -f /usr/lib64/eclipse/configuration/config.ini ]; then
sed --in-place "s/[#]*eclipse.product=.*/eclipse.product=org.eclipse.sdk.ide/" \
/usr/lib64/eclipse/configuration/config.ini
fi
POSTUN
/bin/sh
/usr/bin/rebuild-gcj-db
# Only set the product back to platform.ide if the sdk is actually removed for
# this arch. This SDKDIR check is to deal with the ordering of new %post
# before old %postun
SDKDIR=$(ls /usr/lib64/eclipse/features | grep "org\.eclipse\.sdk_")
if [ -z "$SDKDIR" -a -f /usr/lib64/eclipse/configuration/config.ini ]; then
sed --in-place "s/[#]*eclipse.product=.*/eclipse.product=org.eclipse.platform.ide/" \
/usr/lib64/eclipse/configuration/config.ini
fi