##### this file is sourced not run
PKGVER=4.7.3
PKGBUILD=1
PKGARCH=x86_64

### dummy template: cut down Samba to size.
TARBALL=samba4-cutdown-$PKGVER-$PKGARCH-$PKGBUILD.txz
MD5SUM=
SRC_URL=samba4-$PKGVER-$PKGARCH-$PKGBUILD.txz
BUNDLE=

SLACKREQ=''
SLACKSUG=gst-plugins-base
SLACKDESC="samba4-cutdown: samba4-cutdown $PKGVER (Samba4 minimum files)  
samba4-cutdown:  
samba4-cutdown: This is the cut-down version of samba4.
samba4-cutdown: 
samba4-cutdown:   
samba4-cutdown: 
samba4-cutdown: 
samba4-cutdown: 
samba4-cutdown: 
samba4-cutdown: 
samba4-cutdown: 
"

PKG_NOMAKEPKG=yes
PKG_NOBUILD=yes

pkg_prepare() {
	: do nothing
}

pkg_download() {
	: do nothing
}

pkg_package() {
	if  [ -e $OUTPUT_DIR/$SRC_URL ] ; then
		echo extracting $SRC_URL
		mkdir tmp/samba4
		tar -xf $OUTPUT_DIR/$SRC_URL -C tmp/samba4
		
		# Remove up unnecessary stuff
		echo deleting files
		cd tmp/samba4		
	    xargs rm < ../pkg/delete-list
	    rm -r usr/include
	    rm -r usr/libexec
	    rm -r usr/share
	    rm -r usr/src
	    rm -r usr/lib64/perl5
	    rm -r usr/lib64/pkgconfig
	    rm -r usr/lib64/python2.7
	    rm -r etc/openldap
	    
	    #Install our smb.conf
	    
	    cp ../pkg/smb.conf etc/samba/
	    
	    #Install password files for spot 
	    
	    cp -r ../pkg/samba var/lib/
	    
		# build the package
		echo making package
		pkg_package_dir .		
	else
		return 1
	fi
}

pkg_build() { 
	: do nothing
}
 
