File builders/openssh-8.6p1/builder.sh copied from file builders/libressl-3.3.3/builder.sh (similarity 57%) (mode: 100644) (index d7f28a1..72444e3) |
1 |
|
src_name=libressl |
|
|
1 |
|
src_name=openssh |
2 |
2 |
version=${pkg_name##*-} |
version=${pkg_name##*-} |
3 |
3 |
slot=$version |
slot=$version |
4 |
4 |
archive_name=$src_name-$version.tar.gz |
archive_name=$src_name-$version.tar.gz |
5 |
|
url0=https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/$archive_name |
|
|
5 |
|
url0=https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/$archive_name |
6 |
6 |
|
|
7 |
7 |
pkg_dir=$pkgs_dir_root/$src_name-$version |
pkg_dir=$pkgs_dir_root/$src_name-$version |
8 |
8 |
rm -Rf $pkg_dir |
rm -Rf $pkg_dir |
|
... |
... |
cp -f $src_dir_root/$archive_name $pkgs_dir_root |
11 |
11 |
cd $pkgs_dir_root |
cd $pkgs_dir_root |
12 |
12 |
tar xf $archive_name |
tar xf $archive_name |
13 |
13 |
|
|
|
14 |
|
#------------------------------------------------------------------------------- |
|
15 |
|
# fix missing prototypes of compat openbsd funcs which are in static libressl |
|
16 |
|
# libs... without that 64 bits values are truncated to 32 bits values... |
|
17 |
|
cd $pkg_dir |
|
18 |
|
cp $nyan_root/builders/$pkg_name/missing-protos.h ./ |
|
19 |
|
sed -i -e '$ d' ./includes.h |
|
20 |
|
printf '#include "missing-protos.h"\n#endif /* INCLUDES_H */' >>./includes.h |
|
21 |
|
#------------------------------------------------------------------------------- |
|
22 |
|
|
14 |
23 |
build_dir=$builds_dir_root/$src_name-$version |
build_dir=$builds_dir_root/$src_name-$version |
15 |
24 |
rm -Rf $build_dir |
rm -Rf $build_dir |
16 |
25 |
mkdir -p $build_dir |
mkdir -p $build_dir |
|
... |
... |
PATH_SAVED=$PATH |
20 |
29 |
export PATH="\ |
export PATH="\ |
21 |
30 |
/nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin:\ |
/nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin:\ |
22 |
31 |
/nyan/make/current/bin:\ |
/nyan/make/current/bin:\ |
|
32 |
|
/nyan/pkgconf/current/bin:\ |
23 |
33 |
$PATH\ |
$PATH\ |
24 |
34 |
" |
" |
25 |
35 |
target_gnu_triple=$(basename "$(ls -d /nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/*-gcc)") |
target_gnu_triple=$(basename "$(ls -d /nyan/toolchains/binutils-2.36.1-gcc-4.7.4/current/bin/*-gcc)") |
26 |
36 |
target_gnu_triple=${target_gnu_triple%-gcc} |
target_gnu_triple=${target_gnu_triple%-gcc} |
27 |
37 |
|
|
|
38 |
|
export "PKG_CONFIG_LIBDIR=/nyan/libressl/current/lib/pkgconfig" |
28 |
39 |
export 'CFLAGS=-O2 -pipe -fPIC' |
export 'CFLAGS=-O2 -pipe -fPIC' |
29 |
40 |
export "CC=$target_gnu_triple-gcc \ |
export "CC=$target_gnu_triple-gcc \ |
30 |
41 |
-isystem /nyan/glibc/current/include \ |
-isystem /nyan/glibc/current/include \ |
|
... |
... |
export "CC=$target_gnu_triple-gcc \ |
35 |
46 |
-Wl,-s \ |
-Wl,-s \ |
36 |
47 |
-static-libgcc" |
-static-libgcc" |
37 |
48 |
export AR=$target_gnu_triple-ar |
export AR=$target_gnu_triple-ar |
38 |
|
export NM=$target_gnu_tripel-nm |
|
39 |
49 |
$pkg_dir/configure \ |
$pkg_dir/configure \ |
40 |
50 |
--prefix=/nyan/$src_name/$slot \ |
--prefix=/nyan/$src_name/$slot \ |
41 |
|
--disable-shared \ |
|
42 |
|
--enable-nc |
|
|
51 |
|
--without-stackprotect \ |
|
52 |
|
--without-hardening \ |
|
53 |
|
--disable-strip \ |
|
54 |
|
--with-zlib=/nyan/zlib/current \ |
|
55 |
|
--with-ssl-dir=/nyan/libressl/current \ |
|
56 |
|
"--with-libs=$(pkgconf --static --libs libcrypto)" |
|
57 |
|
unset PKG_CONFIG_LIBDIR |
43 |
58 |
unset CFLAGS |
unset CFLAGS |
44 |
59 |
unset CC |
unset CC |
45 |
60 |
unset AR |
unset AR |
46 |
|
unset NM |
|
47 |
61 |
|
|
48 |
62 |
make -j $threads_n |
make -j $threads_n |
49 |
63 |
make install |
make install |
50 |
64 |
|
|
51 |
|
# cleanup and tidying |
|
52 |
65 |
rm -Rf /nyan/$src_name/$slot/share |
rm -Rf /nyan/$src_name/$slot/share |
53 |
|
rm -f /nyan/$src_name/$slot/lib/*.la |
|
54 |
66 |
|
|
55 |
67 |
export PATH=$PATH_SAVED |
export PATH=$PATH_SAVED |
56 |
68 |
unset PATH_SAVED |
unset PATH_SAVED |