1 #!/usr/bin/bash
2 #
3 # CDDL HEADER START
4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
8 # with the License.
9 #
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
14 #
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
20 #
21 # CDDL HEADER END
22 #
23 #
24 # Copyright 2011-2013 OmniTI Computer Consulting, Inc. All rights reserved.
25 # Use is subject to license terms.
26 #
27 # Load support functions
28 . ../../lib/functions.sh
29
30 PROG=openssh
31 VER=7.1p2
32 VERHUMAN=$VER
33 PKG=network/openssh
34 SUMMARY="OpenSSH Client and utilities"
35 DESC="OpenSSH Secure Shell protocol Client and associated Utilities"
36
37 BUILDARCH=32
38 # Since we're only building 32-bit, don't bother with isaexec subdirs
39 CONFIGURE_OPTS_32="
40 --prefix=$PREFIX
41 --sysconfdir=/etc/ssh
42 --includedir=$PREFIX/include
43 --bindir=$PREFIX/bin
44 --sbindir=$PREFIX/sbin
45 --libdir=$PREFIX/lib
46 --libexecdir=$PREFIX/libexec
47 "
48 # Feature choices
49 CONFIGURE_OPTS="
50 --with-audit=solaris
51 --with-kerberos5=$PREFIX/usr
52 --with-pam
53 --with-sandbox=solaris
54 --with-solaris-contracts
55 --with-solaris-privs
56 --with-tcp-wrappers
57 --with-4in6
58 --enable-strip=no
59 --without-rpath
60 --disable-lastlog
61 --with-privsep-user=daemon
62 --with-ssl-engine
63 --with-solaris-projects
64 "
65
66 CFLAGS+="-DPAM_ENHANCEMENT -DSET_USE_PAM -DPAM_BUGFIX -DDTRACE_SFTP "
67 CFLAGS+="-I/usr/include/kerberosv5 -DKRB5_BUILD_FIX -DDISABLE_BANNER "
68 CFLAGS+="-DDEPRECATE_SUNSSH_OPT -DOPTION_DEFAULT_VALUE -DSANDBOX_SOLARIS"
69
70 auto_reconf() {
71 # This package needs a whack upside the head post-patches!
72 pushd $TMPDIR/$BUILDDIR
73 autoreconf -fi
74 popd
75 }
76
77 init
78 download_source $PROG $PROG $VER
79 patch_source
80 auto_reconf
81 prep_build
82 run_autoconf
83 build
84
85 # Remove the letter from VER for packaging
86 VER=${VER//p/.}
87
88 # Client package
89 RUN_DEPENDS_IPS="-pkg:/network/ssh -pkg:/network/ssh/ssh-key"
90 make_package client.mog
91
92 # Server package
93 PKG=network/openssh-server
94 PKGE=$(url_encode $PKG)
95 SUMMARY="OpenSSH Server"
96 DESC="OpenSSH Secure Shell protocol Server"
97 RUN_DEPENDS_IPS="-pkg:/service/network/ssh pkg:/network/openssh@$VER"
98 make_package server.mog
99
100 clean_up
101
102 # Vim hints
103 # vim:ts=4:sw=4:et: