$NetBSD: patch-ac,v 1.2 2003/08/12 19:08:57 seb Exp $ --- apps/ssh/Makefile.in.orig 2003-06-30 12:22:38.000000000 +0000 +++ apps/ssh/Makefile.in @@ -124,7 +124,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@ # @@ -456,6 +457,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 = @@ -871,7 +874,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: @@ -1002,10 +1005,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; \ @@ -1016,36 +1017,20 @@ 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) + case x"@CONFPROGRAMS@" in \ + x*askpass*) \ + (cd $(DESTDIR)$(bindir) && $(LN_S) ssh-askpass2 ssh-askpass) ;; \ + esac (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) @@ -1053,7 +1038,6 @@ install-symlinks: (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) clean-up-old: @@ -1072,23 +1056,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-hook: make-install-dirs install-symlinks + echo Installing $(DESTDIR)$(egdir)/sshd2_config ; \ $(INSTALL_DATA) $(srcdir)/sshd2_config \ - $(DESTDIR)$(etcdir)/sshd2_config ; \ - fi - echo Updating $(DESTDIR)$(etcdir)/sshd2_config.example ; - $(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 ; @@ -1101,11 +1075,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.