X-Git-Url: http://git.onelab.eu/?p=build.git;a=blobdiff_plain;f=Makefile;h=d4ccf47e90781eefac4073b72dbd822abc6960be;hp=d35cc7a3dd58d8dae78c11ca539b5bfa5840b525;hb=HEAD;hpb=801a31c0c136056350f1e0cf4fec028b4ec9c7e5 diff --git a/Makefile b/Makefile index d35cc7a3..849530d6 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ PLANETLAB_RELEASE = 5.2 # Default values # # minimal compat with macos, just so this does not complain -HOSTARCH := $(shell uname -i 2> /dev/null || uname -m 2> /dev/null) +HOSTARCH := $(shell arch) DISTRO := $(shell ./getdistro.sh) RELEASE := $(shell ./getrelease.sh) DISTRONAME := $(shell ./getdistroname.sh) @@ -348,9 +348,7 @@ header.spec: echo "%global _source_filedigest_algorithm 1" >> $@ echo "%global _source_payload w9.gzdio" >> $@ echo "%global _binary_payload w9.gzdio" >> $@ -ifeq "$(DISTRONAME)""$(filter $(DISTRONAME),f25 f27 f29 f31 f33 f35)" echo "%define debug_package %{nil}" >> $@ -endif ### make up spec file - extract module first define target_spec @@ -392,9 +390,7 @@ endef # $(1)/ gets cleaned up if job cannot be done define fetch_git_module mkdir $(1) ; \ - (git archive --remote=$($(1).gitrepo) $($(1).gittag) | tar -C $(1) -xf - ) || \ - (echo "==================== git archive FAILED, trying git clone instead" ; \ - git clone $($(1).gitrepo) $(1); cd $(1) ; git checkout $($(1).gittag) ; rm -rf .git ) || \ + ( git clone $($(1).gitrepo) $(1); cd $(1) ; git checkout $($(1).gittag) ; rm -rf .git ) || \ { rm -rf $(1); false; } endef @@ -452,8 +448,8 @@ endif ### this utility allows to extract various info from a spec file ### and to define them in makefiles # use the C code where it works as it's the original one, use the python code otherwise -spec2make: spec2make.c - $(CC) -g -Wall $< -o $@ -lrpm -lrpmbuild -lrpmio -lpopt || ln -s spec2make.py $@ +spec2make: spec2make.py + ln -s spec2make.py $@ ### run spec2make on the spec file and include the result # usage: spec2make package @@ -511,6 +507,9 @@ tarballs: $(ALLTARBALLS) @echo $(words $(ALLTARBALLS)) source tarballs OK .PHONY: tarballs +SOURCES/%.tar.xz: SOURCES/% + tar chpJf $@ -C SOURCES $* + SOURCES/%.tar.bz2: SOURCES/% tar chpjf $@ -C SOURCES $*