summarylogtreecommitdiffstats
path: root/picolisp.install
blob: e6246cd7d6b17d0513c376c028d09ff685eb5028 (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
# before files are extracted.

pre_install() {
 if [ -d /usr/lib/picolisp ]
 then
    rm -rf /usr/lib/picolisp
 fi
}

# after files are extracted
post_install() {

  # binary
  install -d -m755 "/usr/bin/"
  ln -s "/usr/lib/picolisp/bin/picolisp" "/usr/bin/"
  ln -s "/usr/lib/picolisp/bin/pil" "/usr/bin/"

  ln -s "/usr/lib/picolisp/bin/ssl" "/usr/bin/"
  ln -s "/usr/lib/picolisp/bin/httpGate" "/usr/bin/"
  ln -s "/usr/lib/picolisp/bin/psh" "/usr/bin/"

  # documentation
  install -d -m755 "/usr/share/man/man1/"
  ln -s "/usr/lib/picolisp/man/man1/picolisp.1" "/usr/share/man/man1/" 
  ln -s "/usr/lib/picolisp/man/man1/pil.1" "/usr/share/man/man1/" 

  ln -s "/usr/lib/picolisp" "/usr/share/"

  # license
  install -Dm755 /usr/lib/picolisp/COPYING /usr/share/licenses/picolisp/LICENSE

}

pre_remove() {
 if [ -d /usr/lib/picolisp ]
 then
    rm -rf /usr/lib/picolisp

    rm /usr/bin/picolisp 
    rm /usr/bin/pil
    rm /usr/bin/ssl
    rm /usr/bin/httpGate
    rm /usr/bin/psh

    rm /usr/share/man/man1/picolisp.1 
    rm /usr/share/man/man1/pil.1 
    rm /usr/share/picolisp

    rm /usr/share/licenses/picolisp/LICENSE
 fi
}