jw-pkg/make/srcdist.mk
Jan Lindemann 9f4d0adf5f srcdist.mk: Trade obsolete contents for VCS-aware tarball generation
Ditch the old and mostly dysfunctional contents of srcdist.mk and refill it
with rules to generate a source code tarball containing version control meta
files.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-08 08:09:06 +00:00

33 lines
1,014 B
Makefile

ifeq ($(VCS),cvs)
WD_PKG_VCS_SUFFIX = -cvs
WD_PKG_VCS_FILES = $(shell find . -name CVS)
else ifeq ($(VCS),git)
WD_PKG_VCS_SUFFIX = -git
WD_PKG_VCS_FILES = .git
endif
WD_PKG_DIR = $(TOPDIR)/dist/wd
WD_PKG_BASE_NAME = $(RPM_PROJECT)$(WD_PKG_VCS_SUFFIX)-$(RPM_VERSION)
WD_PKG = $(WD_PKG_BASE_NAME).tar.bz2
WD_PKG_PATH = $(WD_PKG_DIR)/$(WD_PKG)
WD_PKG_UPLOAD_SERVER = pkg.janware.com
WD_PKG_UPLOAD_PATH = /srv/dav/pub/clients/jw
all:
ifeq ($(VCS),cvs)
ifneq ($(GIT_BUDDY_DIR),)
git2cvs:
cvs up -dP
git -C $(GIT_BUDDY_DIR) cherry origin HEAD | sed -n 's/^+ //p' | xargs -l1 git -C $(GIT_BUDDY_DIR) cvsexportcommit -w $(CWD) -c -p -v
endif
else ifeq ($(VCS),git)
cvs2git:
git cvsimport -v -kk proj/$(PROJECT)
endif
$(WD_PKG_DIR):
mkdir -p $@
pkg-upload-wd: | $(WD_PKG_DIR)
make -s list-files | xargs echo $(WD_PKG_VCS_FILES) | xargs tar --transform "s|^|$(WD_PKG_BASE_NAME)/|" -cjf $(WD_PKG_PATH)