git://git.onelab.eu
/
build.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use util-vserver-pl-0.4-4 on onelab-k27
[build.git]
/
spec2make.c
diff --git
a/spec2make.c
b/spec2make.c
index
5b405ed
..
a32f4fd
100644
(file)
--- a/
spec2make.c
+++ b/
spec2make.c
@@
-20,6
+20,15
@@
#include <rpm/rpmbuild.h>
#include <rpm/rpmspec.h>
#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 */
extern size_t strnlen(const char *s, size_t maxlen);
/* the structure describing the options we take and the defaults */
@@
-34,7
+43,7
@@
static struct poptOption optionsTable[] = {
};
/* Stolen from rpm/build/spec.c:rpmspecQuery() */
};
/* Stolen from rpm/build/spec.c:rpmspecQuery() */
-Spec
+
rpm
Spec
rpmspecGet(rpmts ts, const char * arg)
{
char * buildRoot = NULL;
rpmspecGet(rpmts ts, const char * arg)
{
char * buildRoot = NULL;
@@
-59,7
+68,7
@@
main(int argc, char *argv[])
poptContext context;
rpmts ts = NULL;
int ec = 0;
poptContext context;
rpmts ts = NULL;
int ec = 0;
- Spec spec;
+
rpm
Spec spec;
struct Source *source;
Package pkg;
const char *name, *version, *release, *arch, *unused;
struct Source *source;
Package pkg;
const char *name, *version, *release, *arch, *unused;
@@
-184,8
+193,9
@@
main(int argc, char *argv[])
}
/* export some macros to make */
}
/* export some macros to make */
+ /* note : this relies on pl-specific conventions and might be wrong */
{
{
- char *macros[] = { "release" , "name" , "version" , "
subversion
" , NULL } ;
+ char *macros[] = { "release" , "name" , "version" , "
taglevel
" , NULL } ;
char **nav;
char *macro=malloc(32);
for (nav=macros; *nav; nav++) {
char **nav;
char *macro=malloc(32);
for (nav=macros; *nav; nav++) {
@@
-195,6
+205,9
@@
main(int argc, char *argv[])
}
}
}
}
+ /* export arch */
+ printf ("%s.rpm-arch := %s\n",package_name,target);
+
spec = freeSpec(spec);
done:
spec = freeSpec(spec);
done: