Commit 330a8dba authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

Small package creation rule implemented.

This is a legacy commit from before 2015-05-18.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.

First I wanted to use the package building Makefile of the TFSoftware repository
but I noticed that for my application too many directories and README files
were included so that a package would have become confusing. So I decided to
implement my own small package creation rule based on
source:tfsoftware/trunk/src/pakete/Makefile.packages .


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4410
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent eed9d3f6
......@@ -22,6 +22,7 @@
#
# REVISIONS and CHANGES
# 15/01/2012 V0.1 Daniel Armbruster
# 16/01/2012 V0.2 added package rule
# ----------------------------------------------------------------------------
.PHONY: all
......@@ -72,8 +73,70 @@ installscripts:
ln -fs $(PWD)/csbackgen.py $(LOCBINDIR)/csbackgen
ln -fs $(PWD)/csbackchk.py $(LOCBINDIR)/csbackchk
# ----------------------------------------------------------------------------
pdfdoc:
$(MAKE) -C doc pdf
# ============================================================================
# create package
# --------------
# version code based on current date
VERSIONCODE=$(shell date +'%Y%m%d')
# name of the package (including version code)
THEPACKAGE=csback$(VERSIONCODE)
# directory to place temporary files in
TMPDIR=$(HOME)/tmp
# path where the package will be created
TMPPATH=$(TMPDIR)/$(THEPACKAGE)
# tar file
PACKAGETARFILE=$(THEPACKAGE).tar
# gzipped tar file
PACKAGEGZIPFILE=$(PACKAGETARFILE).gz
# bzipped tar file
PACKAGEBZIPFILE=$(PACKAGETARFILE).bz2
# list of README files to be obtained from the subversion repository
INFOFILESFROMSVNWITHPATH=src/LICENSE.GPL
# list of files to be created
INFOFILESFROMSVN=$(notdir $(INFOFILESFROMSVNWITHPATH))
DIRFROMSVNWITHPATH=src/python/csback
# list of files to be created
DIRFROMSVN=$(notdir $(DIRFROMSVNWITHPATH))
# rule for the creation of README files from the repository
$(addprefix $(TMPPATH)/,$(INFOFILESFROMSVN)):
mkdir -pv $(dir $@)
svn export \
$(SVNTF)/trunk/$(filter %$(notdir $@),$(INFOFILESFROMSVNWITHPATH)) $@
# rule for the creation of csback files from the repository
$(addprefix $(TMPPATH)/,$(DIRFROMSVN)):
mkdir -pv $(dir $@)
svn export $(SVNTF)/trunk/$(filter %$(notdir $@),$(DIRFROMSVNWITHPATH)) $@
# create package tar archive
$(TMPDIR)/$(PACKAGETARFILE): $(TMPPATH)
/bin/rm -fv $@
cd $</..; tar cvf $@ $(notdir $<)
/bin/rm -fv $(TMPDIR)/$(PACKAGEGZIPFILE) $(TMPDIR)/$(PACKAGEBZIPFILE)
# create compressed archives
$(TMPDIR)/$(PACKAGEGZIPFILE): $(TMPDIR)/$(PACKAGETARFILE)
/bin/cp -vf $< $<.sik
gzip -vf9 $<
/bin/mv $<.sik $<
$(TMPDIR)/$(PACKAGEBZIPFILE): $(TMPDIR)/$(PACKAGETARFILE); bzip2 -vf9 $<
.PHONY: package
package:
- /bin/rm -rvf $(TMPPATH)
$(MAKE) $(addprefix $(TMPPATH)/,$(INFOFILESFROMSVN))
$(MAKE) $(addprefix $(TMPPATH)/,$(DIRFROMSVN))
$(MAKE) -C $(TMPPATH)/$(DIRFROMSVN) doc
$(MAKE) $(TMPDIR)/$(PACKAGEGZIPFILE) $(TMPDIR)/$(PACKAGEBZIPFILE)
/bin/mv -fv $(TMPDIR)/$(PACKAGEGZIPFILE) $(TMPDIR)/$(PACKAGEBZIPFILE) \
$(TF_PUBLICATIONPATH)
# ----- END OF Makefile -----
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment