diff options
author | root <devnull@localhost> | 1996-07-02 18:44:09 +0000 |
---|---|---|
committer | root <devnull@localhost> | 1996-07-02 18:44:09 +0000 |
commit | 9d020ce33522d4a16e3a2619ef7b5c0ef958188f (patch) | |
tree | 397979be20732961b2058f1c1ab90e3005f5249a /build | |
parent | 1e7ab3dd3675cdcca45aa266eb186fbc8ab7c2cd (diff) | |
download | rpm-9d020ce33522d4a16e3a2619ef7b5c0ef958188f.tar.gz rpm-9d020ce33522d4a16e3a2619ef7b5c0ef958188f.tar.bz2 rpm-9d020ce33522d4a16e3a2619ef7b5c0ef958188f.zip |
fix %changelog handling
start to add %description handling
CVS patchset: 716
CVS date: 1996/07/02 18:44:09
Diffstat (limited to 'build')
-rw-r--r-- | build/spec.c | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/build/spec.c b/build/spec.c index 821483b25..ec89dbba3 100644 --- a/build/spec.c +++ b/build/spec.c @@ -670,34 +670,36 @@ static int find_preamble_line(char *line, char **s) } /* None of these can be 0 !! */ -#define PREAMBLE_PART 1 -#define PREP_PART 2 -#define BUILD_PART 3 -#define INSTALL_PART 4 -#define CLEAN_PART 5 -#define PREIN_PART 6 -#define POSTIN_PART 7 -#define PREUN_PART 8 -#define POSTUN_PART 9 -#define FILES_PART 10 -#define CHANGELOG_PART 11 +#define PREAMBLE_PART 1 +#define PREP_PART 2 +#define BUILD_PART 3 +#define INSTALL_PART 4 +#define CLEAN_PART 5 +#define PREIN_PART 6 +#define POSTIN_PART 7 +#define PREUN_PART 8 +#define POSTUN_PART 9 +#define FILES_PART 10 +#define CHANGELOG_PART 11 +#define DESCRIPTION_PART 12 static struct part_rec { int part; int len; char *s; } part_list[] = { - {PREAMBLE_PART, 0, "%package"}, - {PREP_PART, 0, "%prep"}, - {BUILD_PART, 0, "%build"}, - {INSTALL_PART, 0, "%install"}, - {CLEAN_PART, 0, "%clean"}, - {PREUN_PART, 0, "%preun"}, - {POSTUN_PART, 0, "%postun"}, - {PREIN_PART, 0, "%pre"}, - {POSTIN_PART, 0, "%post"}, - {FILES_PART, 0, "%files"}, - {CHANGELOG_PART, 0, "%changelog"}, + {PREAMBLE_PART, 0, "%package"}, + {PREP_PART, 0, "%prep"}, + {BUILD_PART, 0, "%build"}, + {INSTALL_PART, 0, "%install"}, + {CLEAN_PART, 0, "%clean"}, + {PREUN_PART, 0, "%preun"}, + {POSTUN_PART, 0, "%postun"}, + {PREIN_PART, 0, "%pre"}, + {POSTIN_PART, 0, "%post"}, + {FILES_PART, 0, "%files"}, + {CHANGELOG_PART, 0, "%changelog"}, + {DESCRIPTION_PART, 0, "%description"}, {0, 0, 0} }; @@ -818,7 +820,11 @@ Spec parseSpec(FILE *f, char *specfile) t1 = RPMTAG_POSTUN; break; case CHANGELOG_PART: - t1 = RPMTAG_CHANGELOG; + /* %changelog is a little special. It goes in the */ + /* "main" package no matter where it appears, and it */ + /* ends up in all the packages. */ + addEntry(spec->packages->header, RPMTAG_CHANGELOG, STRING_TYPE, + getStringBuf(sb), 1); break; } if (t1) { |