mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
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>
This commit is contained in:
parent
c12b242a72
commit
9f4d0adf5f
2 changed files with 34 additions and 12 deletions
1
Makefile
1
Makefile
|
|
@ -4,6 +4,7 @@ RPM_UPLOAD_URLPREFIX ?= rsync_ssh://$(JANWARE_USER)@pkg.janware.com:/srv/ft
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
include $(TOPDIR)/make/proj.mk
|
||||||
include $(MODDIR)/make/topdir.mk
|
include $(MODDIR)/make/topdir.mk
|
||||||
|
include $(MODDIR)/make/srcdist.mk
|
||||||
|
|
||||||
all:
|
all:
|
||||||
clean: clean.pkgconfig
|
clean: clean.pkgconfig
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,33 @@
|
||||||
%-src.zip: distclean
|
ifeq ($(VCS),cvs)
|
||||||
mkdir -p $(DISTDIR)/src/$(PROJECT)
|
WD_PKG_VCS_SUFFIX = -cvs
|
||||||
mkdir -p $(PCKGDIR)
|
WD_PKG_VCS_FILES = $(shell find . -name CVS)
|
||||||
$(RM) -rf $(DISTDIR)/src/$(PROJECT)/*
|
else ifeq ($(VCS),git)
|
||||||
mkdir -p $(DISTDIR)/src/$(PROJECT)/mod
|
WD_PKG_VCS_SUFFIX = -git
|
||||||
cd $(TOPDIR); find . -type f | \
|
WD_PKG_VCS_FILES = .git
|
||||||
grep -ve 'CVS\|contrib/nomake\|tar.gz\|/dist/' | \
|
endif
|
||||||
xargs tar -cf - | tar -C $(DISTDIR)/src/$(PROJECT) -xf -
|
|
||||||
echo $(DIST_VERSION) > $(DISTDIR)/src/$(PROJECT)/VERSION ;\
|
WD_PKG_DIR = $(TOPDIR)/dist/wd
|
||||||
for mod in $(REQUIRED) ; do make -C $(MODDIR)/$$mod clean; cp -r $(MODDIR)/$$mod $(DISTDIR)/src/$(PROJECT)/mod/ ; done ;\
|
WD_PKG_BASE_NAME = $(RPM_PROJECT)$(WD_PKG_VCS_SUFFIX)-$(RPM_VERSION)
|
||||||
cp $(MODDIR)/Makefile $(DISTDIR)/src/$(PROJECT)/mod/ ;\
|
WD_PKG = $(WD_PKG_BASE_NAME).tar.bz2
|
||||||
tar -czv -C $(DISTDIR)/src/ -f $@ $(PROJECT)
|
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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue