1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

root/csw/mgar/pkg/openssh/trunk/Makefile

Revision 20947, 8.4 KB (checked in by chninkel, 3 weeks ago)

openssh/trunk: remove lpk recipe

Line 
1#####################################################################
2# OpenCSW build recipe for openssh
3#
4# Author: Yann Rouillard <yann@pleiades.fr.eu.org>
5#
6# Redistribution and/or use, with or without modification, is
7# permitted.  This software is without warranty of any kind.  The
8# author(s) shall not be liable in the event that use of the
9# software causes damage.
10#####################################################################
11
12###### Package information #######
13
14NAME = openssh
15VERSION = 6.2p1
16GSSKEX_PATCH_VERSION = 6.2p1
17GSSKEX_PATCH_DATE = 20130502
18GARTYPE = v2
19
20DESCRIPTION = OpenSSH Secure Shell
21
22define BLURB
23  OpenSSH is a FREE version of the SSH connectivity tools that technical users
24  of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that
25  their password is transmitted across the Internet unencrypted, but it is.
26  OpenSSH encrypts all traffic (including passwords) to effectively eliminate
27  eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH
28  provides secure tunneling capabilities and several authentication methods,
29  and supports all SSH protocol versions.
30endef
31
32
33PACKAGES = CSWopenssh CSWopenssh-client
34
35CATALOGNAME_CSWopenssh = openssh
36SPKG_DESC_CSWopenssh = OpenSSH Secure Shell server
37BUILD_DEP_PKGS = CSWautoconf CSWlibssl-dev CSWlibz-dev
38RUNTIME_DEP_PKGS_CSWopenssh = CSWlibssl1-0-0 CSWlibwrap1 CSWlibz1 CSWlibkrb5-3 CSWlibgssapi-krb5-2 CSWlibcom-err3 CSWopenssh-client
39
40OBSOLETED_BY_CSWopenssh = CSWossh
41
42CATALOGNAME_CSWopenssh-client = openssh_client
43SPKG_DESC_CSWopenssh-client = OpenSSH Secure Shell client
44RUNTIME_DEP_PKGS_CSWopenssh-client = CSWlibssl1-0-0 CSWlibz1 CSWlibgssapi-krb5-2
45
46OBSOLETED_BY_CSWopenssh-client = CSWosshclient
47
48PACKAGING_PLATFORMS = solaris10-sparc solaris10-i386
49
50PKGFILES_CSWopenssh = $(sbindir)/.*
51PKGFILES_CSWopenssh += $(docdir)/openssh/.*
52PKGFILES_CSWopenssh += $(mandir)/man5/sshd_config.5
53PKGFILES_CSWopenssh += $(mandir)/man8/sftp-server.8
54PKGFILES_CSWopenssh += $(mandir)/man8/sshd.8
55PKGFILES_CSWopenssh += $(libexecdir)/sftp-server
56PKGFILES_CSWopenssh += $(sysconfdir)/ssh/sshd_config.CSW
57PKGFILES_CSWopenssh += $(sysconfdir)/ssh/moduli.CSW
58PKGFILES_CSWopenssh += $(localstatedir)/empty
59PKGFILES_CSWopenssh += $(sysconfdir)/init.d/cswopenssh
60PKGFILES_CSWopenssh += $(localstatedir)/svc/manifest/network/cswopenssh.xml
61PKGFILES_CSWopenssh += $(prefix)/etc/pkg/CSWopenssh/cswusergroup
62
63PKGFILES_CSWopenssh-client = $(bindir)/.*
64PKGFILES_CSWopenssh-client += $(docdir)/openssh_client/.*
65PKGFILES_CSWopenssh-client += $(mandir)/man1/.*
66PKGFILES_CSWopenssh-client += $(mandir)/man5/ssh_config.5
67PKGFILES_CSWopenssh-client += $(mandir)/man8/ssh-keysign.8
68PKGFILES_CSWopenssh-client += $(libexecdir)/ssh-keysign
69PKGFILES_CSWopenssh-client += $(sysconfdir)/ssh/ssh_config.CSW
70PKGFILES_CSWopenssh-client += $(prefix)/etc/ssh/THIS_LOCATION_IS_DEPRECATED
71
72PROTOTYPE_MODIFIERS = setuid
73PROTOTYPE_FILES_setuid = $(libexecdir)/ssh-keysign
74PROTOTYPE_PERMS_setuid = 4711
75
76PRESERVECONF = $(sysconfdir)/ssh/sshd_config
77PRESERVECONF += $(sysconfdir)/ssh/ssh_config
78PRESERVECONF += $(sysconfdir)/ssh/moduli
79INITSMF = $(sysconfdir)/init.d/cswopenssh
80USERGROUP = $(prefix)/etc/pkg/CSWopenssh/cswusergroup
81
82MIGRATE_FILES_CSWopenssh = moduli sshd_config
83MIGRATE_FILES_CSWopenssh += ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub ssh_host_key ssh_host_key.pub
84MIGRATE_FILES_CSWopenssh += shosts.equiv
85MIGRATE_FILES_CSWopenssh += sshrc
86MIGRATE_FILES_CSWopenssh-client = ssh_config
87MIGRATE_FILES_CSWopenssh-client += ssh_known_hosts ssh_known_hosts2
88MIGRATE_FILES_CSWopenssh-client += ssh_prng_cmds
89MIGRATE_SOURCE_DIR = $(prefix)/etc/ssh
90MIGRATE_DEST_DIR = $(sysconfdir)/ssh
91
92CHECKPKG_OVERRIDES_CSWopenssh-client += file-with-bad-content|/usr/local|root/opt/csw/share/doc/openssh_client/INSTALL
93CHECKPKG_OVERRIDES_CSWopenssh += file-with-bad-content|/usr/local|root/opt/csw/share/doc/openssh/INSTALL
94CHECKPKG_OVERRIDES_CSWopenssh += file-with-bad-content|/usr/share|root/var/opt/csw/svc/manifest/network/cswopenssh.xml
95
96
97
98###### Upstream and OpenCSW files information #######
99
100MASTER_SITES = ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ http://www.sxw.org.uk/computing/patches/
101UPSTREAM_MASTER_SITES = ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
102
103# We define upstream file regex so we can be notifed of new upstream software release
104UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*p\d+).tar.gz
105
106DISTFILES  = $(NAME)-$(VERSION).tar.gz
107DISTFILES += changelog.CSW
108DISTFILES += cswusergroup
109
110DISTFILES += cswopenssh sshd.smf_wrapper cswopenssh.xml
111
112DISTFILES += THIS_LOCATION_IS_DEPRECATED
113
114LICENSE = LICENCE
115
116# The GSSAPI key exchange patch
117PATCHFILES = openssh-$(GSSKEX_PATCH_VERSION)-gsskex-all-$(GSSKEX_PATCH_DATE).patch
118
119# Prevent TIOCSCTTY from being used to avoid error:
120# ioctl(TIOCSCTTY): Invalid argument
121PATCHFILES += don_t_use_TIOCSCTTY.patch
122
123# Fix a X11 forwarding bug on machine installed with ipv6 disabled
124# see https://bugzilla.mindrot.org/show_bug.cgi?id=1457
125PATCHFILES += no_x_forwarding_bug.patch
126
127# Force openssh to not use /var/adm/lastlog but still prints last log information
128# Workaround to fix https://www.opencsw.org/mantis/view.php?id=4494
129# Bug filled upstream: https://bugzilla.mindrot.org/show_bug.cgi?id=87
130PATCHFILES += 0004-no-lastlog-file.patch
131
132# Rename the pidfile to use cswsshd.pid instead of sshd.pid in order to
133# avoid a clash with sun native ssh pid file
134# see https://www.opencsw.org/mantis/view.php?id=4398
135PATCHFILES += 0005-rename-pidfile.patch
136
137# documentation files to install (not a gar variable)
138DOCFILES = CREDITS ChangeLog ChangeLog.gssapi INSTALL LICENCE OVERVIEW README README.dns
139DOCFILES += README.platform README.privsep README.tun TODO
140
141# we're using conf handling class from the cswclassutils package
142RUNTIME_DEP_PKGS += CSWcswclassutils
143
144
145
146##### Build and installation information #####
147
148CONFIGURE_ARGS = $(DIRPATHS)
149CONFIGURE_ARGS += --with-kerberos5=$(prefix)
150CONFIGURE_ARGS += --sysconfdir=$(sysconfdir)/ssh
151CONFIGURE_ARGS += --with-solaris-contracts
152CONFIGURE_ARGS += --with-pam
153CONFIGURE_ARGS += --with-tcp-wrappers=$(prefix)
154CONFIGURE_ARGS += --with-privsep-path=$(localstatedir)/empty
155
156# We don't want to use lazy load because of
157# the chroot usage by sshd
158EXTRA_LD_OPTIONS = -z nolazyload
159
160TEST_SCRIPTS    =
161
162include gar/category.mk
163
164
165# we re-run autoconf because of the GSSAPI key exchange patch
166pre-configure:
167        cd $(WORKSRC) && autoconf
168        @$(MAKECOOKIE)
169
170# kr5config returns the -R/opt/csw/lib/ which is considered not valid by checkpkg
171# manually fixing this until the bug is fixed (see https://www.opencsw.org/mantis/view.php?id=4384 )
172post-configure-modulated:
173        cd $(WORKSRC) && perl -pi -e 's,-R/opt/csw/lib/ ,-R/opt/csw/lib ,' Makefile
174        @$(MAKECOOKIE)
175
176# adding documentation files
177pre-package: merge-config-files merge-doc-files merge-init-files merge-contrib-files merge-special-directories
178        @$(MAKECOOKIE)
179
180merge-contrib-files:
181        ginstall -D "$(WORKSRC_FIRSTMOD)/contrib/ssh-copy-id" "$(PKGROOT)/$(bindir)/ssh-copy-id"
182        ginstall -D "$(WORKSRC_FIRSTMOD)/contrib/ssh-copy-id.1" "$(PKGROOT)/$(mandir)/man1/ssh-copy-id.1"
183        chmod -x "$(PKGROOT)/$(mandir)/man1/ssh-copy-id.1"
184
185merge-init-files:
186        ginstall -D "$(WORKDIR_FIRSTMOD)/cswopenssh" "$(PKGROOT)/etc/opt/csw/init.d/cswopenssh"
187        ginstall -D "$(WORKDIR_FIRSTMOD)/cswopenssh.xml" "$(PKGROOT)/var/opt/csw/svc/manifest/network/cswopenssh.xml"
188        ginstall -D "$(WORKDIR_FIRSTMOD)/sshd.smf_wrapper" "$(PKGROOT)/opt/csw/sbin/sshd.smf_wrapper"
189
190merge-doc-files:
191        for DOCDIR in $(foreach _PKG,$(PACKAGES),$(call catalogname,$(_PKG))); do \
192                ginstall -d $(PKGROOT)/$(docdir)/$$DOCDIR; \
193                (cd $(WORKSRC_FIRSTMOD) && ginstall $(DOCFILES) $(PKGROOT)/$(docdir)/$$DOCDIR/); \
194                (cd $(PKGROOT)/$(docdir)/$$DOCDIR && chmod -x $(DOCFILES)); \
195                ginstall $(WORKDIR_FIRSTMOD)/changelog.CSW $(PKGROOT)/$(docdir)/$$DOCDIR/; \
196        done
197
198merge-config-files:
199        # we change some default value in the server config file
200        perl -pi -e 's,/etc/ssh/,$(sysconfdir)/ssh/,g; s,/usr/libexec/,/opt/csw/libexec/,g' "$(PKGROOT)/$(sysconfdir)/ssh/sshd_config.CSW"
201        perl -pi -e 's,^ *# *UsePAM *.*,UsePAM yes,g, s,^ *# *PrintMotd *.*,PrintMotd no,g; s,^ *# *X11Forwarding *.*,X11Forwarding yes,g' "$(PKGROOT)/$(sysconfdir)/ssh/sshd_config.CSW" 
202        ginstall -D "$(WORKDIR_FIRSTMOD)/cswusergroup" "$(PKGROOT)$(prefix)/etc/pkg/CSWopenssh/cswusergroup"
203        ginstall -D "$(WORKDIR_FIRSTMOD)/THIS_LOCATION_IS_DEPRECATED" "$(PKGROOT)/$(prefix)/etc/ssh/THIS_LOCATION_IS_DEPRECATED"
204
205merge-special-directories:
206        ginstall -d $(PKGROOT)$(localstatedir)/empty
207        ginstall -d $(PKGROOT)$(sysconfdir)/pkg/CSWopenssh
Note: See TracBrowser for help on using the browser.