Merge pull request #229 from t-b/recompile_openssh_against_current_openssl
[msysgit.git] / src / openssh / release.sh
blob2698b6278ba5076dc009137debec95a3c9b83efd
1 #!/bin/sh
3 cd "$(dirname "$0")" && . ../common/update-lib.sh
5 check_pristine
7 package=openssh
8 version=6.6p1
9 url=http://ftp.OpenBSD.org/pub/OpenBSD/OpenSSH/portable/
10 d=openssh-$version
11 tar=$d.tar.gz
13 opt_flags="-O3 -s -march=i386"
14 export CFLAGS=${CFLAGS:-"${opt_flags}"}
15 export CPPFLAGS="${CPPFLAGS} -D__CYGWIN__"
16 export LDFLAGS="${LDFLAGS} -Wl,--enable-auto-import"
18 configure_options="--prefix=/usr --libexecdir=/libexec \
19 --datarootdir=\${prefix}/share
20 --without-rpath --sysconfdir=/etc/ssh --with-mantype=man \
21 --with-libs=-lminires"
24 do_textreadmode() {
25 test -f /lib/textreadmode.o && return
26 cat > "$d"/textreadmode.c <<-"EOF"
27 /* textreadmode.c
29 Copyright 2004 Red Hat, Inc.
31 This file is part of Cygwin.
33 This software is a copyrighted work licensed under the terms of the
34 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
35 details. */
37 #include <windows.h>
38 #include <sys/fcntl.h>
39 #include <sys/cygwin.h>
41 void
42 cygwin_premain0 (int argc, char **argv, struct per_process *myself)
44 static struct __cygwin_perfile pf[] =
46 {"", O_RDONLY | O_TEXT},
47 {NULL, 0}
49 cygwin_internal (CW_PERFILE, pf);
51 EOF
52 gcc -D__CYGWIN__ -o /lib/textreadmode.o -c "$d"/textreadmode.c &&
53 rm -f "$d"/textreadmode.c ||
54 die "Could not make textreadmode.o"
57 make_interface_libaries() {
58 test -f /lib/libminires.dll.a && return
59 (pexports /bin/msys-minires.dll > "$d"/tmp.def &&
60 dlltool -D msys-minires.dll -d "$d"/tmp.def -l /lib/libminires.dll.a &&
61 pexports /bin/msys-z.dll > "$d"/tmp.def &&
62 dlltool -D msys-z.dll -d "$d"/tmp.def -l /lib/libz.dll.a &&
63 pexports /bin/msys-crypto-1.0.0.dll | sed '1 s/-1\.0\.0//' > "$d"/tmp.def &&
64 dlltool -D msys-crypto-1.0.0.dll -d "$d"/tmp.def -l /lib/libcrypto.dll.a &&
65 rm -f "$d"/tmp.def) ||
66 die "Could not make interface libraries"
70 download &&
71 extract &&
72 apply_patches &&
73 do_textreadmode &&
74 make_interface_libaries
76 (cd "$d" && autoreconf -ivf) || die "Could not autoreconf"
78 setup
79 compile
81 # update index
82 FILELIST=fileList.txt
84 pre_install
86 (cd "$d" && make install) || die "Could not install"
88 post_install