diff --git a/recipes/wip/samba/answers.txt b/recipes/wip/samba/answers.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f9dc37fb64c4a96ac7944491b0e5735f4607e49a
--- /dev/null
+++ b/recipes/wip/samba/answers.txt
@@ -0,0 +1,4 @@
+Checking for HAVE_LITTLE_ENDIAN - runtime: OK
+Checking for large file support without additional flags: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_MREMAP: OK
diff --git a/recipes/wip/samba/recipe.toml b/recipes/wip/samba/recipe.toml
index b2cd6168dcdf81134b1b6c76aa94cdcc6ea23517..b4cc087bd5f6127ee51b9252bce1a8befe1e950c 100644
--- a/recipes/wip/samba/recipe.toml
+++ b/recipes/wip/samba/recipe.toml
@@ -1,11 +1,30 @@
-#TODO probably wrong tarball
-# filesystem support - https://wiki.samba.org/index.php/File_System_Support
+#TODO: needs gnutls3 to compile
 [source]
-tar = "https://download.samba.org/pub/samba/samba-4.19.3.tar.gz"
+git = "https://gitlab.redox-os.org/redox-os/samba.git"
+upstream = "https://github.com/samba-team/samba.git"
+
 [build]
-template = "configure"
+template = "custom"
 dependencies = [
-    "gnutls",
-    "zlib",
-    "kerberos5",
+    "gnutls3"
 ]
+script = """
+rsync -av --delete --exclude .git "${COOKBOOK_SOURCE}/" ./
+cp -v "${COOKBOOK_RECIPE}/answers.txt" answers.txt
+
+COOKBOOK_CONFIGURE_FLAGS=(
+    --builtin-libraries=ALL
+    --cross-compile
+    --cross-answers=answers.txt
+    --disable-python
+    --disable-rpath
+    --enable-fhs
+    --host="${TARGET}"
+    --localstatedir=/var
+    --prefix=/usr
+    --sysconfdir=/etc
+    --with-static-modules=ALL
+    --without-ad-dc
+)
+cookbook_configure
+"""