diff --git a/meta-oe/recipes-devtools/luaposix/luaposix_36.3.bb b/meta-oe/recipes-devtools/luaposix/luaposix_36.3.bb
deleted file mode 100644
index e420c1a289..0000000000
--- a/meta-oe/recipes-devtools/luaposix/luaposix_36.3.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-DESCRIPTION = "luaposix is a POSIX binding for Lua."
-LICENSE = "MIT"
-HOMEPAGE = "https://github.com/luaposix/luaposix"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=9a2c76dbe2ca56cf57296af9c9995c27"
-
-DEPENDS += "lua-native lua virtual/crypt"
-
-SRC_URI = "git://github.com/luaposix/luaposix.git;nobranch=1;tag=v${PV};protocol=https \
-"
-SRCREV = "e6b94b37c19c4bd19a7dc475a4f4cb56f61f5da9"
-LUA_VERSION = "5.5"
-
-B = "${S}"
-
-inherit pkgconfig
-
-do_configure() {
-    sed -i "s/^version *= .*/version  = '${PV}'/" ${S}/lukefile
-}
-
-do_compile() {
-    ${S}/build-aux/luke LUA_INCDIR=${STAGING_INCDIR}
-}
-
-do_install() {
-    ${S}/build-aux/luke PREFIX=${D}${prefix} INST_LIBDIR=${D}${libdir}/lua/${LUA_VERSION} install
-}
-
-FILES:${PN} = "${datadir}/lua/${LUA_VERSION} \
-               ${libdir}/lua/${LUA_VERSION}"
diff --git a/meta-oe/recipes-devtools/luaposix/luaposix_39.bb b/meta-oe/recipes-devtools/luaposix/luaposix_39.bb
new file mode 100644
index 0000000000..027239b72e
--- /dev/null
+++ b/meta-oe/recipes-devtools/luaposix/luaposix_39.bb
@@ -0,0 +1,56 @@
+DESCRIPTION = "luaposix is a POSIX binding for Lua."
+LICENSE = "MIT"
+HOMEPAGE = "https://github.com/luaposix/luaposix"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3f4d11c0590d3adb0a38c88477af3598"
+
+DEPENDS += "lua-native lua virtual/crypt"
+
+SRC_URI = "git://github.com/luaposix/luaposix.git;branch=release-v${PV};tag=v${PV};protocol=https;name=luaposix \
+           git://github.com/gvvaughan/luke.git;branch=release-v0.9;tag=v0.9;protocol=https;name=luke;destsuffix=luke \
+"
+SRCREV_luaposix = "71638fb00c93a38d64daeccdeecedf2a44498006"
+SRCREV_luke = "b18fd6eef0af4380c081976b2e016c76956b571a"
+SRCREV_FORMAT = "luaposix"
+
+UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)*)$"
+
+LUA_VERSION = "5.5"
+
+B = "${S}"
+
+LUKE = "${UNPACKDIR}/luke/build-aux/luke --file=lukefile.oe"
+
+inherit pkgconfig
+
+# luaposix only describes its build in the rockspec, so turn that into a lukefile
+do_configure() {
+    cat ${S}/luaposix-${PV}-1.rockspec - > ${B}/lukefile.oe <<LUKEFILE
+
+luke_format = 0
+version = '${PV}'
+defines = build.defines
+incdirs = build.incdirs
+modules = build.modules
+build = nil
+source = nil
+description = nil
+dependencies = nil
+build_dependencies = nil
+test_dependencies = nil
+test = nil
+rockspec_format = nil
+LUKEFILE
+}
+
+do_compile() {
+    ${LUKE} LUA_INCDIR=${STAGING_INCDIR} CFLAGS="${CFLAGS}"
+}
+
+do_install() {
+    ${LUKE} PREFIX=${D}${prefix} INST_LIBDIR=${D}${libdir}/lua/${LUA_VERSION} install
+}
+
+FILES:${PN} = "${datadir}/lua/${LUA_VERSION} \
+               ${libdir}/lua/${LUA_VERSION}"
+
+RDEPENDS:${PN} = "lua-std-normalize"
