mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
rpmdist.mk: Some fixed to rpm-release target
This commit is contained in:
parent
0fdcd7a37d
commit
41e395ff04
1 changed files with 15 additions and 21 deletions
|
|
@ -57,8 +57,8 @@ ftag: ftag.dist
|
|||
rpm-upload-stable: rpm-upload-STABLE.dist
|
||||
rpm-upload-rc: rpm-upload-RC.dist
|
||||
rpm-clean: clean.rpm
|
||||
rpm-uninstall: rpmuninstall.dist
|
||||
rpm-install: rpminstall.dist
|
||||
rpm-uninstall: config rpmuninstall.dist
|
||||
rpm-install: config rpminstall.dist
|
||||
rpm-reinstall: rpm-uninstall rpm-clean rpm-install
|
||||
|
||||
clean.rpm:
|
||||
|
|
@ -94,7 +94,7 @@ cpfiles.dist:
|
|||
|
||||
%.tar.gz: cpfiles.dist cpmod.dist
|
||||
mkdir -p $(DIST_PCKG_DIR)
|
||||
tar --anchored $(addprefix --exclude=,$(GENERATED))\
|
||||
tar --anchored $(addprefix --exclude=,$(GENERATED)) \
|
||||
-czvf $@ -C $(dir $(DIST_SRC_DIR)) $(notdir $(DIST_SRC_DIR))
|
||||
|
||||
%.src.rpm: %.tar.gz
|
||||
|
|
@ -139,12 +139,6 @@ update-repo.dist: upload.dist
|
|||
|
||||
# ------ hash stuff
|
||||
|
||||
define cvs_files
|
||||
for d in `find . | sed '/CVS\/Entries$$/ !d; s%CVS/Entries%%'`; do \
|
||||
sed "/^\// !d; s%^/%%; s%/.*%%; s%^%$$d%" $$d/CVS/Entries ;\
|
||||
done
|
||||
endef
|
||||
|
||||
CHECK_CVS_STATUS_BEFORE_INCREASING_BUILD_NUMBER ?= true
|
||||
|
||||
define increase_build_number
|
||||
|
|
@ -168,16 +162,13 @@ define increase_build_number
|
|||
echo $(MAJOR_MINOR_RELEASE)-$(shell expr $(BUILD_NUMBER) + 1)-dev | tee VERSION ;\
|
||||
echo $(HASH) > HASH ;\
|
||||
if ! grep -q HASH CVS/Entries; then \
|
||||
echo cvs add HASH ;\
|
||||
cvs add HASH ;\
|
||||
fi ;\
|
||||
echo cvs commit -m "o $(VERSION)" HASH VERSION
|
||||
cvs commit -m "o $(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 >/dev/null 2>&1)
|
||||
|
||||
md5clean:
|
||||
rm -f HASH
|
||||
LAST_RPM_VERSION = $(shell cat $(TOPDIR)/LAST_RPM_VERSION 2>/dev/null)
|
||||
|
||||
md5:
|
||||
echo $(HASH) > HASH
|
||||
|
|
@ -187,26 +178,29 @@ rpm-update-release:
|
|||
echo + source was modified ;\
|
||||
$(increase_build_number) ;\
|
||||
else \
|
||||
echo + source is unmodified, new build unnecessary ;\
|
||||
echo + source is unmodified ;\
|
||||
fi
|
||||
|
||||
rpm-check-release:
|
||||
@if [ "`cat HASH`" != "$(HASH)" ]; then \
|
||||
echo + source was modified ;\
|
||||
else \
|
||||
echo + source is unmodified, new build unnecessary ;\
|
||||
echo + source is unmodified ;\
|
||||
fi
|
||||
|
||||
rpm-next-build:
|
||||
$(increase_build_number)
|
||||
|
||||
rpm-release: rpm-update-release
|
||||
if [ "$(VERSION)" != "$(LAST_RPM_VERSION)" ]; then ;\
|
||||
echo make update-repo.dist ;\
|
||||
@if [ "$(VERSION)" != "$(LAST_RPM_VERSION)" ]; then \
|
||||
echo "+ version doesn't match latest released rpm version, building a new release" ;\
|
||||
make update-repo.dist || exit 1;\
|
||||
cp VERSION LAST_RPM_VERSION ;\
|
||||
if ! grep -q LAST_RPM_VERSION CVS/Entries; then
|
||||
if ! grep -q LAST_RPM_VERSION CVS/Entries; then \
|
||||
cvs add LAST_RPM_VERSION ;\
|
||||
fi ;\
|
||||
echo cvs commit -m "o $(VERSION)" LAST_RPM_VERSION ;\
|
||||
cvs commit -m "o $(VERSION)" LAST_RPM_VERSION ;\
|
||||
else \
|
||||
echo "+ version matches latest released rpm version" ;\
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue