mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
linux-rpm.mk: Cleanup commit, doesn't work,
This commit is contained in:
parent
c63d13810d
commit
17d0b5f551
1 changed files with 13 additions and 9 deletions
|
|
@ -20,6 +20,7 @@ endef
|
||||||
|
|
||||||
KERNEL_MAJOR = $(shell echo $(KERNEL_VERSION) | cut -d\. -f1)
|
KERNEL_MAJOR = $(shell echo $(KERNEL_VERSION) | cut -d\. -f1)
|
||||||
KERNEL_MINOR = $(shell echo $(KERNEL_VERSION) | cut -d\. -f2)
|
KERNEL_MINOR = $(shell echo $(KERNEL_VERSION) | cut -d\. -f2)
|
||||||
|
KERNEL_RELEASE = $(shell echo $(KERNEL_VERSION) | cut -d\. -f3)
|
||||||
KERNEL_PKG_BASE = /home/samba/dat/share/exe/linux/os/$(KERNEL_MAJOR).$(KERNEL_MINOR)/linux-$(KERNEL_VERSION).tar
|
KERNEL_PKG_BASE = /home/samba/dat/share/exe/linux/os/$(KERNEL_MAJOR).$(KERNEL_MINOR)/linux-$(KERNEL_VERSION).tar
|
||||||
ifneq ($(wildcard $(KERNEL_PKG_BASE).gz),)
|
ifneq ($(wildcard $(KERNEL_PKG_BASE).gz),)
|
||||||
KERNEL_PKG = $(KERNEL_PKG_BASE).gz
|
KERNEL_PKG = $(KERNEL_PKG_BASE).gz
|
||||||
|
|
@ -31,7 +32,11 @@ KERNEL_SRC_DIR = $(shell tar -tjf $(KERNEL_DIR)/$(KERNEL_PKG) | head -1)
|
||||||
endif
|
endif
|
||||||
#HOST = $(shell cd ../..; pwd | xargs basename)
|
#HOST = $(shell cd ../..; pwd | xargs basename)
|
||||||
WD := $(shell pwd)
|
WD := $(shell pwd)
|
||||||
TMP_INSTALL = $(KERNEL_BASE)-$(KERNEL_VERSION)-$(EXTRAVERSION)
|
ifeq ($(shell echo $(KERNEL_VERSION) | sed '/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/ !d'),)
|
||||||
|
COMPLETE_VERSION = $(KERNEL_VERSION)-$(EXTRAVERSION)
|
||||||
|
else
|
||||||
|
COMPLETE_VERSION = $(KERNEL_MAJOR).$(KERNEL_MINOR).$(KERNEL_RELEASE)$(EXTRAVERSION)
|
||||||
|
endif
|
||||||
TAG = $(shell echo V_$(KERNEL_VERSION)_$(RPM_RELEASE) | sed 's/\./_/g')
|
TAG = $(shell echo V_$(KERNEL_VERSION)_$(RPM_RELEASE) | sed 's/\./_/g')
|
||||||
ARCH = $(shell $(RPMBUILD) --showrc | sed '/build arch / !d; s/.*build arch *://; s/ //g')
|
ARCH = $(shell $(RPMBUILD) --showrc | sed '/build arch / !d; s/.*build arch *://; s/ //g')
|
||||||
|
|
||||||
|
|
@ -50,16 +55,15 @@ endif
|
||||||
#RPM_RELEASE = $(UNAME_SUFFIX)$(RPM_RELEASE_NUM)
|
#RPM_RELEASE = $(UNAME_SUFFIX)$(RPM_RELEASE_NUM)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
BASE = $(KERNEL_BASE)-$(COMPLETE_VERSION)
|
||||||
|
TMP_INSTALL = $(KERNEL_BASE)-$(COMPLETE_VERSION)
|
||||||
|
BASE_RUN = $(KERNEL_BASE)-run-$(COMPLETE_VERSION)
|
||||||
|
BASE_DEVEL = $(KERNEL_BASE)-devel-$(COMPLETE_VERSION)
|
||||||
|
|
||||||
ifeq ($(BOOT_LABEL),)
|
ifeq ($(BOOT_LABEL),)
|
||||||
BOOT_LABEL = lx-$(KERNEL_VERSION)-$(EXTRAVERSION)
|
BOOT_LABEL = lx-$(COMPLETE_VERSION)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
BASE = $(KERNEL_BASE)-$(KERNEL_VERSION)-$(EXTRAVERSION)
|
|
||||||
BASE_RUN = $(KERNEL_BASE)-run-$(KERNEL_VERSION)-$(EXTRAVERSION)
|
|
||||||
BASE_DEVEL = $(KERNEL_BASE)-devel-$(KERNEL_VERSION)-$(EXTRAVERSION)
|
|
||||||
|
|
||||||
KERNEL_TGZ = $(notdir $(KERNEL_PKG))
|
KERNEL_TGZ = $(notdir $(KERNEL_PKG))
|
||||||
F_SPEC = $(BASE).spec
|
F_SPEC = $(BASE).spec
|
||||||
F_TGZ = $(BASE).tar.gz
|
F_TGZ = $(BASE).tar.gz
|
||||||
|
|
@ -67,7 +71,7 @@ F_SPM = $(BASE).src.rpm
|
||||||
F_RPM_RUN = $(BASE_RUN).$(ARCH).rpm
|
F_RPM_RUN = $(BASE_RUN).$(ARCH).rpm
|
||||||
F_RPM_DEVEL = $(BASE_DEVEL).$(ARCH).rpm
|
F_RPM_DEVEL = $(BASE_DEVEL).$(ARCH).rpm
|
||||||
F_RPMS = $(F_RPM_RUN) $(F_RPM_DEVEL)
|
F_RPMS = $(F_RPM_RUN) $(F_RPM_DEVEL)
|
||||||
F_BOOTFILES = $(addsuffix -$(KERNEL_VERSION)-$(EXTRAVERSION),$(addprefix $(TMP_INSTALL)/boot/,vmlinuz config System.map))
|
F_BOOTFILES = $(addsuffix -$(COMPLETE_VERSION),$(addprefix $(TMP_INSTALL)/boot/,vmlinuz config System.map))
|
||||||
F_CURRENT = $(addprefix CURRENT_, SRC RPM_SRC RPM_RUN_I386 RPM_DEVEL_I386)
|
F_CURRENT = $(addprefix CURRENT_, SRC RPM_SRC RPM_RUN_I386 RPM_DEVEL_I386)
|
||||||
F_ULDONE = $(addsuffix .uldone,$(F_RPMS) $(F_TGZ) $(F_SPM) current)
|
F_ULDONE = $(addsuffix .uldone,$(F_RPMS) $(F_TGZ) $(F_SPM) current)
|
||||||
# note that order matters for F_ULDONE and F_RPMS (remote directory attributes)
|
# note that order matters for F_ULDONE and F_RPMS (remote directory attributes)
|
||||||
|
|
@ -145,7 +149,7 @@ endif
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(TMP_INSTALL)/$(F_SPEC): linux-$(KERNEL_VERSION)/Makefile $(MKSPEC) Makefile
|
$(TMP_INSTALL)/$(F_SPEC): linux-$(KERNEL_VERSION)/Makefile $(MKSPEC) Makefile
|
||||||
$(MKSPEC) -d $(TMP_INSTALL) -b $(KERNEL_BASE) -v $(KERNEL_VERSION) -r $(EXTRAVERSION) -a $(ARCH) -l $(BOOT_LABEL) > $@
|
$(MKSPEC) -d $(TMP_INSTALL) -b $(KERNEL_BASE) -v $(KERNEL_VERSION) -r $(RPM_RELEASE) -a $(ARCH) -l $(BOOT_LABEL) > $@
|
||||||
|
|
||||||
$(TMP_INSTALL)/boot/%-$(KERNEL_VERSION)-$(RPM_RELEASE): build.lxdone $(LOCAL_AFTER_KERNEL_BUILD)
|
$(TMP_INSTALL)/boot/%-$(KERNEL_VERSION)-$(RPM_RELEASE): build.lxdone $(LOCAL_AFTER_KERNEL_BUILD)
|
||||||
@echo -n
|
@echo -n
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue