Skip to content

Commit

Permalink
Merge pull request #424 from mariux64/update-samba
Browse files Browse the repository at this point in the history
install samba4
  • Loading branch information
wwwutz authored Jul 13, 2017
2 parents b85fab6 + 590c34b commit 68b2c7c
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions samba4.be0
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env beesh
# BEE_VERSION samba4-4.6.5-3

SRCURL[0]="https://www.samba.org/samba/ftp/stable/samba-${PKGVERSION}.tar.gz"

# mariux patch to allow -with-config-file=
PATCHURL[0]="/src/mariux/download/samba4-add-config-file-configure-option.patch"

PREFIX=/usr/local/samba4
VARPATH=/var/samba4/localhost
BEE_BUILDTYPE=
# build_in_sourcedir

mee_configure() {
# see also https://github.com/samba-team/samba/blob/master/dynconfig/wscript
python ./buildtools/bin/waf configure \
--prefix=${PREFIX} \
--with-configdir=/etc/samba4 \
--with-config-file=/etc/samba4/smb.conf-localhost \
--localstatedir=${VARPATH}/state \
--with-lockdir=${VARPATH}/locks \
--with-statedir=${VARPATH}/state \
--with-privatedir=${VARPATH}/private \
--with-logfilebase=${VARPATH}/log \
--with-cachedir=${VARPATH}/cache \
--with-piddir=${VARPATH} \
--with-sockets-dir=${VARPATH}/run \
--with-privileged-socket-dir=${VARPATH}/run-priv \
--with-pammodulesdir=/lib/security \
--without-ad-dc \
--without-winbind \
--without-systemd

}

mee_build() {
# use 'make showflags' to get defaults... and add rpath GRMPF!!
make ${BEE_MAKEFLAGS} LDFLAGS='-pie -Wl,-z,relro -Wl,--as-needed -L./bin -Wl,-rpath,${LIBDIR}'
}

mee_install() {
make install DESTDIR=${D}

mkdir -p ${D}${PREFIX}
mkdir -p ${D}${SYSCONFDIR}
mkdir -p ${D}/lib
# enable resolve/map windows domain usernames
mv -v ${D}${LIBDIR}/libnss_win{s,bind}.so* ${D}/lib
ln -v -sf ../../lib/libnss_winbind.so.2 ${D}${LIBDIR}/libnss_winbind.so
ln -v -sf ../../lib/libnss_wins.so.2 ${D}${LIBDIR}/libnss_wins.so

# for donald..
echo "PATH=${BINDIR}:${SBINDIR}:\${PATH}" >>${D}${PREFIX}/profile
}

0 comments on commit 68b2c7c

Please sign in to comment.