diff options
Diffstat (limited to 'source/n/netatalk/netatalk.SlackBuild')
-rwxr-xr-x | source/n/netatalk/netatalk.SlackBuild | 79 |
1 files changed, 39 insertions, 40 deletions
diff --git a/source/n/netatalk/netatalk.SlackBuild b/source/n/netatalk/netatalk.SlackBuild index acb26fe93..4183e3f41 100755 --- a/source/n/netatalk/netatalk.SlackBuild +++ b/source/n/netatalk/netatalk.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2008, 2009, 2012, 2015, 2018, 2019, 2020, 2022 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2012, 2015, 2018, 2019, 2020, 2022, 2024 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,12 +26,12 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=netatalk VERSION=${VERSION:-$(echo netatalk-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i586 ;; + i?86) export ARCH=i686 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; @@ -48,14 +48,11 @@ fi NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" +if [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=pentium4 -mtune=generic" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-O2 -march=x86-64 -mtune=generic -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" @@ -78,43 +75,47 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ -# Choose correct options depending on whether PAM is installed: -if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then - PAM_OPTIONS="--with-pam-confdir=/etc/pam.d --with-pam --enable-ddp" - unset SHADOW_OPTIONS -else - unset PAM_OPTIONS - SHADOW_OPTIONS="--with-shadow" -fi - -# use the system libevent, because the internal one won't compile -# with openssl 1.1. Also skip pam and kerberos (for now). -CFLAGS="$SLKCFLAGS" \ -./configure \ +# Configure, build, and install: +export CFLAGS="$SLKCFLAGS" +export CXXFLAGS="$SLKCFLAGS" +mkdir meson-build +cd meson-build +meson setup \ --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ + --libdir=lib${LIBDIRSUFFIX} \ + --libexecdir=/usr/libexec \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --includedir=/usr/include \ + --datadir=/usr/share \ --mandir=/usr/man \ --sysconfdir=/etc/netatalk \ - --libexecdir=/usr/sbin \ --localstatedir=/var \ - --disable-static \ - $PAM_OPTIONS \ - $SHADOW_OPTIONS \ - --with-libevent=system \ - --with-dbus-sysconf-dir=/usr/share/dbus-1/system.d/ \ - --with-dbus-daemon=/usr/bin/dbus-daemon \ - --build=$ARCH-slackware-linux || exit 1 - -make $NUMJOBS || make || exit 1 -make install DESTDIR=$PKG || exit 1 + --buildtype=release \ + -Dwith-pam=true \ + -Dwith-pam-config-path=/etc/pam.d \ + -Dwith-dbus-sysconf-path=/usr/share/dbus-1/system.d/ \ + -Dwith-dbus-daemon-path=/usr/bin/dbus-daemon \ + -Dwith-overwrite=true \ + .. || exit 1 + "${NINJA:=ninja}" $NUMJOBS || exit 1 + DESTDIR=$PKG $NINJA install || exit 1 +cd .. + +# Hmm, this went missing: +if [ ! -r $PKG/etc/netatalk/afp.conf ]; then + cp -a meson-build/config/afp.conf $PKG/etc/netatalk/afp.conf + chown root:root $PKG/etc/netatalk/afp.conf + chmod 644 $PKG/etc/netatalk/afp.conf +fi # At least make this unreadable to non-root users: if [ -u $PKG/usr/bin/afppasswd ]; then chmod 4711 $PKG/usr/bin/afppasswd fi -# Don't ship .la files: -rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la +# Don't ship static libraries: +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/{*.a,netatalk/*.a} find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null @@ -141,13 +142,11 @@ cat $CWD/slack-desc > $PKG/install/slack-desc done ) -if [ ! -z "$PAM_OPTIONS" ]; then - mv $PKG/etc/pam.d/netatalk $PKG/etc/pam.d/netatalk.new -fi +mv $PKG/etc/pam.d/netatalk $PKG/etc/pam.d/netatalk.new mkdir -p $PKG/usr/doc/netatalk-$VERSION cp -a \ - AUTHORS CONTRIBUTORS COPYING* COPYRIGHT NEWS VERSION \ + AUTHORS* CONTRIBUTORS* COPYING* COPYRIGHT* NEWS* README* VERSION* \ $PKG/usr/doc/netatalk-$VERSION cp -a $CWD/examples $PKG/usr/doc/netatalk-$VERSION chown -R root:root $PKG/usr/doc/netatalk-$VERSION/examples |