mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
linux-rpm.mk: Basically went back to 1.13, with rpmbuild fixed
This commit is contained in:
parent
863f6404ac
commit
10fad29d53
1 changed files with 12 additions and 13 deletions
|
|
@ -20,14 +20,10 @@ WD := $(shell pwd)
|
|||
KERNEL_SRC_DIR = $(shell tar -tzf $(KERNEL_DIR)/$(KERNEL_PKG) | head -1)
|
||||
TMP_INSTALL = $(KERNEL_BASE)-$(KERNEL_VERSION)-$(KERNEL_RELEASE)
|
||||
TAG = $(shell echo V_$(KERNEL_VERSION)_$(KERNEL_RELEASE) | sed 's/\./_/g')
|
||||
ARCH = $(shell rpmbuild --showrc 2>&1 | sed '/build arch / !d; s/build arch *://; s/ *//g')
|
||||
ARCH = i386
|
||||
|
||||
ifeq ($(wildcard RELEASE-$(KERNEL_VERSION)),)
|
||||
KERNEL_RELEASE := $(shell echo '\# $$Id$(KERNEL_VERSION),v 0.1$$' \
|
||||
> RELEASE-$(KERNEL_VERSION); \
|
||||
cvs add RELEASE-$(KERNEL_VERSION); \
|
||||
cvs commit -m "initial checkin" RELEASE-$(KERNEL_VERSION); \
|
||||
exit 1))
|
||||
KERNEL_RELEASE := $(shell make newrelease; exit 1)
|
||||
else
|
||||
KERNEL_RELEASE_NUM := $(strip $(shell grep Id: RELEASE-$(KERNEL_VERSION) | sed "s/.*RELEASE-$(KERNEL_VERSION),v[ ]*[0-9]*\.\([0-9]*\)[^0-9]*.*/\1/"))
|
||||
ifeq ($(UNAME_SUFFIX),)
|
||||
|
|
@ -49,8 +45,8 @@ KERNEL_TGZ = $(notdir $(KERNEL_PKG))
|
|||
F_SPEC = $(BASE).spec
|
||||
F_TGZ = $(BASE).tar.gz
|
||||
F_SPM = $(BASE).src.rpm
|
||||
F_RPM_RUN = $(BASE_RUN).$(ARCH).rpm
|
||||
F_RPM_DEVEL = $(BASE_DEVEL).$(ARCH).rpm
|
||||
F_RPM_RUN = $(BASE_RUN).i386.rpm
|
||||
F_RPM_DEVEL = $(BASE_DEVEL).i386.rpm
|
||||
F_RPMS = $(F_RPM_RUN) $(F_RPM_DEVEL)
|
||||
F_BOOTFILES = $(addsuffix -$(KERNEL_VERSION)-$(KERNEL_RELEASE),$(addprefix $(TMP_INSTALL)/boot/,vmlinuz config System.map))
|
||||
F_CURRENT = $(addprefix CURRENT_, SRC RPM_SRC RPM_RUN_I386 RPM_DEVEL_I386)
|
||||
|
|
@ -62,7 +58,7 @@ BUILD = build_linux.sh \
|
|||
-c config-$(KERNEL_VERSION) \
|
||||
-t $(HOST) \
|
||||
-b $(WD) \
|
||||
-a $(ARCH) \
|
||||
-a i386 \
|
||||
-s $(KERNEL_SRC_DIR) \
|
||||
-i $(TMP_INSTALL)
|
||||
MKSPEC := $(shell which mkspec-linux.sh)
|
||||
|
|
@ -83,7 +79,10 @@ $(KERNEL_PKG):
|
|||
config-$(KERNEL_VERSION):
|
||||
cp $(shell ls config-$(basename $(KERNEL_VERSION)).* | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]\)$$/\1.\2.0\3/' | sort -g | sed 's/\.0/./; $$ !d') $@
|
||||
cvs add $@
|
||||
cvs commit -m "initial checkin"
|
||||
cvs commit
|
||||
|
||||
toplevel-makefile: unpack.done
|
||||
sed "s/^ *EXTRAVERSION *=/EXTRAVERSION = -$(KERNEL_RELEASE)/" linux-$(KERNEL_VERSION)/Makefile >$@
|
||||
|
||||
linux-$(KERNEL_VERSION)/Makefile: toplevel-makefile
|
||||
cp $< $@
|
||||
|
|
@ -93,7 +92,7 @@ unpack.done: $(KERNEL_PKG)
|
|||
tar -xzf $(KERNEL_PKG)
|
||||
touch $@
|
||||
|
||||
%.lxdone: unpack.done config-$(KERNEL_VERSION) $(LOCAL_PRE_BUILD)
|
||||
%.lxdone: unpack.done config-$(KERNEL_VERSION) $(LOCAL_PRE_BUILD) linux-$(KERNEL_VERSION)/Makefile
|
||||
$(BUILD) $(basename $@)
|
||||
touch $@
|
||||
|
||||
|
|
@ -124,8 +123,8 @@ rpm.done: $(F_SPM)
|
|||
rpmbuild --rebuild $(F_SPM)
|
||||
touch $@
|
||||
|
||||
%.$(ARCH).rpm: rpm.done
|
||||
cp /usr/src/packages/RPMS/$(ARCH)/$@ .
|
||||
%.i386.rpm: rpm.done
|
||||
cp /usr/src/packages/RPMS/i386/$@ .
|
||||
|
||||
CURRENT_RPM_RUN_I386: $(F_RPM_RUN)
|
||||
echo $(UPLOAD_PATH)/rpm/run/$(F_RPM_RUN) > $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue