FIXUPHACK 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #note: DISTRO_BINARY_COMPAT and DISTRO_FILE_PREFIX are visible here, exported in 2createpackages.
  2. #Ubuntu note:
  3. #$ARCHDIR in 2createpackages will cause usr/lib/i386-linux-gnu/* files to
  4. #be moved to usr/lib/ before script FIXUPHACK is executed.
  5. #for various versions of abiword, we have usr/lib/abiword-2.6, usr/lib/abiword-2.8,
  6. #or usr/lib/abiword-2.9 ...
  7. ABIWORDSUBDIR="$(find usr/lib -mindepth 1 -maxdepth 1 -type d -name 'abiword-*' | head -n 1 | rev | cut -f 1 -d '/' | rev)"
  8. #move non-english files to abiword_NLS...
  9. if [ "$ABIWORDSUBDIR" ];then
  10. if [ -d usr/share/$ABIWORDSUBDIR ];then
  11. mkdir -p ../abiword_NLS/usr/share/${ABIWORDSUBDIR}
  12. cp -a -f usr/share/${ABIWORDSUBDIR}/system.profile* ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/
  13. rm -f usr/share/${ABIWORDSUBDIR}/system.profile*
  14. mv -f ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/system.profile usr/share/$ABIWORDSUBDIR/
  15. mv -f ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/system.profile-en* usr/share/$ABIWORDSUBDIR/
  16. if [ -d usr/share/$ABIWORDSUBDIR/strings ];then
  17. mkdir -p ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/strings
  18. cp -a -f usr/share/${ABIWORDSUBDIR}/strings/* ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/strings/
  19. rm -f usr/share/${ABIWORDSUBDIR}/strings/*
  20. mv -f ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/strings/en-* usr/share/${ABIWORDSUBDIR}/strings/
  21. fi
  22. if [ -d usr/share/$ABIWORDSUBDIR/templates ];then
  23. mkdir -p ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/templates
  24. cp -a -f usr/share/${ABIWORDSUBDIR}/templates/* ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/templates/
  25. rm -f usr/share/${ABIWORDSUBDIR}/templates/*
  26. mv -f ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/templates/normal.awt usr/share/${ABIWORDSUBDIR}/templates/
  27. mv -f ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/templates/normal.awt-en* usr/share/${ABIWORDSUBDIR}/templates/
  28. mv -f ../abiword_NLS/usr/share/${ABIWORDSUBDIR}/templates/*.awt usr/share/${ABIWORDSUBDIR}/templates/
  29. fi
  30. fi
  31. fi