emacs-org-mode.install 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ## NOTE: the line commented with '##!' are needed
  2. ## to REPLACE the info file shipped by emacs (currently at org version 7.8.11)
  3. ## with the info docs from this distribution (thanks mdev)
  4. # arg 1: the new package version
  5. # arg 2: the old package version
  6. INFODIR=/usr/share/info
  7. pre_install() {
  8. ##! for file in {org,org-?.gz} ; do
  9. ##! if [ -e $INFODIR/$file ] ; then
  10. ##! echo "Removing $INFODIR/$file"
  11. ##! install-info --delete $INFODIR/$file $INFODIR/dir 2> /dev/null
  12. ##! rm -f $INFODIR/$file
  13. ##! fi
  14. ##! done
  15. cat << EOM
  16. You don't need to (require 'org-install) anymore.
  17. Setting the load-paths is enough.
  18. If you want to make sure the correct autoloads are in place, you can do:
  19. (require 'org-loaddefs.el)
  20. NOTE: info documentation for emacs-org-mode goes now as 'orgmode' in /usr/share/info,
  21. It does NOT replace the 'org' info files shipped with emacs:
  22. $ info orgmode ## this version
  23. $ info org ## emacs org version
  24. EOM
  25. }
  26. post_install() {
  27. ##! mv $INFODIR/orgmode.gz $INFODIR/org.gz
  28. ##! install-info $INFODIR/org.gz $INFODIR/dir 2> /dev/null
  29. ##! and comment out the following line:
  30. install-info --name='orgmode' --description='Org Mode provided by emacs-org-mode (AUR)' $INFODIR/orgmode.gz $INFODIR/dir 2> /dev/null
  31. }
  32. pre_upgrade() {
  33. /bin/true
  34. }
  35. post_upgrade() {
  36. post_install $1
  37. cat << EOM
  38. You don't need to (require 'org-install) anymore.
  39. Setting the load-paths is enough.
  40. If you want to make sure the correct autoloads are in place, you can do:
  41. (require 'org-loaddefs.el)
  42. EOM
  43. }
  44. pre_remove() {
  45. install-info --delete $INFODIR/orgmode.gz $INFODIR/dir 2> /dev/null
  46. ##! comment out the line above and uncomment the following:
  47. ##! install-info --delete $INFODIR/org.gz $INFODIR/dir 2> /dev/null
  48. ##! rm $INFODIR/org.gz 2> /dev/null
  49. }
  50. # arg 1: the old package version
  51. post_remove() {
  52. /bin/true
  53. }
  54. op=$1
  55. shift
  56. $op $*