mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
rpmdist.mk: Add target rpm-next-build
- Add target rpm-next-build - Overall beautification, untested
This commit is contained in:
parent
1e60cbd5d1
commit
f113cd95d6
1 changed files with 15 additions and 9 deletions
|
|
@ -18,8 +18,11 @@ FTP_HOST ?= ftp.jannet.de
|
|||
FTP_HOST_LOGIN ?= root
|
||||
RPM_PROJECT ?= $(PROJECT)
|
||||
RPM_VERSION ?= $(DIST_VERSION)
|
||||
LAST_RPM_VERSION ?= $(shell sed 's/-dev$$//' $(TOPDIR)/LAST_RPM_VERSION 2>/dev/null)
|
||||
RPM_ARCH ?= i586
|
||||
RPMBUILD ?= rpmbuild
|
||||
CHECK_CVS_SYNC_BEFORE_RPM_RELEASE ?= true
|
||||
HASH = $(shell $(cvs_files) | grep -v "CHANGES\|VERSION\|HASH\|MD5SUMS" | xargs md5sum | md5sum | sed 's/ .*//')
|
||||
|
||||
include $(MODDIR)/make/tag-defs.mk
|
||||
|
||||
|
|
@ -44,6 +47,8 @@ DIST_DIRS = $(DIST_SRC_DIR) $(DIST_PCKG_DIR)
|
|||
DIST_PCKG_RPM = $(DIST_PCKG_DIR)/$(PCKG_RPM_RUN_I386) $(DIST_PCKG_DIR)/$(PCKG_RPM_DEVEL_I386)
|
||||
RPM_REQUIRES_DEVEL += $(RPM_PROJECT)-run = $(RPM_VERSION)
|
||||
|
||||
|
||||
|
||||
unexport RPM_VERSION VERSION DIST_SRC_DIR
|
||||
|
||||
include $(MODDIR)/make/tag-rules.mk
|
||||
|
|
@ -131,8 +136,6 @@ update-repo.dist: upload.dist
|
|||
|
||||
# ------ hash stuff
|
||||
|
||||
CHECK_CVS_SYNC_BEFORE_RPM_RELEASE ?= true
|
||||
|
||||
define check_cvs_sync
|
||||
echo + checking cvs ;\
|
||||
cvs status > cvs_status.tmp 2>&1;\
|
||||
|
|
@ -155,20 +158,23 @@ define increase_build_number
|
|||
if [ "$(CHECK_CVS_SYNC_BEFORE_RPM_RELEASE)" = true ]; then \
|
||||
$(check_cvs_sync) ;\
|
||||
fi ;\
|
||||
if [ "$(LAST_RPM_VERSION)" != $(RPM_VERSION) ]; then \
|
||||
exit 0 ;\
|
||||
fi ;\
|
||||
echo $(MAJOR_MINOR_RELEASE)-$(shell expr $(BUILD_NUMBER) + 1)-dev | tee VERSION ;\
|
||||
echo $(HASH) > HASH ;\
|
||||
if ! grep -q HASH CVS/Entries; then \
|
||||
cvs add HASH ;\
|
||||
fi ;\
|
||||
cvs commit -m "o $(VERSION)" HASH VERSION
|
||||
cvs commit -m "o $(RPM_VERSION)" HASH VERSION
|
||||
endef
|
||||
|
||||
HASH = $(shell $(cvs_files) | grep -v "CHANGES\|VERSION\|HASH\|MD5SUMS" | xargs md5sum | md5sum | sed 's/ .*//')
|
||||
LAST_RPM_VERSION = $(shell cat $(TOPDIR)/LAST_RPM_VERSION 2>/dev/null)
|
||||
|
||||
md5:
|
||||
echo $(HASH) > HASH
|
||||
|
||||
rpm-next-build:
|
||||
@$(increase_build_number)
|
||||
|
||||
rpm-update-release:
|
||||
@if [ "`cat HASH`" != "$(HASH)" ]; then \
|
||||
echo + source was modified ;\
|
||||
|
|
@ -185,16 +191,16 @@ rpm-check-release:
|
|||
fi
|
||||
|
||||
rpm-release: rpm-update-release
|
||||
@if [ "$(VERSION)" != "$(LAST_RPM_VERSION)" ]; then \
|
||||
@if [ "$(LAST_RPM_VERSION)" != "$(RPM_VERSION)" ]; then \
|
||||
$(check_cvs_sync) ;\
|
||||
echo "+ version $(VERSION) doesn't match latest released rpm version "\
|
||||
echo "+ version $(RPM_VERSION) doesn't match latest released rpm version "\
|
||||
"$(LAST_RPM_VERSION), building a new release" ;\
|
||||
make rpm-clean update-repo.dist || exit 1;\
|
||||
cp VERSION LAST_RPM_VERSION ;\
|
||||
if ! grep -q LAST_RPM_VERSION CVS/Entries; then \
|
||||
cvs add LAST_RPM_VERSION ;\
|
||||
fi ;\
|
||||
cvs commit -m "o $(VERSION)" LAST_RPM_VERSION ;\
|
||||
cvs commit -m "o $(RPM_VERSION)" LAST_RPM_VERSION ;\
|
||||
else \
|
||||
echo "+ version matches latest released rpm version" ;\
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue