post_install() {
  post_upgrade
}

post_upgrade() {
 if (( $(vercmp "$2" 1.2.5-12) < 0 )); then
   cat << _EOF
  ==> bogofilter oldpkgver < 1.2.5-12 detected!
  ==>
  ==> This version now offers Berkeley db5.3/kyotocabinet/lmdb/sqlite backends
  ==> Some future version will drop Berkeley "db5.3" backend without 
  ==> further notice.
  ==> ------------------------------------------------------------------------
  ==> To switch the database backend, you must dump each wordlist 
  ==> for each of your users FIRST using the current version and load
  ==> it with the new backend version bogoutil.
  ==> For easy transition all backends includes "bogoutil-berkeleydb5.3".
  ==> Please also refer to:
  ==> https://bogofilter.sourceforge.io/faq.shtml#update - do something like
  ==> "bogoutil-berkeleydb5.3 -d some-wordlist.db > some-wordlist.txt.migrate"
  ==> then install some different backend version package
  ==> of your choice using pacman -S bogofilter-{kyotocabinet,lmdb,sqlite}.
  ==> Finish migration using "bogoutil -I some-wordlist.txt.migrate"
_EOF
 fi
}
