diff network/openssh/openssh.sh @ 1222:325631424c65

misc: bring back build function
author David Demelier <markand@malikania.fr>
date Wed, 27 Oct 2021 11:32:16 +0200
parents a47aaf9743a0
children ab85a4ae04ba
line wrap: on
line diff
--- a/network/openssh/openssh.sh	Fri Oct 15 16:07:30 2021 +0200
+++ b/network/openssh/openssh.sh	Wed Oct 27 11:32:16 2021 +0200
@@ -49,30 +49,33 @@
 	with_selinux="--without-selinux"
 fi
 
-rm -rf $PKGNAME-$PKGVERSION
-tar xvf $PKGNAME-$PKGVERSION.tar.gz
-cd $PKGNAME-$PKGVERSION
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvf $PKGNAME-$PKGVERSION.tar.gz
+	cd $PKGNAME-$PKGVERSION
 
-patch -p1 < ../CVE-2018-20685.patch
-patch -p1 < ../CVE-2019-6109.patch
-patch -p1 < ../CVE-2019-6111.patch
+	patch -p1 < ../CVE-2018-20685.patch
+	patch -p1 < ../CVE-2019-6109.patch
+	patch -p1 < ../CVE-2019-6111.patch
 
-CC="$CC" \
-CFLAGS="$CFLAGS" \
-LDFLAGS="$LDFLAGS" \
-LIBS="$LIBS" \
-./configure \
-	--build=$CBUILD \
-	--host=$CHOST \
-	--prefix=/usr \
-	--sysconfdir=/etc/ssh \
-	--with-pid-dir=/var/run \
-	--sbindir=/bin \
-	$with_pam \
-	$with_selinux
-make
-make install DESTDIR=$DESTDIR
-install -D -m 0644 ../sshd $DESTDIR/etc/rc.d/sshd
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix= \
+		--sysconfdir=/etc/ssh \
+		--with-pid-dir=/var/run \
+		--sbindir=/bin \
+		$with_pam \
+		$with_selinux
+	make
+	make install DESTDIR=$DESTDIR
+	install -D -m 0644 ../sshd $DESTDIR/etc/rc.d/sshd
 
-cd ..
-rm -rf $PKGNAME-$PKGVERSION
+	cd ..
+	rm -rf $PKGNAME-$PKGVERSION
+}