Allow build without lua support. --- ./build/parseScript.c.orig 2005-12-16 18:34:36.000000000 +0000 +++ ./build/parseScript.c 2005-12-16 18:36:08.000000000 +0000 @@ -283,6 +283,7 @@ int parseScript(Spec spec, int parsePart stripTrailingBlanksStringBuf(sb); p = getStringBuf(sb); +#ifdef WITH_LUA if (!strcmp(progArgv[0], "")) { rpmlua lua = NULL; /* Global state. */ if (rpmluaCheckScript(lua, p, partname) != RPMRC_OK) { @@ -291,7 +292,9 @@ int parseScript(Spec spec, int parsePart } (void) rpmlibNeedsFeature(pkg->header, "BuiltinLuaScripts", "4.2.2-1"); - } else if (progArgv[0][0] == '<') { + } else +#endif + if (progArgv[0][0] == '<') { rpmError(RPMERR_BADSPEC, _("line %d: unsupported internal script: %s\n"), spec->lineNum, progArgv[0]); --- ./lib/psm.c.orig 2005-12-14 18:59:10.000000000 +0000 +++ ./lib/psm.c 2006-02-24 11:46:54.000000000 +0000 @@ -490,6 +490,7 @@ static pid_t psmWait(rpmpsm psm) return psm->sq.reaped; } +#ifdef WITH_LUA /** * Run internal Lua script. */ @@ -572,6 +573,7 @@ static rpmRC runLuaScript(rpmpsm psm, He return rc; } +#endif /** */ @@ -637,11 +639,15 @@ static rpmRC runScript(rpmpsm psm, Heade xx = hge(h, RPMTAG_ARCH, NULL, (void **) &a, NULL); if (progArgv && strcmp(progArgv[0], "") == 0) { +#ifdef WITH_LUA rpmMessage(RPMMESS_DEBUG, _("%s: %s(%s-%s-%s.%s) running scriptlet.\n"), psm->stepName, tag2sln(psm->scriptTag), n, v, r, a); return runLuaScript(psm, h, sln, progArgc, progArgv, script, arg1, arg2); +#else + return RPMRC_FAIL; +#endif } psm->sq.reaper = 1; --- ./lib/rpmlibprov.c.orig 2004-03-16 21:58:29.000000000 +0000 +++ ./lib/rpmlibprov.c 2006-06-14 13:52:46.000000000 +0000 @@ -51,9 +54,11 @@ static struct rpmlibProvides_s rpmlibPro { "rpmlib(ConcurrentAccess)", "4.1-1", ( RPMSENSE_EQUAL), N_("package scriptlets may access the rpm database while installing.") }, +#ifdef WITH_LUA { "rpmlib(BuiltinLuaScripts)", "4.2.2-1", ( RPMSENSE_EQUAL), N_("internal support for lua scripts.") }, +#endif { NULL, NULL, 0, NULL } }; --- ./lib/rpmrc.c.orig 2005-01-17 18:46:23.000000000 +0000 +++ ./lib/rpmrc.c 2005-12-16 18:30:29.000000000 +0000 @@ -1883,7 +1873,9 @@ int rpmReadConfigFiles(const char * file } /* Force Lua state initialization */ +#ifdef WITH_LUA (void)rpmluaGetPrintBuffer(NULL); +#endif return 0; }