2 * \file build/parseBuildInstallClean.c
3 * Parse %build/%install/%clean section from spec file.
10 int parseBuildInstallClean(Spec spec, rpmParseState parsePart)
13 StringBuf *sbp = NULL;
14 const char *name = NULL;
16 if (parsePart == PART_BUILD) {
19 } else if (parsePart == PART_INSTALL) {
20 sbp = &(spec->install);
22 } else if (parsePart == PART_CLEAN) {
28 rpmError(RPMERR_BADSPEC, _("line %d: second %s"), spec->lineNum, name);
29 return RPMERR_BADSPEC;
32 *sbp = newStringBuf();
34 /* There are no options to %build, %install, or %clean */
35 if ((rc = readLine(spec, STRIP_NOTHING)) > 0)
40 while (! (nextPart = isPart(spec->line))) {
41 appendStringBuf(*sbp, spec->line);
42 if ((rc = readLine(spec, STRIP_NOTHING)) > 0)