# Tanım: SMB Dosya sunucusu ve AD Etki Alanı sunucusu
# URL: http://www.samba.org
# Paketçi: milisarge
# Gerekler: talloc tevent avahi gnutls libgpg-error popt python cups kerberos libcap tdb openldap libxslt
# Grup: ağ

isim=samba
surum=4.6.7
devir=1
kaynak=(https://www.samba.org/samba/ftp/stable/$isim-$surum.tar.gz
		samba.conf)

derle() {

cd $isim-$surum


./configure                             \
    --prefix=/usr                       \
    --sysconfdir=/etc                   \
    --localstatedir=/var                \
    --with-piddir=/run/samba            \
    --with-pammodulesdir=/lib/security  \
    --without-ad-dc                     \
    --enable-fhs                        \
    --without-systemd                   \
    --bundled-libraries=!tdb,!talloc,!pytalloc-util,!tevent,!popt,!ldb

make

sed -i "/samba3.blackbox.failure.failure/i \^samba3.raw.eas" selftest/knownfail

make DESTDIR=$PKG install
 
install -v -m644 examples/smb.conf.default $PKG/etc/samba/smb.conf.default

mkdir -pv $PKG/etc/openldap/schema
install -v -m644 examples/LDAP/README $PKG/etc/openldap/schema/README.LDAP

install -v -m644 examples/LDAP/samba* $PKG/etc/openldap/schema

install -v -m755 examples/LDAP/{get*,ol*} $PKG/etc/openldap/schema

#ld.conf
mkdir -pv $PKG/etc/ld.so.conf.d
cp -f $SRC/samba.conf $PKG/etc/ld.so.conf.d/

#  cups 
cd $PKG/usr/lib/
install -d cups/backend
ln -v -sf $PKG/usr/bin/smbspool $PKG/usr/lib/cups/backend/smb

# servis
cd /sources/milis.git/ayarlar/servisler
make DESTDIR=$PKG kur-samba     
make DESTDIR=$PKG kur-winbindd   

# Doublon
rm -f $PKG/usr/lib/python2.7/site-packages/talloc.so
}