mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
linux-rpm.mk: Fix extraversion handling
- Backup commit
- Make exraversion processing cope with missing blank in linux-<version>/Makefile
- Change processing of extraversion so that the rpm release
is always appended to the end, regardles of whether the former extraversion
starts with '-' or '.' . I *think* the is good, but I still ran into problems
in rpmbuild
This commit is contained in:
parent
a52010723f
commit
bedb1836a1
1 changed files with 17 additions and 21 deletions
|
|
@ -52,11 +52,11 @@ $(KERNEL_PKG):
|
|||
install -m 664 $(notdir $(KERNEL_PKG)) $@
|
||||
|
||||
EXTRAVERSION: linux-$(KERNEL_VERSION)/Makefile
|
||||
sed '/^ *EXTRAVERSION *=/ !d; s/^ *EXTRAVERSION *= *-*//; s/ *$$//' $< >$@
|
||||
sed '/^[ ]*EXTRAVERSION[ ]*=/ !d; s/^[ ]*EXTRAVERSION[ ]*=[ ]*//; s/[ ]*$$//' $< >$@
|
||||
|
||||
COMPLETE_VERSION: EXTRAVERSION
|
||||
ifeq ($(shell echo $(KERNEL_VERSION) | sed '/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/ !d'),)
|
||||
echo -n $(KERNEL_VERSION)-$(EXTRAVERSION) | sed 's/- *$$//' > $@
|
||||
echo -n $(KERNEL_VERSION)$(EXTRAVERSION) | sed 's/- *$$//' > $@
|
||||
else
|
||||
echo -n $(KERNEL_MAJOR).$(KERNEL_MINOR).$(KERNEL_RELEASE)$(EXTRAVERSION) > $@
|
||||
endif
|
||||
|
|
@ -67,24 +67,20 @@ config-$(KERNEL_VERSION):
|
|||
cvs commit $@
|
||||
|
||||
toplevel-makefile: unpack.done patches.done
|
||||
awk -v release=$(RPM_RELEASE) '{ \
|
||||
if ($$0 ~ /EXTRAVERSION *= *-/) { \
|
||||
oldextra=$$3; \
|
||||
gsub(/-/,_,oldextra); \
|
||||
printf "EXTRAVERSION = -%s_%s\n", release, oldextra \
|
||||
} else if ($$0 ~ /EXTRAVERSION *= *\./) { \
|
||||
oldextra=$$3; \
|
||||
gsub(/-/,_,oldextra); \
|
||||
printf "EXTRAVERSION = %s-%s\n",oldextra, release \
|
||||
} else if ($$0 ~ /EXTRAVERSION *= *$$/) { \
|
||||
if (release ~ "^ *$$") { \
|
||||
printf "EXTRAVERSION =\n" \
|
||||
} else { \
|
||||
printf "EXTRAVERSION = -%s\n",release \
|
||||
} \
|
||||
} else { \
|
||||
print $$0 \
|
||||
} \
|
||||
awk -F = -v release=$(RPM_RELEASE) '{ \
|
||||
if ($$0 ~ /EXTRAVERSION[ ]*=[ ]*$$/) { \
|
||||
if (release ~ "^ *$$") { \
|
||||
printf "EXTRAVERSION =\n" \
|
||||
} else { \
|
||||
printf "EXTRAVERSION = -%s\n",release \
|
||||
} \
|
||||
} else if ($$0 ~ /EXTRAVERSION[ ]*=[ ]*[^ ]+/) { \
|
||||
oldextra=$$2; \
|
||||
gsub(/ */,"",oldextra); \
|
||||
printf "EXTRAVERSION = %s-%s\n", oldextra, release \
|
||||
} else { \
|
||||
print $$0 \
|
||||
} \
|
||||
}' linux-$(KERNEL_VERSION)/Makefile >$@
|
||||
|
||||
linux-$(KERNEL_VERSION)/Makefile: toplevel-makefile
|
||||
|
|
@ -164,5 +160,5 @@ thisclean:
|
|||
export \
|
||||
TOPDIR MODDIR KERNEL_VERSION RPM_RELEASE HOST KERNEL_PKG_SUFFIX CUSTOMER \
|
||||
KERNEL_BASE_DIR KERNEL_PKG KERNEL_BASE UPLOAD_HOST UPLOAD_PATH \
|
||||
UPLOAD_OWNER BOOT_LABEL BOOT_LABEL PATCHES KERNEL_MAJOR KERNEL_MINOR \
|
||||
UPLOAD_OWNER BOOT_LABEL PATCHES KERNEL_MAJOR KERNEL_MINOR \
|
||||
KERNEL_RELEASE WD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue