X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=spec2make.c;h=712ce68633d992658650390bb07c8cf9b5eb513c;hb=249acd1f0c785b2aa88ba193ce7a1a8e442b3ef5;hp=a0144f18de775ccad464ed4246a3c124add07763;hpb=16b9ae6bdc65d43dd3588a0676190120b7888d56;p=build.git diff --git a/spec2make.c b/spec2make.c index a0144f18..712ce686 100644 --- a/spec2make.c +++ b/spec2make.c @@ -6,7 +6,6 @@ * Mark Huang * Copyright (C) 2006 The Trustees of Princeton University * - * $Id$ */ #include @@ -20,10 +19,23 @@ #include #include +/* from f10 and up, Spec is renamed rpmSpec */ +#ifndef _RPMTYPES_H +#define rpmSpec Spec +#endif + +#ifndef PATH_MAX +#include +#endif + extern size_t strnlen(const char *s, size_t maxlen); /* the structure describing the options we take and the defaults */ static struct poptOption optionsTable[] = { + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmBuildPoptTable, 0, + "Build options with [ | | ]:", + NULL }, + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0, "Common options for all rpm modes and executables:", NULL }, @@ -34,7 +46,7 @@ static struct poptOption optionsTable[] = { }; /* Stolen from rpm/build/spec.c:rpmspecQuery() */ -Spec +rpmSpec rpmspecGet(rpmts ts, const char * arg) { char * buildRoot = NULL; @@ -59,7 +71,7 @@ main(int argc, char *argv[]) poptContext context; rpmts ts = NULL; int ec = 0; - Spec spec; + rpmSpec spec; struct Source *source; Package pkg; const char *name, *version, *release, *arch, *unused; @@ -139,7 +151,6 @@ main(int argc, char *argv[]) strncpy(sourcename,fullSource,len); sourcename[len]='\0'; printf ("%s.source := SOURCES/%s\n",package_name,basename(sourcename)); - printf ("%s.codebase := CODEBASES/%s\n",package_name,package_name); break; } }