back to using lxc-userspace from master after 5.2.5 is out
[build.git] / Makefile
index 1a4c823..385a61b 100644 (file)
--- a/Makefile
+++ b/Makefile
 ####################
 
 # exported to spec files as plrelease
-PLANETLAB_RELEASE = 5.1
+PLANETLAB_RELEASE = 5.2
 
 #
 # Default values
@@ -658,6 +658,22 @@ endef
 
 $(foreach package,$(ALL),$(eval $(call target_depends,$(package))))
 
+####################
+# very rough for now (one module per package), targets only sfa for now
+# the general idea here is, changing the specfile (for version number and all) is enough, and this
+# gets passed to "make debian" in the module
+# PREFIX: at one point we had passed PREFIX=/usr to this 'make debian' 
+# however it turned out we could manage this some other way (see manifold)
+# so I'm reverting to simplicity
+define target_debian
+$(1)-debian: $(1)-tarball
+       mkdir -p DEBIAN/$(1)
+       rsync -a MODULES/$(1)/ DEBIAN/$(1)/
+       make -C DEBIAN/$(1) "RPMTARBALL=$(HOME)/$($(1).tarballs)" "RPMVERSION=$($(1).rpm-version)" "RPMRELEASE=$($(1).rpm-release)" "RPMNAME=$($(1).rpm-name)" debian
+endef
+
+$(foreach package,$(ALL),$(eval $(call target_debian,$(package))))
+
 ### clean target
 # usage: target_clean package
 define target_clean
@@ -684,7 +700,11 @@ $(1)-clean-srpm:
        rm -rf $($(1).srpm)
 .PHONY: $(1)-clean-srpm
 CLEANS += $(1)-clean-srpm
-$(1)-codeclean: $(1)-clean-source $(1)-clean-tarball $(1)-clean-build $(1)-clean-rpms $(1)-clean-srpm
+$(1)-clean-debian:
+       rm -rf DEBIAN/$(1)
+.PHONY: $(1)-clean-srpm
+CLEANS += $(1)-clean-srpm
+$(1)-codeclean: $(1)-clean-source $(1)-clean-tarball $(1)-clean-build $(1)-clean-rpms $(1)-clean-srpm $(1)-clean-debian
 $(1)-clean: $(1)-clean-modules $(1)-codeclean
 .PHONY: $(1)-codeclean $(1)-clean 
 $(1)-clean-spec: