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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
Originally based on Debian patch jove_4.16.0.70-3.1.diff.gz
--- jove4.16.0.73-orig/doc/jove.rc
+++ jove4.16.0.73/doc/jove.rc
@@ -74,6 +74,6 @@
1 source jove.rc.$TERM
# source local custom rc file, if present
-1 source jove-local.rc
+1 source /etc/jove/jove-local.rc
popd
--- jove4.16.0.73-orig/jove.c
+++ jove4.16.0.73/jove.c
@@ -1576,7 +1576,7 @@
char Joverc[FILESIZE];
if (dosys) {
- PathCat(Joverc, sizeof(Joverc), ShareDir, "jove.rc");
+ PathCat(Joverc, sizeof(Joverc), CONFIGDIR, "jove.rc");
(void) joverc(Joverc); /* system wide jove.rc */
}
--- jove4.16.0.73-orig/Makefile
+++ jove4.16.0.73/Makefile
@@ -21,13 +21,14 @@
# If they don't exist, this makefile will try to create the directories
# LIBDIR and SHAREDIR. All others must already exist.
-JOVEHOME = /usr/local
-SHAREDIR = $(JOVEHOME)/lib/jove
+JOVEHOME = ${DESTDIR}/usr
+SHAREDIR = $(JOVEHOME)/share/jove
LIBDIR = $(JOVEHOME)/lib/jove
BINDIR = $(JOVEHOME)/bin
XEXT=
-MANDIR = $(JOVEHOME)/man/man$(MANEXT)
+MANDIR = $(JOVEHOME)/share/man/man$(MANEXT)
MANEXT = 1
+CONFIGDIR=${DESTDIR}/etc/jove
# TMPDIR is where the tmp files get stored, usually /tmp, /var/tmp, or
# /usr/tmp. If you wish to be able to recover buffers after a system
@@ -38,11 +39,11 @@
# (in case the system startup salvages tempfiles by moving them,
# which is probably a good idea).
-TMPDIR = /tmp
-RECDIR = /var/preserve
+TMPDIR = /var/tmp
+RECDIR = ${DESTDIR}/var/lib/jove/preserve
# DFLTSHELL is the default shell invoked by JOVE and TEACHJOVE.
-DFLTSHELL = /bin/csh
+DFLTSHELL = /bin/sh
# The install commands of BSD and System V differ in unpleasant ways:
# -c: copy (BSD); -c dir: destination directory (SysV)
@@ -56,15 +57,18 @@
INSTALLFLAGS = # -g bin -o root
# to install executable files
-XINSTALL=cp
+XINSTALL=install -m 755
#XINSTALL=/usr/ucb/install $(INSTALLFLAGS) -c -m 755 # -s
#CYGWIN32: XINSTALL=install $(INSTALLFLAGS) -c -m 755
# to install text files
-TINSTALL=cp
+TINSTALL=install -m 644
#TINSTALL=/usr/ucb/install $(INSTALLFLAGS) -c -m 644
#CYGWIN32: TINSTALL=install $(INSTALLFLAGS) -c -m 644
+# to install directories
+DINSTALL=install -d 755
+
# These should all just be right if the above ones are.
# You will confuse JOVE if you move anything from LIBDIR or SHAREDIR.
@@ -72,7 +76,7 @@
TEACHJOVE = $(BINDIR)/teachjove$(XEXT)
RECOVER = $(LIBDIR)/recover$(XEXT)
PORTSRV = $(LIBDIR)/portsrv$(XEXT)
-JOVERC = $(SHAREDIR)/jove.rc
+JOVERC = $(CONFIGDIR)/jove.rc
TERMSDIR = $(SHAREDIR)
CMDS.DOC = $(SHAREDIR)/cmds.doc
TEACH-JOVE = $(SHAREDIR)/teach-jove
@@ -160,7 +164,7 @@
# SCO UNIX: TERMCAPLIB = -lcurses
# AIX on the R6000s: TERMCAPLIB = -lcurses -ltermcap -ls
-TERMCAPLIB = -ltermcap
+TERMCAPLIB = -lncurses
# Extra libraries flags needed by oddball systems.
# Modern BSD systems using openpty need its library.
@@ -181,7 +185,7 @@
# PDP-11 with separate I&D: -i
# PDP-11 without separate I&D: -n
-LDFLAGS =
+#LDFLAGS =
# for SCO Xenix, set
# MEMFLAGS = -Mle
@@ -236,7 +240,8 @@
TROFF = troff -Tpost
TROFFPOST = | /usr/lib/lp/postscript/dpost -
-MANUALS = $(JOVEM) $(TEACHJOVEM) $(XJOVEM) $(JOVETOOLM)
+MANUALS = $(JOVEM) $(TEACHJOVEM)
+# $(XJOVEM) $(JOVETOOLM)
C_SRC = commands.c commands.tab abbrev.c argcount.c ask.c buf.c c.c case.c jctype.c \
delete.c disp.c extend.c fp.c fmt.c insert.c io.c iproc.c \
@@ -283,8 +288,7 @@
# all: default target.
# Builds everything that "install" needs.
all: jjove$(XEXT) recover$(XEXT) teachjove$(XEXT) portsrv$(XEXT) \
- doc/cmds.doc doc/jove.$(MANEXT) doc/teachjove.$(MANEXT) \
- doc/jovetool.$(MANEXT)
+ doc/cmds.doc doc/jove.$(MANEXT) doc/teachjove.$(MANEXT)
jjove$(XEXT): $(OBJECTS)
$(LDCC) $(LDFLAGS) $(OPTFLAGS) -o jjove$(XEXT) $(OBJECTS) $(TERMCAPLIB) $(EXTRALIBS)
@@ -341,6 +345,7 @@
@echo \#define LIBDIR \"$(LIBDIR)\" >> paths.h
@echo \#define SHAREDIR \"$(SHAREDIR)\" >> paths.h
@echo \#define DFLTSHELL \"$(DFLTSHELL)\" >> paths.h
+ @echo \#define CONFIGDIR \"$(CONFIGDIR)\" >> paths.h
makexjove:
( cd xjove ; make CC="$(CC)" OPTFLAGS="$(OPTFLAGS)" SYSDEFS="$(SYSDEFS)" $(TOOLMAKEEXTRAS) xjove )
@@ -358,18 +363,31 @@
# Thus, if "all" is done first, "install" can be invoked with
# JOVEHOME pointing at a playpen where files are to be marshalled.
# This property is fragile.
-install: $(LIBDIR) $(SHAREDIR) \
+install: $(BINDIR) $(LIBDIR) $(SHAREDIR) $(CONFIGDIR) $(RECDIR) \
$(TEACH-JOVE) $(CMDS.DOC) $(TERMSDIR)docs \
$(PORTSRVINST) $(RECOVER) $(JOVE) $(TEACHJOVE) $(MANUALS)
- $(TINSTALL) doc/jove.rc $(JOVERC)
+ $(TINSTALL) doc/jove.rc $(CONFIGDIR)
@echo See the README about changes to /etc/rc or /etc/rc.local
@echo so that the system recovers jove files on reboot after a crash
+$(BINDIR)::
+ $(DINSTALL) $(BINDIR)
+
$(LIBDIR)::
- test -d $(LIBDIR) || mkdir -p $(LIBDIR)
+ $(DINSTALL) $(LIBDIR)
$(SHAREDIR)::
- test -d $(SHAREDIR) || mkdir -p $(SHAREDIR)
+ $(DINSTALL) $(SHAREDIR)
+
+$(CONFIGDIR)::
+ $(DINSTALL) $(CONFIGDIR)
+
+$(RECDIR)::
+ $(DINSTALL) $(RECDIR)
+ chmod 1777 $(RECDIR)
+
+$(MANDIR)::
+ $(DINSTALL) $(MANDIR)
$(TEACH-JOVE): doc/teach-jove
$(TINSTALL) doc/teach-jove $(TEACH-JOVE)
@@ -410,7 +428,7 @@
-e 's;<SHAREDIR>;$(SHAREDIR);' \
-e 's;<SHELL>;$(DFLTSHELL);' doc/jove.nr > doc/jove.$(MANEXT)
-$(JOVEM): doc/jove.$(MANEXT)
+$(JOVEM): $(MANDIR) doc/jove.$(MANEXT)
$(TINSTALL) doc/jove.$(MANEXT) $(JOVEM)
# doc/jove.doc is the formatted manpage (only needed by DOS)
@@ -427,7 +445,7 @@
-e 's;<SHAREDIR>;$(SHAREDIR);' \
-e 's;<SHELL>;$(DFLTSHELL);' doc/teachjove.nr > doc/teachjove.$(MANEXT)
-$(TEACHJOVEM): doc/teachjove.$(MANEXT)
+$(TEACHJOVEM): $(MANDIR) doc/teachjove.$(MANEXT)
$(TINSTALL) doc/teachjove.$(MANEXT) $(TEACHJOVEM)
$(XJOVEM): doc/xjove.nr
|