xref: /freebsd/crypto/openssh/contrib/cygwin/Makefile (revision 52028650)
152028650SDag-Erling Smørgravsrcdir=../..
252028650SDag-Erling Smørgravcopyidsrcdir=..
352028650SDag-Erling Smørgravprefix=/usr
452028650SDag-Erling Smørgravexec_prefix=$(prefix)
552028650SDag-Erling Smørgravbindir=$(prefix)/bin
652028650SDag-Erling Smørgravdatadir=$(prefix)/share
752028650SDag-Erling Smørgravmandir=$(datadir)/man
852028650SDag-Erling Smørgravdocdir=$(datadir)/doc
952028650SDag-Erling Smørgravsshdocdir=$(docdir)/openssh
1052028650SDag-Erling Smørgravcygdocdir=$(docdir)/Cygwin
1152028650SDag-Erling Smørgravsysconfdir=/etc
1252028650SDag-Erling Smørgravdefaultsdir=$(sysconfdir)/defaults/etc
1352028650SDag-Erling Smørgravinetdefdir=$(defaultsdir)/inetd.d
1452028650SDag-Erling SmørgravPRIVSEP_PATH=/var/empty
1552028650SDag-Erling SmørgravINSTALL=/usr/bin/install -c
1652028650SDag-Erling SmørgravMKDIR_P=$(srcdir)/mkinstalldirs
1752028650SDag-Erling Smørgrav
1852028650SDag-Erling SmørgravDESTDIR=
1952028650SDag-Erling Smørgrav
2052028650SDag-Erling Smørgravall:
2152028650SDag-Erling Smørgrav	@echo
2252028650SDag-Erling Smørgrav	@echo "Use \`make cygwin-postinstall DESTDIR=[package directory]'"
2352028650SDag-Erling Smørgrav	@echo "Be sure having DESTDIR set correctly!"
2452028650SDag-Erling Smørgrav	@echo
2552028650SDag-Erling Smørgrav
2652028650SDag-Erling Smørgravmove-config-files: $(DESTDIR)$(sysconfdir)/ssh_config $(DESTDIR)$(sysconfdir)/sshd_config
2752028650SDag-Erling Smørgrav	$(MKDIR_P) $(DESTDIR)$(defaultsdir)
2852028650SDag-Erling Smørgrav	mv $(DESTDIR)$(sysconfdir)/ssh_config $(DESTDIR)$(defaultsdir)
2952028650SDag-Erling Smørgrav	mv $(DESTDIR)$(sysconfdir)/sshd_config $(DESTDIR)$(defaultsdir)
3052028650SDag-Erling Smørgrav
3152028650SDag-Erling Smørgravremove-empty-dir:
3252028650SDag-Erling Smørgrav	rm -rf $(DESTDIR)$(PRIVSEP_PATH)
3352028650SDag-Erling Smørgrav
3452028650SDag-Erling Smørgravinstall-inetd-config:
3552028650SDag-Erling Smørgrav	$(MKDIR_P) $(DESTDIR)$(inetdefdir)
3652028650SDag-Erling Smørgrav	$(INSTALL) -m 644 sshd-inetd  $(DESTDIR)$(inetdefdir)/sshd-inetd
3752028650SDag-Erling Smørgrav
3852028650SDag-Erling Smørgravinstall-sshdoc:
3952028650SDag-Erling Smørgrav	$(MKDIR_P) $(DESTDIR)$(sshdocdir)
4052028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/CREDITS $(DESTDIR)$(sshdocdir)/CREDITS
4152028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/ChangeLog $(DESTDIR)$(sshdocdir)/ChangeLog
4252028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/LICENCE $(DESTDIR)$(sshdocdir)/LICENCE
4352028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/OVERVIEW $(DESTDIR)$(sshdocdir)/OVERVIEW
4452028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/PROTOCOL $(DESTDIR)$(sshdocdir)/PROTOCOL
4552028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/PROTOCOL.agent $(DESTDIR)$(sshdocdir)/PROTOCOL.agent
4652028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/PROTOCOL.certkeys $(DESTDIR)$(sshdocdir)/PROTOCOL.certkeys
4752028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/PROTOCOL.mux $(DESTDIR)$(sshdocdir)/PROTOCOL.mux
4852028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/README $(DESTDIR)$(sshdocdir)/README
4952028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/README.dns $(DESTDIR)$(sshdocdir)/README.dns
5052028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/README.platform $(DESTDIR)$(sshdocdir)/README.platform
5152028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/README.privsep $(DESTDIR)$(sshdocdir)/README.privsep
5252028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/README.tun $(DESTDIR)$(sshdocdir)/README.tun
5352028650SDag-Erling Smørgrav	-$(INSTALL) -m 644 $(srcdir)/TODO $(DESTDIR)$(sshdocdir)/TODO
5452028650SDag-Erling Smørgrav
5552028650SDag-Erling Smørgravinstall-cygwindoc: README
5652028650SDag-Erling Smørgrav	$(MKDIR_P) $(DESTDIR)$(cygdocdir)
57	$(INSTALL) -m 644 README $(DESTDIR)$(cygdocdir)/openssh.README
58
59install-doc: install-sshdoc install-cygwindoc
60
61install-scripts: ssh-host-config ssh-user-config
62	$(MKDIR_P) $(DESTDIR)$(bindir)
63	$(INSTALL) -m 755 ssh-host-config $(DESTDIR)$(bindir)/ssh-host-config
64	$(INSTALL) -m 755 ssh-user-config $(DESTDIR)$(bindir)/ssh-user-config
65
66install-copy-id: $(copyidsrcdir)/ssh-copy-id $(copyidsrcdir)/ssh-copy-id.1
67	$(INSTALL) -m 755 $(copyidsrcdir)/ssh-copy-id $(DESTDIR)$(bindir)/ssh-copy-id
68	$(INSTALL) -m 644 $(copyidsrcdir)/ssh-copy-id.1 $(DESTDIR)$(mandir)/man1/ssh-copy-id.1
69
70gzip-man-pages:
71	rm $(DESTDIR)$(mandir)/man1/slogin.1
72	gzip $(DESTDIR)$(mandir)/man1/*.1
73	gzip $(DESTDIR)$(mandir)/man5/*.5
74	gzip $(DESTDIR)$(mandir)/man8/*.8
75	cd $(DESTDIR)$(mandir)/man1 && ln -s ssh.1.gz slogin.1.gz
76
77cygwin-postinstall: move-config-files remove-empty-dir install-inetd-config install-doc install-scripts install-copy-id gzip-man-pages
78	@echo "Cygwin specific configuration finished."
79