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 $(MODDIR)/make/topdir.mk
|
||||
include $(MODDIR)/make/srcdist.mk
|
||||
|
||||
all:
|
||||
clean: clean.pkgconfig
|
||||
|
|
|
|||
|
|
@ -1,12 +1,33 @@
|
|||
%-src.zip: distclean
|
||||
mkdir -p $(DISTDIR)/src/$(PROJECT)
|
||||
mkdir -p $(PCKGDIR)
|
||||
$(RM) -rf $(DISTDIR)/src/$(PROJECT)/*
|
||||
mkdir -p $(DISTDIR)/src/$(PROJECT)/mod
|
||||
cd $(TOPDIR); find . -type f | \
|
||||
grep -ve 'CVS\|contrib/nomake\|tar.gz\|/dist/' | \
|
||||
xargs tar -cf - | tar -C $(DISTDIR)/src/$(PROJECT) -xf -
|
||||
echo $(DIST_VERSION) > $(DISTDIR)/src/$(PROJECT)/VERSION ;\
|
||||
for mod in $(REQUIRED) ; do make -C $(MODDIR)/$$mod clean; cp -r $(MODDIR)/$$mod $(DISTDIR)/src/$(PROJECT)/mod/ ; done ;\
|
||||
cp $(MODDIR)/Makefile $(DISTDIR)/src/$(PROJECT)/mod/ ;\
|
||||
tar -czv -C $(DISTDIR)/src/ -f $@ $(PROJECT)
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue