#include <rpm/rpmbuild.h>
#include <rpm/rpmspec.h>
+/* from f10 and up, Spec is renamed rpmSpec */
+#ifndef _RPMTYPES_H
+#define rpmSpec Spec
+#endif
+
+#ifndef PATH_MAX
+#include <linux/limits.h>
+#endif
+
extern size_t strnlen(const char *s, size_t maxlen);
/* the structure describing the options we take and the defaults */
};
/* Stolen from rpm/build/spec.c:rpmspecQuery() */
-Spec
+rpmSpec
rpmspecGet(rpmts ts, const char * arg)
{
char * buildRoot = NULL;
poptContext context;
rpmts ts = NULL;
int ec = 0;
- Spec spec;
+ rpmSpec spec;
struct Source *source;
Package pkg;
const char *name, *version, *release, *arch, *unused;
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;
}
}