mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
- make building and installing of samba server optional (default enabled, setup via /projects/*/options)
79 lines
2.4 KiB
Bash
Executable File
79 lines
2.4 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
. config/options
|
|
|
|
$SCRIPTS/build toolchain
|
|
|
|
if [ "$AVAHI_DAEMON" = yes ]; then
|
|
$SCRIPTS/build avahi
|
|
SMB_AVAHI="--enable-avahi"
|
|
else
|
|
SMB_AVAHI="--disable-avahi"
|
|
fi
|
|
|
|
# Fails to compile using the gold linker
|
|
CFLAGS=`echo $CFLAGS | sed -e "s|-fuse-linker-plugin||" -e "s|-fuse-ld=gold||"`
|
|
CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-fuse-linker-plugin||" -e "s|-fuse-ld=gold||"`
|
|
LDFLAGS=`echo $LDFLAGS | sed -e "s|-fuse-linker-plugin||" -e "s|-fuse-ld=gold||"`
|
|
|
|
# Fails to compile with GCC's link time optimization.
|
|
CFLAGS=`echo $CFLAGS | sed -e "s|-flto||" -e "s|-fuse-linker-plugin||"`
|
|
CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-flto||" -e "s|-fuse-linker-plugin||"`
|
|
LDFLAGS=`echo $LDFLAGS | sed -e "s|-flto||" -e "s|-fuse-linker-plugin||" -e "s|-fwhole-program||"`
|
|
|
|
export samba_cv_CC_NEGATIVE_ENUM_VALUES=no
|
|
|
|
cd $PKG_BUILD/source3
|
|
./configure --host=$TARGET_NAME \
|
|
--build=$HOST_NAME \
|
|
--prefix=/usr \
|
|
--localstatedir=/var \
|
|
--sysconfdir=/etc \
|
|
--with-configdir=/etc/samba \
|
|
--with-privatedir=/var/run \
|
|
--enable-shared \
|
|
--disable-static \
|
|
--enable-debug \
|
|
--with-fhs \
|
|
--enable-pie \
|
|
--with-pthreads \
|
|
--with-sqlite3 \
|
|
--enable-relro \
|
|
--disable-swat \
|
|
--disable-cups \
|
|
$SMB_AVAHI \
|
|
--without-pam \
|
|
--without-ads \
|
|
--without-libtalloc \
|
|
--without-libtdb \
|
|
--without-libnetapi \
|
|
--without-cifsmount \
|
|
--without-ldap \
|
|
--without-acl-support \
|
|
--with-winbind \
|
|
--with-dnsupdate \
|
|
--with-automount \
|
|
--with-included-popt \
|
|
--with-libsmbclient \
|
|
--without-libsmbsharemodes \
|
|
--without-quotas \
|
|
--without-sys-quotas \
|
|
--with-syslog \
|
|
|
|
make bin/libsmbclient.so
|
|
|
|
if [ "$SAMBA_SERVER" = yes ]; then
|
|
make bin/smbd
|
|
fi
|
|
|
|
mkdir -p $SYSROOT_PREFIX/usr/lib
|
|
cp -PR bin/libsmbclient.so* $SYSROOT_PREFIX/usr/lib
|
|
cp -PR bin/libwbclient.so* $SYSROOT_PREFIX/usr/lib
|
|
|
|
mkdir -p $SYSROOT_PREFIX/usr/include
|
|
cp include/libsmbclient.h $SYSROOT_PREFIX/usr/include
|
|
|
|
mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig
|
|
cp pkgconfig/smbclient.pc $SYSROOT_PREFIX/usr/lib/pkgconfig
|
|
cp pkgconfig/wbclient.pc $SYSROOT_PREFIX/usr/lib/pkgconfig
|