installdir_old=`locate wordbook/dictionary.lst | sed 's:/dictionary.lst$$::'`
installdir_new=`locate /share/dict/ooo | perl -pe 's:^(.*/share/dict/ooo).*$$:$$1:' | sort -u | tail -1`

installdir_user=$(HOME)/.openoffice/user/wordbook

all:

install: fo_FO.dic fo_FO.aff
        if [ -d "$(installdir_old)" ]; then install -o root -g root -m 0644 fo_FO.dic $(installdir_old); echo old location; fi
        if [ -d "$(installdir_old)" ]; then install -o root -g root -m 0644 fo_FO.aff $(installdir_old); echo old location; fi
        if [ -d "$(installdir_new)" ]; then install -o root -g root -m 0644 fo_FO.dic $(installdir_new); echo new location; fi
        if [ -d "$(installdir_new)" ]; then install -o root -g root -m 0644 fo_FO.aff $(installdir_new); echo new location; fi

user_install: fo_FO.dic fo_FO.aff
        @mkdir -p $(installdir_user)
        @if [ -d "$(installdir_user)" ]; then cp -p fo_FO.dic fo_FO.aff $(installdir_user)/; echo DICT fo FO fo_FO >> $(installdir_user)/dictionary.lst; echo user location; else echo can not install; exit -1; fi

clean:

