From e65efe930ec0f86eb207fabf8a5502d23af566a2 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Tue, 28 Oct 2008 16:10:31 -0500
Subject: add samba & update smb-client

---
 abs/core-testing/samba/PKGBUILD                    | 77 ++++++++++++++++++++++
 abs/core-testing/samba/heimdal.patch               | 33 ++++++++++
 abs/core-testing/samba/no-clients.patch            | 31 +++++++++
 abs/core-testing/samba/samba                       | 51 ++++++++++++++
 abs/core-testing/samba/samba-3.0.21a-ntlmssp.patch | 13 ++++
 abs/core-testing/samba/samba.conf.d                |  7 ++
 abs/core-testing/samba/samba.logrotate             |  9 +++
 abs/core-testing/samba/samba.pam                   |  3 +
 abs/core-testing/samba/swat.xinetd                 | 10 +++
 abs/core-testing/smbclient/PKGBUILD                | 52 +++++++--------
 abs/core-testing/smbclient/heimdal.patch           | 33 ----------
 abs/core-testing/tdb/PKGBUILD                      | 29 ++++++++
 abs/core-testing/tdb/gcc3.patch                    | 41 ++++++++++++
 13 files changed, 329 insertions(+), 60 deletions(-)
 create mode 100644 abs/core-testing/samba/PKGBUILD
 create mode 100644 abs/core-testing/samba/heimdal.patch
 create mode 100644 abs/core-testing/samba/no-clients.patch
 create mode 100755 abs/core-testing/samba/samba
 create mode 100644 abs/core-testing/samba/samba-3.0.21a-ntlmssp.patch
 create mode 100644 abs/core-testing/samba/samba.conf.d
 create mode 100644 abs/core-testing/samba/samba.logrotate
 create mode 100644 abs/core-testing/samba/samba.pam
 create mode 100644 abs/core-testing/samba/swat.xinetd
 delete mode 100644 abs/core-testing/smbclient/heimdal.patch
 create mode 100644 abs/core-testing/tdb/PKGBUILD
 create mode 100644 abs/core-testing/tdb/gcc3.patch

diff --git a/abs/core-testing/samba/PKGBUILD b/abs/core-testing/samba/PKGBUILD
new file mode 100644
index 0000000..b3ea7ca
--- /dev/null
+++ b/abs/core-testing/samba/PKGBUILD
@@ -0,0 +1,77 @@
+# $Id: PKGBUILD 14140 2008-10-04 09:43:47Z tpowa $
+# Maintainer: judd <jvinet@zeroflux.org>
+pkgname=samba
+pkgver=3.2.4
+# We use the 'A' to fake out pacman's version comparators.  Samba chooses
+# to append 'a','b',etc to their subsequent releases, which pamcan
+# misconstrues as alpha, beta, etc.  Bad samba!
+_realver=3.2.4
+pkgrel=3
+pkgdesc="Tools to access a server's filespace and printers via SMB"
+arch=(i686 x86_64)
+url="http://www.samba.org"
+license=('GPL3')
+backup=(etc/logrotate.d/samba etc/pam.d/samba etc/samba/smb.conf etc/xinetd.d/swat etc/conf.d/samba)
+depends=('db>=4.7' 'popt' 'libcups' 'acl' 'libldap' 'smbclient=3.2.4' 'libcap' 'heimdal>=1.2-1' 'pam' 'fam' 'gnutls>=2.4.1' 'tdb=3.2.4')
+options=(!makeflags)
+source=(http://us1.samba.org/samba/ftp/stable/${pkgname}-${_realver}.tar.gz \
+        no-clients.patch samba samba.logrotate swat.xinetd samba.pam samba.conf.d)
+
+build() {
+  cd ${startdir}/src/${pkgname}-${_realver}/source
+  patch -Np2 -i ${startdir}/src/no-clients.patch || return 1
+
+  ./configure --prefix=/usr --with-configdir=/etc/samba \
+              --with-lockdir=/var/cache/samba \
+              --with-piddir=/var/run/samba \
+              --with-fhs --with-pam --with-ads --with-acl-support \
+              --without-cifsmount --without-libsmbclient \
+              --localstatedir=/var --disable-dnssd --libdir=/usr/lib/samba
+  make || return 1
+  mkdir -p $startdir/pkg/var/log/samba
+  mkdir -p $startdir/pkg/etc/samba/private
+  chmod 700 $startdir/pkg/etc/samba/private
+  make DESTDIR=$startdir/pkg install
+  chmod 644 $startdir/pkg/usr/include/*.h
+  rm -rf $startdir/pkg/usr/var
+  (cd script; cp installbin.sh i; cat i | sed 's/\/sbin\///' > installbin.sh)
+  install -D -m755 ../../samba $startdir/pkg/etc/rc.d/samba
+  install -D -m644 ../../samba.conf.d $startdir/pkg/etc/conf.d/samba
+  mkdir -p $startdir/pkg/etc/samba
+  cat ../examples/smb.conf.default | \
+    sed 's|log file = .*$|log file = /var/log/samba/log.%m|g' >$startdir/pkg/etc/samba/smb.conf.default
+  install -D -m644 ../../samba.logrotate $startdir/pkg/etc/logrotate.d/samba
+  install -D -m644 ../../swat.xinetd $startdir/pkg/etc/xinetd.d/swat
+  install -D -m644 ../../samba.pam $startdir/pkg/etc/pam.d/samba
+  # symlink libs
+  for i in ${startdir}/pkg/usr/lib/samba/libsmbshare*; do
+	ln -sf samba/$(basename $i) ${startdir}/pkg/usr/lib/$(basename $i)
+  done
+  # spool directory
+  install -d -m1777 $startdir/pkg/var/spool/samba
+  sed -i 's|/usr/spool/samba|/var/spool/samba|g' $startdir/pkg/etc/samba/smb.conf.default
+  # fix logrotate
+  sed -i -e 's|log.%m|%m.log|g' $startdir/pkg/etc/samba/smb.conf.default
+  # nsswitch libraries
+  install -D -m755 nsswitch/libnss_wins.so $startdir/pkg/lib/libnss_wins.so
+  ln -s libnss_wins.so $startdir/pkg/lib/libnss_wins.so.2
+  install -D -m755 nsswitch/libnss_winbind.so $startdir/pkg/lib/libnss_winbind.so
+  install -D -m755 bin/pam_winbind.so $startdir/pkg/lib/security/pam_winbind.so
+  # remove conflict files of smbclient and tdb
+  for man in libsmbclient smbspool \
+      umount.cifs mount.cifs net; do
+    rm -f ${startdir}/pkg/usr/share/man/man8/${man}.8
+  done
+  for i in libnetapi* libtdb* libtalloc* libwbclient*; do
+	  rm -f ${startdir}/pkg/usr/lib/samba/$i
+  done
+  rm -f ${startdir}/pkg/usr/bin/tdbbackup
+  rm -f ${startdir}/pkg/usr/include/{tdb.h,talloc.h,netapi.h}
+  for man in rpcclient smbcacls smbclient smbcquotas \
+      smbtree smbtar nmblookup smbget; do
+    rm -f ${startdir}/pkg/usr/share/man/man1/${man}.1
+  done
+  rm -f ${startdir}/pkg/usr/share/man/man7/libsmbclient.7
+
+  rm -f ${startdir}/pkg/usr/include/libsmbclient.h
+}
diff --git a/abs/core-testing/samba/heimdal.patch b/abs/core-testing/samba/heimdal.patch
new file mode 100644
index 0000000..5338c37
--- /dev/null
+++ b/abs/core-testing/samba/heimdal.patch
@@ -0,0 +1,33 @@
+Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
+Date:                    2005-09-21
+Initial Package Version: 3.0.20
+Upstream Status:         Not submitted (it is not an upstream Samba issue)
+Origin:                  Randy McMurchy
+Description:             Fixes an issue if you have Heimdal installed as
+                         Heimdal uses reserved C++ words and the Samba headers
+                         now look for these conflicts. This patch comments out
+                         the check for C++ reserved words. Heimdal is aware of
+                         the issue
+
+$LastChangedBy: randy $
+$Date: 2005/09/29 18:25:12 $
+
+
+--- samba-3.0.20-orig/source/include/includes.h	2005-07-28 13:19:49.000000000 +0000
++++ samba-3.0.20/source/include/includes.h	2005-09-04 13:45:01.000000000 +0000
+@@ -25,6 +25,7 @@
+ #include "config.h"
+ #endif
+ 
++/*
+ #ifndef __cplusplus
+ #define class #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
+ #define private #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
+@@ -36,6 +37,7 @@
+ #define delete #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
+ #define friend #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
+ #endif
++*/
+ 
+ #include "local.h"
+ 
diff --git a/abs/core-testing/samba/no-clients.patch b/abs/core-testing/samba/no-clients.patch
new file mode 100644
index 0000000..61e4e5c
--- /dev/null
+++ b/abs/core-testing/samba/no-clients.patch
@@ -0,0 +1,31 @@
+diff -Naur samba-3.0.23-orig/source/Makefile.in samba-3.0.23/source/Makefile.in
+--- samba-3.0.23-orig/source/Makefile.in	2006-07-10 09:27:55.000000000 -0700
++++ samba-3.0.23/source/Makefile.in	2006-07-11 14:34:39.000000000 -0700
+@@ -138,14 +138,10 @@
+ 
+ ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
+ 
+-BIN_PROGS1 = bin/smbclient@EXEEXT@ bin/net@EXEEXT@ bin/smbspool@EXEEXT@ \
+-	bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@ bin/smbget@EXEEXT@
+-BIN_PROGS2 = bin/smbcontrol@EXEEXT@ bin/smbtree@EXEEXT@ bin/tdbbackup@EXEEXT@ \
+-	bin/nmblookup@EXEEXT@ bin/pdbedit@EXEEXT@ bin/tdbdump@EXEEXT@ \
+-	bin/tdbtool@EXEEXT@
+-BIN_PROGS3 = bin/smbpasswd@EXEEXT@ bin/rpcclient@EXEEXT@ bin/smbcacls@EXEEXT@ \
+-	bin/profiles@EXEEXT@ bin/ntlm_auth@EXEEXT@ \
+-	bin/smbcquotas@EXEEXT@ bin/eventlogadm@EXEEXT@
++BIN_PROGS1 = bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@
++BIN_PROGS2 = bin/smbcontrol@EXEEXT@ bin/tdbbackup@EXEEXT@ bin/pdbedit@EXEEXT@
++BIN_PROGS3 = bin/smbpasswd@EXEEXT@ bin/profiles@EXEEXT@ bin/ntlm_auth@EXEEXT@ \
++	bin/eventlogadm@EXEEXT@
+ BIN_PROGS4 = bin/ldbedit@EXEEXT@ bin/ldbsearch@EXEEXT@ bin/ldbadd@EXEEXT@ \
+ 	bin/ldbdel@EXEEXT@ bin/ldbmodify@EXEEXT@
+ 
+@@ -160,7 +156,7 @@
+ 
+ PAM_MODULES = @PAM_MODULES@
+ 
+-SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
++SCRIPTS = $(builddir)/script/findsmb
+ 
+ VFS_MODULES = @VFS_MODULES@
+ PDB_MODULES = @PDB_MODULES@
diff --git a/abs/core-testing/samba/samba b/abs/core-testing/samba/samba
new file mode 100755
index 0000000..bc7d527
--- /dev/null
+++ b/abs/core-testing/samba/samba
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+[ -f /etc/conf.d/samba ] && . /etc/conf.d/samba
+
+[ -z "$SAMBA_DAEMONS" ] && SAMBA_DAEMONS=(smbd nmbd)
+
+case "$1" in
+	start)
+		rc=0
+		stat_busy "Starting Samba Server"
+		for d in ${SAMBA_DAEMONS[@]}; do
+			PID=`pidof -o %PPID /usr/sbin/$d`
+			[ -z "$PID" ] && /usr/sbin/$d -D
+			rc=$(($rc+$?))
+		done
+		if [ $rc -gt 0 ]; then
+			stat_fail
+		else
+			add_daemon samba
+			stat_done
+		fi
+	;;
+	stop)
+		rc=0
+		stat_busy "Stopping Samba Server"
+		for d in ${SAMBA_DAEMONS[@]}; do
+			PID=`pidof -o %PPID /usr/sbin/$d`
+			[ -z "$PID" ] || kill $PID &> /dev/null
+			rc=$(($rc+$?))
+		done
+		if [ $rc -gt 0 ]; then
+			stat_fail
+		else
+			rm /var/run/samba/smbd.pid &>/dev/null
+			rm /var/run/samba/nmbd.pid &>/dev/null
+			rm /var/run/samba/winbindd.pid &>/dev/null
+			rm_daemon samba
+			stat_done
+		fi
+	;;
+	restart)
+		$0 stop
+		sleep 1
+		$0 start
+	;;
+	*)
+		echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/core-testing/samba/samba-3.0.21a-ntlmssp.patch b/abs/core-testing/samba/samba-3.0.21a-ntlmssp.patch
new file mode 100644
index 0000000..6b65449
--- /dev/null
+++ b/abs/core-testing/samba/samba-3.0.21a-ntlmssp.patch
@@ -0,0 +1,13 @@
+--- ntlmssp.c.old	Fri Jan 13 15:33:50 2006
++++ ntlmssp.c	Fri Jan 13 15:33:16 2006
+@@ -399,8 +399,9 @@
+ 			ntlmssp_state->session_key.data[6] = 0x38;
+ 			ntlmssp_state->session_key.data[7] = 0xb0;
+ 		}
+-		ntlmssp_state->session_key.length = 8;
++      /*		ntlmssp_state->session_key.length = 8; */
+ 	}
++
+ }
+ 
+ /**
diff --git a/abs/core-testing/samba/samba.conf.d b/abs/core-testing/samba/samba.conf.d
new file mode 100644
index 0000000..8721f95
--- /dev/null
+++ b/abs/core-testing/samba/samba.conf.d
@@ -0,0 +1,7 @@
+#
+# Configuration for the samba init script
+#
+
+# space separated list of daemons to launch
+SAMBA_DAEMONS=(smbd nmbd)
+#SAMBA_DAEMONS=(smbd nmbd winbindd)
diff --git a/abs/core-testing/samba/samba.logrotate b/abs/core-testing/samba/samba.logrotate
new file mode 100644
index 0000000..581f4c3
--- /dev/null
+++ b/abs/core-testing/samba/samba.logrotate
@@ -0,0 +1,9 @@
+/var/log/samba/log.smbd /var/log/samba/log.nmbd /var/log/samba/*.log {
+   notifempty
+   missingok
+   sharedscripts
+   copytruncate
+   postrotate
+      /bin/kill -HUP `cat /var/run/samba/*.pid 2>/dev/null` 2>/dev/null || true
+   endscript
+}
diff --git a/abs/core-testing/samba/samba.pam b/abs/core-testing/samba/samba.pam
new file mode 100644
index 0000000..53724d1
--- /dev/null
+++ b/abs/core-testing/samba/samba.pam
@@ -0,0 +1,3 @@
+auth		required	pam_unix.so
+account		required	pam_unix.so
+session		required	pam_unix.so
diff --git a/abs/core-testing/samba/swat.xinetd b/abs/core-testing/samba/swat.xinetd
new file mode 100644
index 0000000..2e62a82
--- /dev/null
+++ b/abs/core-testing/samba/swat.xinetd
@@ -0,0 +1,10 @@
+service swat
+{
+        socket_type             = stream
+        wait                    = no
+        user                    = root
+        server                  = /usr/sbin/swat
+        log_on_success  += HOST DURATION
+        log_on_failure  += HOST
+        disable                 = yes
+}
diff --git a/abs/core-testing/smbclient/PKGBUILD b/abs/core-testing/smbclient/PKGBUILD
index b7eb349..5e423ebe 100644
--- a/abs/core-testing/smbclient/PKGBUILD
+++ b/abs/core-testing/smbclient/PKGBUILD
@@ -1,53 +1,50 @@
-# $Id: PKGBUILD 3859 2008-07-01 17:10:34Z andyrtr $
+# $Id: PKGBUILD 14139 2008-10-04 09:13:09Z tpowa $
 # Maintainer: Jan de Groot <jgc@archlinux.org>
 pkgname=smbclient
-pkgver=3.0.31
+pkgver=3.2.4
 # We use the 'A' to fake out pacman's version comparators.  Samba chooses
 # to append 'a','b',etc to their subsequent releases, which pamcan
 # misconstrues as alpha, beta, etc.  Bad samba!
-_realver=3.0.31
-pkgrel=2
+_realver=3.2.4
+pkgrel=3
 pkgdesc="Tools to access a server's filespace and printers via SMB"
 arch=(i686 x86_64)
 url="http://www.samba.org"
-license=('GPL')
-options=(!makeflags)
-depends=('popt' 'libldap' 'libcap' 'heimdal>=1.2-1' 'db>=4.7')
+license=('GPL3')
+depends=('popt' 'libldap' 'libcap' 'heimdal>=1.2-1' 'db>=4.7' 'tdb=3.2.4')
 source=(http://us1.samba.org/samba/ftp/samba-${_realver}.tar.gz)
-md5sums=('165abaf4522c70031d9a76fbb638ca06')
+options=(!makeflags)
 
 build() {
   cd ${startdir}/src/samba-${_realver}/source
 
-  ./configure --prefix=/usr --with-smbmount --with-fhs --with-pam \
+  ./configure --prefix=/usr --with-cifsmount --with-fhs --with-pam \
               --with-datadir=/usr/share --with-configdir=/etc/samba \
               --with-lockdir=/var/run/samba --with-ads --with-acl-support \
-	      --localstatedir=/var
+	      --localstatedir=/var --disable-dnssd  --libdir=/usr/lib/samba
+
   make proto bin/smbclient libsmbclient \
        bin/rpcclient bin/smbspool bin/smbtree \
-       bin/smbcacls bin/smbcquotas bin/smbmount bin/smbmnt bin/smbget \
-       bin/smbumount bin/net bin/nmblookup || return 1
-  mkdir -p ${startdir}/pkg/usr/bin ${startdir}/pkg/sbin
-  install -m755 bin/* ${startdir}/pkg/usr/bin/
+       bin/smbcacls bin/smbcquotas bin/smbget \
+       bin/net bin/nmblookup bin/mount.cifs bin/umount.cifs || return 1
+  mkdir -p ${startdir}/pkg/usr/bin ${startdir}/pkg/sbin ${startdir}/pkg/usr/lib/samba
+  install -m755 bin/{smbclient,rpcclient,smbspool,smbtree,smbcacls,smbcquotas,smbget,net,nmblookup} ${startdir}/pkg/usr/bin/
+  install -m755 bin/{mount.cifs,umount.cifs} ${startdir}/pkg/sbin/
+  mv  bin/*.so* ${startdir}/pkg/usr/lib/samba
   install -m755 script/smbtar ${startdir}/pkg/usr/bin/
-  ln -sf /usr/bin/smbmount ${startdir}/pkg/sbin/mount.smbfs
-  ln -sf /usr/bin/smbumount ${startdir}/pkg/sbin/umount.smbfs
   mkdir -p ${startdir}/pkg/usr/lib/cups/backend
   ln -sf /usr/bin/smbspool ${startdir}/pkg/usr/lib/cups/backend/smb
-
-  mkdir -p ${startdir}/pkg/usr/lib/samba
-  mv ${startdir}/pkg/usr/bin/libsmbclient.* ${startdir}/pkg/usr/lib/samba/
-  ln -sf samba/libsmbclient.so ${startdir}/pkg/usr/lib/libsmbclient.so
-  ln -sf samba/libsmbclient.so ${startdir}/pkg/usr/lib/libsmbclient.so.0
+  for i in ${startdir}/pkg/usr/lib/samba/*; do
+   	ln -sf samba/$(basename $i) ${startdir}/pkg/usr/lib/$(basename $i)
+  done
+  rm -rf $startdir/pkg/usr/lib/libtdb*
   mkdir -p ${startdir}/pkg/usr/include
   install -m644 include/libsmbclient.h ${startdir}/pkg/usr/include/
-
-  gcc -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o ${startdir}/pkg/sbin/mount.cifs client/mount.cifs.c
-  gcc -Wall -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o ${startdir}/pkg/sbin/umount.cifs client/umount.cifs.c
-
+  install -m644 lib/talloc/talloc.h ${startdir}/pkg/usr/include/
+  install -m644 lib/netapi/netapi.h ${startdir}/pkg/usr/include/
   mkdir -p ${startdir}/pkg/usr/share/man/man{1,7,8}
-  for man in smbmnt smbmount smbspool \
-      smbumount umount.cifs mount.cifs net; do
+  for man in smbspool \
+      umount.cifs mount.cifs net; do
     install -m644 ../docs/manpages/${man}.8 ${startdir}/pkg/usr/share/man/man8/
   done
   for man in rpcclient smbcacls smbclient smbcquotas smbget \
@@ -56,3 +53,4 @@ build() {
   done
   install -m644 ../docs/manpages/libsmbclient.7 ${startdir}/pkg/usr/share/man/man7/
 }
+md5sums=('7870a6bb3a025c6081cd56688acd494a')
diff --git a/abs/core-testing/smbclient/heimdal.patch b/abs/core-testing/smbclient/heimdal.patch
deleted file mode 100644
index d116d3e..0000000
--- a/abs/core-testing/smbclient/heimdal.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Submitted By:            Randy McMurchy <randy_at_linuxfromscratch_dot_org>
-Date:                    2005-09-21
-Initial Package Version: 3.0.20
-Upstream Status:         Not submitted (it is not an upstream Samba issue)
-Origin:                  Randy McMurchy
-Description:             Fixes an issue if you have Heimdal installed as
-                         Heimdal uses reserved C++ words and the Samba headers
-                         now look for these conflicts. This patch comments out
-                         the check for C++ reserved words. Heimdal is aware of
-                         the issue
-
-$LastChangedBy: randy $
-$Date: 2005/11/17 12:32:28 $
-
-
---- samba-3.0.20-orig/source/include/includes.h	2005-07-28 13:19:49.000000000 +0000
-+++ samba-3.0.20/source/include/includes.h	2005-09-04 13:45:01.000000000 +0000
-@@ -25,6 +25,7 @@
- #include "config.h"
- #endif
- 
-+/*
- #ifndef __cplusplus
- #define class #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
- #define private #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
-@@ -36,6 +37,7 @@
- #define delete #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
- #define friend #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
- #endif
-+*/
- 
- #include "local.h"
- 
diff --git a/abs/core-testing/tdb/PKGBUILD b/abs/core-testing/tdb/PKGBUILD
new file mode 100644
index 0000000..1714862
--- /dev/null
+++ b/abs/core-testing/tdb/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 14092 2008-10-03 15:43:08Z tpowa $
+# Maintainer: eric <eric@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=tdb
+pkgver=3.2.4
+pkgrel=1
+# We use the 'A' to fake out pacman's version comparators.  Samba chooses
+# to append 'a','b',etc to their subsequent releases, which pamcan
+# misconstrues as alpha, beta, etc.  Bad samba!
+_realver=3.2.4
+pkgdesc="A Trivial Database similar to GDBM but allows simultaneous commits"
+arch=(i686 x86_64)
+license=('GPL3')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)
+url="www.samba.org"
+source=(http://us1.samba.org/samba/ftp/samba-${_realver}.tar.gz)
+options=(!makeflags)
+
+build() {
+   cd ${startdir}/src/samba-${_realver}/source/lib/tdb
+   ./autogen.sh
+   ./configure --prefix=/usr
+   make || return 1
+   make DESTDIR=$startdir/pkg install
+   ln -sf /usr/lib/libtdb.so.1.1.1 $startdir/pkg/usr/lib/libtdb.so.1
+   ln -sf /usr/lib/libtdb.so.1.1.1 $startdir/pkg/usr/lib/libtdb.so
+}
+md5sums=('7870a6bb3a025c6081cd56688acd494a')
diff --git a/abs/core-testing/tdb/gcc3.patch b/abs/core-testing/tdb/gcc3.patch
new file mode 100644
index 0000000..c88c2e7
--- /dev/null
+++ b/abs/core-testing/tdb/gcc3.patch
@@ -0,0 +1,41 @@
+--- tdb-1.0.6/tdbtool.c	2001-12-10 22:45:47.000000000 -0500
++++ ./tdbtool.c	2003-12-31 19:44:50.000000000 -0500
+@@ -169,22 +169,22 @@
+ 
+ static void help(void)
+ {
+-	printf("
+-tdbtool: 
+-  create    dbname     : create a database
+-  open      dbname     : open an existing database
+-  erase                : erase the database
+-  dump      dumpname   : dump the database as strings
+-  insert    key  data  : insert a record
+-  store     key  data  : store a record (replace)
+-  show      key        : show a record by key
+-  delete    key        : delete a record by key
+-  list                 : print the database hash table and freelist
+-  free                 : print the database freelist
+-  1 | first            : print the first record
+-  n | next             : print the next record
+-  q | quit             : terminate
+-  \\n                   : repeat 'next' command
++	printf("\
++tdbtool: \
++  create    dbname     : create a database\
++  open      dbname     : open an existing database\
++  erase                : erase the database\
++  dump      dumpname   : dump the database as strings\
++  insert    key  data  : insert a record\
++  store     key  data  : store a record (replace)\
++  show      key        : show a record by key\
++  delete    key        : delete a record by key\
++  list                 : print the database hash table and freelist\
++  free                 : print the database freelist\
++  1 | first            : print the first record\
++  n | next             : print the next record\
++  q | quit             : terminate\
++  \\n                   : repeat 'next' command\
+ ");
+ }
+ 
-- 
cgit v0.12