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\n"),
30 return RPMERR_BADSPEC;
33 *sbp = newStringBuf();
35 /* There are no options to %build, %install, or %clean */
36 if ((rc = readLine(spec, STRIP_NOTHING)) > 0)
41 while (! (nextPart = isPart(spec->line))) {
42 appendStringBuf(*sbp, spec->line);
43 if ((rc = readLine(spec, STRIP_NOTHING)) > 0)