From: Thierry Parmentelat Date: Wed, 28 Nov 2007 07:56:15 +0000 (+0000) Subject: add support for DEPENDDEVELRPMS X-Git-Tag: 4.2-rc2~432 X-Git-Url: http://git.onelab.eu/?p=build.git;a=commitdiff_plain;h=83a7514f97c21f41b01ddcd8eacd6411b137b69e add support for DEPENDDEVELRPMS --- diff --git a/Makefile b/Makefile index 9937e603..bbe3bea1 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,8 @@ # a set of *packages* that this package depends on # (*) package-DEPENDDEVELS # a set of *packages* that the build will rpm-install the -devel variant before building +# (*) package-DEPENDDEVELRPMS +# a set of *rpm* that the build will rpm-install before building # (*) package-DEPENDFILES # a set of files that the package depends on - and that make needs to know about # if this contains RPMS/yumgroups.xml, then the toplevel RPMS's index @@ -392,6 +394,7 @@ $($(1)-SRPM): $($(1)_specpath) .rpmmacros $($(1)-TARBALLS) mkdir -p BUILD SRPMS tmp @(echo -n "XXXXXXXXXXXXXXX -- BEG SRPM $(1) " ; date) -$(foreach devel,$($(1)-DEPENDDEVELS), $(if $($(devel)-DEVEL-RPMS),rpm -Uvh $($(devel)-DEVEL-RPMS);)) + -$(foreach rpm,$($(1)-DEPENDDEVELRPMS), rpm -Uvh $($(rpm)-RPM-PATH);) $(if $($(1)-RPMBUILD),\ $($(1)-RPMBUILD) $($(1)-RPMFLAGS) -bs $($(1)_specpath), $(RPMBUILD) $($(1)-RPMFLAGS) -bs $($(1)_specpath)) @@ -401,6 +404,7 @@ $($(1)-SRPM): $($(1)_specpath) .rpmmacros $($(1)-CODEBASE) mkdir -p BUILD SRPMS tmp @(echo -n "XXXXXXXXXXXXXXX -- BEG SRPM $(1) (using make srpm) " ; date) -$(foreach devel,$($(1)-DEPENDDEVELS), $(if $($(devel)-DEVEL-RPMS),rpm -Uvh $($(devel)-DEVEL-RPMS);)) + -$(foreach rpm,$($(1)-DEPENDDEVELRPMS), rpm -Uvh $($(rpm)-RPM-PATH);) make -C $($(1)-CODEBASE) srpm && \ rm -f SRPMS/$(notdir $($(1)-SRPM)) && \ ln $($(1)-CODEBASE)/$(notdir $($(1)-SRPM)) SRPMS/$(notdir $($(1)-SRPM)) diff --git a/planetlab.mk b/planetlab.mk index 9e216533..4444d379 100644 --- a/planetlab.mk +++ b/planetlab.mk @@ -102,9 +102,9 @@ ALL += pl_sshd # Deprecate when vsys takes over [sapan]. # keep in build for proper. # -libhttpd++-MODULES := libhttpd++ -libhttpd++-SPEC := libhttpd++.spec -ALL += libhttpd++ +libhttpd-MODULES := libhttpd++ +libhttpd-SPEC := libhttpd++.spec +ALL += libhttpd # # proper: Privileged Operations Service @@ -112,7 +112,8 @@ ALL += libhttpd++ proper-MODULES := proper proper-SPEC := proper.spec #proper-RPMBUILD := sudo bash ./rpmbuild.sh -proper-DEPENDDEVELS := libhttpd++ +proper-DEPENDS := libhttpd +proper-DEPENDDEVELRPMS := libhttpd++ ALL += proper # diff --git a/spec2make.c b/spec2make.c index cf34c785..edb43b59 100644 --- a/spec2make.c +++ b/spec2make.c @@ -165,13 +165,15 @@ main(int argc, char *argv[]) arch=target; } } - printf("%s %s-RPMS += RPMS/%s/%s-%s-%s.%s.rpm\n", - (pkg->fileList?"":"# Empty "), - package_name, arch, name, version, release, arch); - if (strstr (name,"-devel")!=NULL) { - printf("%s %s-DEVEL-RPMS += RPMS/%s/%s-%s-%s.%s.rpm\n", - (pkg->fileList?"":"# Empty "), + if (pkg->fileList) { + printf("%s-RPMS += RPMS/%s/%s-%s-%s.%s.rpm\n", package_name, arch, name, version, release, arch); + printf("%s-RPM-PATH := RPMS/%s/%s-%s-%s.%s.rpm\n", + name,arch, name, version, release, arch); + if (strstr (name,"-devel")!=NULL) { + printf("%s-DEVEL-RPMS += RPMS/%s/%s-%s-%s.%s.rpm\n", + package_name, arch, name, version, release, arch); + } } } }