add support for DEPENDDEVELRPMS
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 28 Nov 2007 07:56:15 +0000 (07:56 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 28 Nov 2007 07:56:15 +0000 (07:56 +0000)
Makefile
planetlab.mk
spec2make.c

index 9937e60..bbe3bea 100644 (file)
--- 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>
+# (*) package-DEPENDDEVELRPMS
+#     a set of *rpm* that the build will rpm-install before building <package>
 # (*) 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)) 
index 9e21653..4444d37 100644 (file)
@@ -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
 
 #
index cf34c78..edb43b5 100644 (file)
@@ -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);
+       }
       }
     }
   }