summaryrefslogtreecommitdiff
path: root/source/n/samba/samba.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/samba/samba.SlackBuild')
-rwxr-xr-xsource/n/samba/samba.SlackBuild38
1 files changed, 30 insertions, 8 deletions
diff --git a/source/n/samba/samba.SlackBuild b/source/n/samba/samba.SlackBuild
index e62aab09..cf3918a1 100755
--- a/source/n/samba/samba.SlackBuild
+++ b/source/n/samba/samba.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,10 +21,19 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=${VERSION:-3.2.13}
-ARCH=${ARCH:-x86_64}
+VERSION=${VERSION:-$(echo samba-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-samba
@@ -36,6 +45,13 @@ rm -rf samba-$VERSION
tar xvf $CWD/samba-$VERSION.tar.?z* || exit 1
cd samba-$VERSION || exit 1
+if [ ! -d source3/lib/cmdline ]; then
+ ( cd source3/lib
+ mkdir cmdline
+ cd cmdline
+ ln -sf ../../../source3/include/popt_common.h . )
+fi
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -43,7 +59,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-cd source
+cd source3
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -58,11 +74,13 @@ fi
# Some of these options could be auto-detected, but declaring them
# here doesn't hurt and helps document what features we're trying to
# build in.
+#
+# LDFLAGS are needed to avoid problems with missing symbols.
+LDFLAGS="-Wl,--no-as-needed" \
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --with-libdir=/usr/lib${LIBDIRSUFFIX} \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--mandir=/usr/man \
@@ -80,6 +98,7 @@ CFLAGS="$SLKCFLAGS" \
--with-acl-support=yes \
--with-automount \
--with-cifsmount \
+ --with-cifsumount \
--with-quotas \
--with-syslog \
--with-utmp \
@@ -107,8 +126,8 @@ make install-everything DESTDIR=$PKG || exit 1
# Install libnss_win* libraries:
mkdir -p $PKG/lib${LIBDIRSUFFIX}
-cp -a nsswitch/libnss_winbind.so $PKG/lib${LIBDIRSUFFIX}/libnss_winbind.so.2
-cp -a nsswitch/libnss_wins.so $PKG/lib${LIBDIRSUFFIX}/libnss_wins.so.2
+cp -a ../nsswitch/libnss_winbind.so $PKG/lib${LIBDIRSUFFIX}/libnss_winbind.so.2
+cp -a ../nsswitch/libnss_wins.so $PKG/lib${LIBDIRSUFFIX}/libnss_wins.so.2
( cd $PKG/lib${LIBDIRSUFFIX}
ln -sf libnss_winbind.so.2 libnss_winbind.so
ln -sf libnss_wins.so.2 libnss_wins.so
@@ -159,6 +178,10 @@ gzip -9 $PKG/usr/man/man?/*.?
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# PAM related stuff we don't use:
+rm -r $PKG/usr/share/locale
+rm -f $PKG/usr/man/man8/pam*
+
cd ..
cp -a \
COPYING* MAINTAINERS Manifest PFIF.txt README* \
@@ -170,7 +193,6 @@ rm -rf $PKG/usr/doc/samba-$VERSION/docs/htmldocs \
mkdir -p $PKG/usr/doc/samba-$VERSION/docs
( cd $PKG/usr/doc/samba-$VERSION/docs
ln -sf /usr/share/swat/help htmldocs
- ln -sf /usr/share/swat/using_samba using_samba
)
# I'm sorry, but when all this info is included in HTML, adding 7MB worth of
# PDF files just to have extra artwork is more fluff than I'll agree to.