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
|
$NetBSD: patch-ac,v 1.3 2004/07/25 12:29:19 grant Exp $
--- apps/ssh/Makefile.in.orig 2003-12-04 00:17:48.000000000 +1100
+++ apps/ssh/Makefile.in
@@ -127,7 +127,8 @@ WINCONF_OPTIONS = maintainer=sjl@ssh.com
etcdir = @ETCDIR@
known_hosts_dir = $(etcdir)/knownhosts
host_keys_dir = $(etcdir)/hostkeys
-subconfig_dir = $(etcdir)/subconfig
+egdir = $(prefix)/share/examples/${PKGBASE}
+subconfig_dir = $(egdir)/subconfig
STATIC_FLAG = @STATIC_FLAG@
#
@@ -459,6 +460,8 @@ SSH_DEFS = -DETCDIR=\"$(etcdir)\" -DSSH_
COMPILE = $(CC) $(KERBEROS_INCS) $(INCLUDES) $(SSH_DEFS) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS)
#
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+#
+INSTALL_DATA_DIR = $(BSD_INSTALL_DATA_DIR)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../sshconf.h
CONFIG_CLEAN_FILES =
@@ -874,7 +877,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP))
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
@@ -1005,10 +1008,8 @@ maintainer-clean-generic clean mostlycle
includes:
make-install-dirs:
- -if test '!' -d $(DESTDIR)$(etcdir); then mkdir -p $(DESTDIR)$(etcdir); fi
- -if test '!' -d $(DESTDIR)$(known_hosts_dir); then mkdir -p $(DESTDIR)$(known_hosts_dir); fi
- -if test '!' -d $(DESTDIR)$(host_keys_dir); then mkdir -p $(DESTDIR)$(host_keys_dir); fi
- -if test '!' -d $(DESTDIR)$(subconfig_dir); then mkdir -p $(DESTDIR)$(subconfig_dir); fi
+ $(INSTALL_DATA_DIR) $(DESTDIR)$(egdir)
+ $(INSTALL_DATA_DIR) $(DESTDIR)$(subconfig_dir)
generate-host-key:
-@if test -f $(DESTDIR)$(etcdir)/hostkey; \
@@ -1019,45 +1020,28 @@ generate-host-key:
fi
install-symlinks:
- -mv -f $(DESTDIR)$(bindir)/ssh $(DESTDIR)$(bindir)/ssh.old
- -mv -f $(DESTDIR)$(bindir)/ssh-agent $(DESTDIR)$(bindir)/ssh-agent.old
- -mv -f $(DESTDIR)$(bindir)/ssh-add $(DESTDIR)$(bindir)/ssh-add.old
- -mv -f $(DESTDIR)$(bindir)/ssh-askpass $(DESTDIR)$(bindir)/ssh-askpass.old
- -mv -f $(DESTDIR)$(bindir)/ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen.old
- -mv -f $(DESTDIR)$(bindir)/scp $(DESTDIR)$(bindir)/scp.old
- -mv -f $(DESTDIR)$(bindir)/sftp $(DESTDIR)$(bindir)/sftp.old
- -mv -f $(DESTDIR)$(bindir)/sftp-server $(DESTDIR)$(bindir)/sftp-server.old
- -mv -f $(DESTDIR)$(bindir)/ssh-signer $(DESTDIR)$(bindir)/ssh-signer.old
- -mv -f $(DESTDIR)$(bindir)/ssh-probe $(DESTDIR)$(bindir)/ssh-probe.old
-
- (cd $(DESTDIR)$(bindir) && $(LN_S) ssh2 ssh)
- (cd $(DESTDIR)$(bindir) && $(LN_S) ssh-agent2 ssh-agent)
- (cd $(DESTDIR)$(bindir) && $(LN_S) ssh-add2 ssh-add)
- (cd $(DESTDIR)$(bindir) && $(LN_S) ssh-askpass2 ssh-askpass)
- (cd $(DESTDIR)$(bindir) && $(LN_S) ssh-keygen2 ssh-keygen)
- (cd $(DESTDIR)$(bindir) && $(LN_S) scp2 scp)
- (cd $(DESTDIR)$(bindir) && $(LN_S) sftp2 sftp)
- (cd $(DESTDIR)$(bindir) && $(LN_S) sftp-server2 sftp-server)
- (cd $(DESTDIR)$(bindir) && $(LN_S) ssh-signer2 ssh-signer)
- (cd $(DESTDIR)$(bindir) && $(LN_S) ssh-probe2 ssh-probe)
- -mv -f $(DESTDIR)$(sbindir)/sshd $(DESTDIR)$(sbindir)/sshd.old
- (cd $(DESTDIR)$(sbindir) && $(LN_S) sshd2 sshd)
- -mv -f $(DESTDIR)$(mandir)/man1/ssh.1 $(DESTDIR)$(mandir)/man1/ssh.old.1
- -mv -f $(DESTDIR)$(mandir)/man1/ssh-add.1 $(DESTDIR)$(mandir)/man1/ssh-add.old.1
- -mv -f $(DESTDIR)$(mandir)/man1/ssh-agent.1 $(DESTDIR)$(mandir)/man1/ssh-agent.old.1
- -mv -f $(DESTDIR)$(mandir)/man1/ssh-keygen.1 $(DESTDIR)$(mandir)/man1/ssh-keygen.old.1
- -mv -f $(DESTDIR)$(mandir)/man1/scp.1 $(DESTDIR)$(mandir)/man1/scp.old.1
- -mv -f $(DESTDIR)$(mandir)/man1/sftp.1 $(DESTDIR)$(mandir)/man1/sftp.old.1
- -mv -f $(DESTDIR)$(mandir)/man1/ssh-probe.1 $(DESTDIR)$(mandir)/man1/ssh-probe.old.1
- (cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh2.1 ssh.1)
- (cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-add2.1 ssh-add.1)
- (cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-agent2.1 ssh-agent.1)
- (cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-keygen2.1 ssh-keygen.1)
- (cd $(DESTDIR)$(mandir)/man1 && $(LN_S) scp2.1 scp.1)
- (cd $(DESTDIR)$(mandir)/man1 && $(LN_S) sftp2.1 sftp.1)
- (cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-probe2.1 ssh-probe.1)
- -mv -f $(DESTDIR)$(mandir)/man8/sshd.8 $(DESTDIR)$(mandir)/man8/sshd.old.8
- (cd $(DESTDIR)$(mandir)/man8 && $(LN_S) sshd2.8 sshd.8)
+ (cd $(DESTDIR)$(bindir) && $(RM) -f ssh && $(LN_S) ssh2 ssh)
+ (cd $(DESTDIR)$(bindir) && $(RM) -f ssh-agent && $(LN_S) ssh-agent2 ssh-agent)
+ (cd $(DESTDIR)$(bindir) && $(RM) -f ssh-add && $(LN_S) ssh-add2 ssh-add)
+ case x"@CONFPROGRAMS@" in \
+ x*askpass*) \
+ (cd $(DESTDIR)$(bindir) && $(RM) -f ssh-askpass && $(LN_S) ssh-askpass2 ssh-askpass) ;; \
+ esac
+ (cd $(DESTDIR)$(bindir) && $(RM) -f ssh-keygen && $(LN_S) ssh-keygen2 ssh-keygen)
+ (cd $(DESTDIR)$(bindir) && $(RM) -f scp && $(LN_S) scp2 scp)
+ (cd $(DESTDIR)$(bindir) && $(RM) -f sftp && $(LN_S) sftp2 sftp)
+ (cd $(DESTDIR)$(bindir) && $(RM) -f sftp-server && $(LN_S) sftp-server2 sftp-server)
+ (cd $(DESTDIR)$(bindir) && $(RM) -f ssh-signer && $(LN_S) ssh-signer2 ssh-signer)
+ (cd $(DESTDIR)$(bindir) && $(RM) -f ssh-probe && $(LN_S) ssh-probe2 ssh-probe)
+ (cd $(DESTDIR)$(sbindir) && $(RM) -f sshd && $(LN_S) sshd2 sshd)
+ (cd $(DESTDIR)$(mandir)/man1 && $(RM) -f ssh.1 && $(LN_S) ssh2.1 ssh.1)
+ (cd $(DESTDIR)$(mandir)/man1 && $(RM) -f ssh-add.1 && $(LN_S) ssh-add2.1 ssh-add.1)
+ (cd $(DESTDIR)$(mandir)/man1 && $(RM) -f ssh-agent.1 && $(LN_S) ssh-agent2.1 ssh-agent.1)
+ (cd $(DESTDIR)$(mandir)/man1 && $(RM) -f ssh-keygen.1 && $(LN_S) ssh-keygen2.1 ssh-keygen.1)
+ (cd $(DESTDIR)$(mandir)/man1 && $(RM) -f scp.1 && $(LN_S) scp2.1 scp.1)
+ (cd $(DESTDIR)$(mandir)/man1 && $(RM) -f sftp.1 && $(LN_S) sftp2.1 sftp.1)
+ (cd $(DESTDIR)$(mandir)/man1 && $(RM) -f sshprobe.1 && $(LN_S) ssh-probe2.1 ssh-probe.1)
+ (cd $(DESTDIR)$(mandir)/man8 && $(RM) -f sshd.8 && $(LN_S) sshd2.8 sshd.8)
clean-up-old:
-rm -f $(DESTDIR)$(bindir)/ssh.old $(DESTDIR)$(bindir)/ssh-agent.old \
@@ -1075,23 +1059,13 @@ install-exec-hook:
-chown root $(DESTDIR)$(bindir)/ssh-signer2
-chmod $(SSH_SIGNER_INSTALL_MODE) $(DESTDIR)$(bindir)/ssh-signer2
-install-data-hook: make-install-dirs generate-host-key install-symlinks
- -@if test '!' -f $(DESTDIR)$(etcdir)/sshd2_config ; then \
- echo Installing $(DESTDIR)$(etcdir)/sshd2_config ; \
- $(INSTALL_DATA) $(srcdir)/sshd2_config \
- $(DESTDIR)$(etcdir)/sshd2_config ; \
- fi
- echo Updating $(DESTDIR)$(etcdir)/sshd2_config.example ;
+install-data-hook: make-install-dirs install-symlinks
+ echo Installing $(DESTDIR)$(egdir)/sshd2_config ; \
$(INSTALL_DATA) $(srcdir)/sshd2_config \
- $(DESTDIR)$(etcdir)/sshd2_config.example ;
- -@if test '!' -f $(DESTDIR)$(etcdir)/ssh2_config ; then \
- echo Installing $(DESTDIR)$(etcdir)/ssh2_config ; \
- $(INSTALL_DATA) $(srcdir)/ssh2_config \
- $(DESTDIR)$(etcdir)/ssh2_config ; \
- fi
- echo Updating $(DESTDIR)$(etcdir)/ssh2_config.example ;
+ $(DESTDIR)$(egdir)/sshd2_config ;
+ echo Installing $(DESTDIR)$(egdir)/ssh2_config ; \
$(INSTALL_DATA) $(srcdir)/ssh2_config \
- $(DESTDIR)$(etcdir)/ssh2_config.example ;
+ $(DESTDIR)$(egdir)/ssh2_config ;
echo Updating $(DESTDIR)$(subconfig_dir)/host_ext.example ;
$(INSTALL_DATA) $(srcdir)/subconfig/host_ext.example \
$(DESTDIR)$(subconfig_dir)/host_ext.example ;
@@ -1104,11 +1078,9 @@ install-data-hook: make-install-dirs gen
echo Updating $(DESTDIR)$(subconfig_dir)/user.example ;
$(INSTALL_DATA) $(srcdir)/subconfig/user.example \
$(DESTDIR)$(subconfig_dir)/user.example ;
- -@if test '!' -f $(DESTDIR)$(etcdir)/ssh_dummy_shell.out ; then \
- echo Installing $(DESTDIR)$(etcdir)/ssh_dummy_shell.out ; \
+ echo Installing $(DESTDIR)$(egdir)/ssh_dummy_shell.out ; \
$(INSTALL_DATA) $(srcdir)/ssh_dummy_shell.out \
- $(DESTDIR)$(etcdir)/ssh_dummy_shell.out ; \
- fi
+ $(DESTDIR)$(egdir)/ssh_dummy_shell.out ;
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
|