summaryrefslogtreecommitdiff
path: root/pcr/emacs-org-mode/emacs-org-mode.install
blob: a963840ca28d546739ab1c3bc76796ad6d688a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
## NOTE: the line commented with '##!' are needed 
## to REPLACE the info file shipped by emacs (currently at org version 7.8.11)
## with the info docs from this distribution (thanks mdev)

# arg 1:  the new package version
# arg 2:  the old package version

INFODIR=/usr/share/info

pre_install() {
##!   for file in {org,org-?.gz} ; do
##!      if [ -e $INFODIR/$file ] ; then
##!         echo "Removing $INFODIR/$file"
##!         install-info --delete $INFODIR/$file $INFODIR/dir 2> /dev/null
##!         rm -f $INFODIR/$file
##!      fi
##!   done
   cat << EOM
You don't need to (require 'org-install) anymore.
Setting the load-paths is enough.

If you want to make sure the correct autoloads are in place, you can do:

  (require 'org-loaddefs.el)

NOTE: info documentation for emacs-org-mode goes now as 'orgmode' in /usr/share/info,
      It does NOT replace the 'org' info files shipped with emacs:
        $ info orgmode ## this version 
        $ info org     ## emacs org version
EOM
}


post_install() {
##!  mv $INFODIR/orgmode.gz $INFODIR/org.gz
##!  install-info $INFODIR/org.gz $INFODIR/dir 2> /dev/null 
##! and comment out the following line:
  install-info --name='orgmode' --description='Org Mode provided by emacs-org-mode (AUR)' $INFODIR/orgmode.gz $INFODIR/dir 2> /dev/null
}

pre_upgrade() {
  /bin/true
}

post_upgrade() {
 post_install $1
   cat << EOM
You don't need to (require 'org-install) anymore.
Setting the load-paths is enough.
If you want to make sure the correct autoloads are in place, you can do:

  (require 'org-loaddefs.el)

EOM
}


pre_remove() {
  install-info --delete $INFODIR/orgmode.gz $INFODIR/dir 2> /dev/null
##! comment out the line above and uncomment the following:
##!  install-info --delete $INFODIR/org.gz $INFODIR/dir 2> /dev/null
##!  rm $INFODIR/org.gz 2> /dev/null
}

# arg 1:  the old package version
post_remove() {
  /bin/true
}

op=$1
shift
$op $*