mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
c56a16f1ec
d/python-pip-20.3.3-x86_64-1.txz: Upgraded. kde/sddm-0.19.0-x86_64-3.txz: Rebuilt. In SDDM's Xsession script, don't source $HOME/.xsession as this may launch the wrong session type or cause dbus-run-session to start twice breaking logout. l/orc-0.4.32-x86_64-1.txz: Upgraded. l/pipewire-0.3.18-x86_64-1.txz: Upgraded. l/python-chardet-4.0.0-x86_64-1.txz: Upgraded. l/python-packaging-20.8-x86_64-1.txz: Upgraded. n/samba-4.13.3-x86_64-1.txz: Upgraded. xap/mozilla-thunderbird-78.6.0-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/thunderbird/78.6.0/releasenotes/ xfce/mousepad-0.5.0-x86_64-1.txz: Upgraded.
147 lines
4.7 KiB
Bash
Executable file
147 lines
4.7 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# Copyright 2007, Piter Punk, São Paulo, Brazil
|
|
# Copyright 2008, Eric Hameleers, Eindhoven, Netherlands
|
|
# All rights reserved.
|
|
#
|
|
# Redistribution and use of this script, with or without modification, is
|
|
# permitted provided that the following conditions are met:
|
|
#
|
|
# 1. Redistributions of this script must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
PKGNAM=dropbear
|
|
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
|
BUILD=${BUILD:-1}
|
|
|
|
# The programs we want to have as symlinks to dropbearmulti binary:
|
|
PROGS="dropbear dbclient dropbearkey dropbearconvert scp ssh"
|
|
|
|
# We build for the Slackware installer:
|
|
# This means, installing into /bin and /sbin ;
|
|
# and adding symlinks for ssh and scp without worry
|
|
# about overwriting any pre-existing binaries.
|
|
|
|
# Automatically determine the architecture we're building on:
|
|
if [ -z "$ARCH" ]; then
|
|
case "$( uname -m )" in
|
|
i?86) export ARCH=i586 ;;
|
|
arm*) export ARCH=arm ;;
|
|
# Unless $ARCH is already set, use uname -m for all other archs:
|
|
*) export ARCH=$( uname -m ) ;;
|
|
esac
|
|
fi
|
|
|
|
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
|
# the name of the created package would be, and then exit. This information
|
|
# could be useful to other scripts.
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
|
|
exit 0
|
|
fi
|
|
|
|
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
|
|
|
TMP=${TMP:-/tmp}
|
|
PKG=$TMP/package-$PKGNAM
|
|
|
|
if [ "$ARCH" = "i586" ]; then
|
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
|
LIBDIRSUFFIX=""
|
|
elif [ "$ARCH" = "s390" ]; then
|
|
SLKCFLAGS="-O2"
|
|
LIBDIRSUFFIX=""
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
SLKCFLAGS="-O2 -fPIC"
|
|
LIBDIRSUFFIX="64"
|
|
else
|
|
SLKCFLAGS="-O2"
|
|
LIBDIRSUFFIX=""
|
|
fi
|
|
|
|
rm -rf $PKG
|
|
mkdir -p $TMP $PKG
|
|
cd $TMP
|
|
rm -rf $PKGNAM-$VERSION
|
|
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
|
|
cd $PKGNAM-$VERSION || exit 1
|
|
chown -R root:root .
|
|
find . \
|
|
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
|
-exec chmod 755 {} \; -o \
|
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
|
-exec chmod 644 {} \;
|
|
|
|
# Patch to allow empty passwords (used in Slackware's installer):
|
|
patch -p1 < $CWD/dropbear_emptypass.patch
|
|
|
|
cp $CWD/localoptions.h .
|
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
./configure \
|
|
--prefix=/ \
|
|
--mandir=/usr/man \
|
|
--disable-syslog \
|
|
--disable-utmp \
|
|
--disable-utmpx \
|
|
--disable-wtmp \
|
|
--disable-wtmpx \
|
|
--disable-pututline \
|
|
--disable-pututxline \
|
|
--build=$ARCH-slackware-linux || exit 1
|
|
|
|
make PROGRAMS="$PROGS" MULTI="1" SCPPROGRESS="1" $NUMJOBS || exit 1
|
|
mkdir -p $PKG/sbin $PKG/bin $PKG/lib
|
|
make DESTDIR=$PKG MULTI="1" install || exit 1
|
|
|
|
# Copy manpages to package
|
|
mkdir -p $PKG/usr/man/man1
|
|
cp dbclient.1 $PKG/usr/man/man1
|
|
mkdir -p $PKG/usr/man/man8
|
|
cp dropbearkey.8 dropbear.8 $PKG/usr/man/man8
|
|
|
|
# Link binaries to dropbearmulti since the 'make install' does not do that
|
|
# if we build a multicall binary.
|
|
ln -s /bin/dropbearmulti $PKG/sbin/dropbear
|
|
for i in $(echo $PROGS | sed -e 's/dropbear //') ; do
|
|
ln -s /bin/dropbearmulti $PKG/bin/$i
|
|
done
|
|
|
|
if [ -d $PKG/usr/man ]; then
|
|
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
|
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
|
fi
|
|
|
|
mkdir -p $PKG/etc/rc.d $PKG/etc/dropbear
|
|
cp $CWD/rc.dropbear.new $PKG/etc/rc.d/ # doinst.sh will handle .new
|
|
|
|
# Don't ship .la files:
|
|
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
|
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
|
|
|
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
|
|
cp -a CHANGES INSTALL LICENSE MULTI README SMALL TODO \
|
|
$PKG/usr/doc/$PKGNAM-$VERSION
|
|
|
|
mkdir -p $PKG/install
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
|
|
|
|
cd $PKG
|
|
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
|