Commit b5e343c7 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

proceeding with package creation

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


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3748
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent ea080ae0
......@@ -350,9 +350,13 @@ compile-tests: \
# --------------
# is delegated to Makefile.packages
# which still has to be coded
PACKAGE=libaff
#ifdef TF_MAKEPKG
#include $(TF_MAKEPKG)
#endif
ifdef TF_MAKEPKG
package:
$(MAKE) -f $(TF_MAKEPKG) \
PACKAGE=libaff \
PACKAGECONTENTS="l" \
PACKAGETARGETS="l" \
PACKAGEEXPORT=trunk/src/libs/libaff
endif
# ----- END OF Makefile -----
......@@ -30,6 +30,13 @@
# ============================================================================
#
.PHONY: package
package:
$(MAKE) -f $(TF_MAKEPKG) packageclean
$(MAKE) -f $(TF_MAKEPKG) publish
#----------------------------------------------------------------------
ifndef CHECKVAR
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
endif
......@@ -56,8 +63,48 @@ $(call CHECKVARS,PACKAGECONTENTS PACKAGETARGETS PACKAGEEXPORT)
VERSIONCODE=$(shell date +'%Y%m%d')
# name of the package (including version code)
THEPACKAGE=$(PACKAGE)$(VERSIONCODE)
# directory to place temporary files in
TMPDIR=$(HOME)/tmp
# path where the package will be created
TMPPATH=$(HOME)/tmp/$(PACKAGE)
TMPPATH=$(TMPDIR)/$(PACKAGE)
#======================================================================
# prepare clean space for package creation
.PHONY: packageclean
packageclean:
/bin/rm -rfv $(TMPPATH)
#======================================================================
# provide information files
INFOFILESFROMSVN=README.compile README.1st TFbashrc LICENSE.GPL
INFOFILES=$(INFOFILESFROMSVN) README.system
# information on system where this package was created on
$(TMPPATH)/README.system:
mkdir -pv $(dir $@)
echo "This package was created on the following system" > $@
echo "------------------------------------------------" >> $@
echo -e "\nOperating system:" >> $@
cat /etc/SuSE-release 2>&1 >> $@
echo -e "\nHost and kernel:" >> $@
uname -a 2>&1 >> $@
echo -e "\nCompilers:" >> $@
(echo -n "$(CC): "; $(CC) --version) 2>&1 | head -1 >> $@
(echo -n "$(CXX): "; $(CXX) --version) 2>&1 | head -1 >> $@
(echo -n "$(CPP): "; $(CPP) --version) 2>&1 | head -1 >> $@
(echo -n "$(FC): "; $(FC) --version) 2>&1 | head -1 >> $@
$(addprefix $(TMPPATH)/,$(INFOFILESFROMSVN)):
mkdir -pv $(dir $@)
svn export $(SVNTF)/trunk/src/$(notdir $@) $@
#======================================================================
# create contents of package creation directory
$(TMPPATH): $(addprefix $(TMPPATH)/,$(INFOFILES))
#======================================================================
# create archive and publish
# tar file
PACKAGETARFILE=$(THEPACKAGE).tar
......@@ -66,23 +113,30 @@ PACKAGEGZIPFILE=$(PACKAGETARFILE).gz
# bzipped tar file
PACKAGEBZIPFILE=$(PACKAGETARFILE).bz2
# create package files
package: $(TF_PUBLICATIONPATH)/$(PACKAGEBZIPFILE) \
$(TF_PUBLICATIONPATH)/$(PACKAGEGZIPFILE)
rm -fv $(PACKAGETARFILE)
# 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 $<
%.tar.gz: %.tar
cp -vpd $< $<.sik
gzip -9vf $<
mv -vpd $<.sii $<
%.tar.bz2: %.tar; bzip2 -9vfk $<
# copy file to publication directory
$(TF_PUBLICATIONPATH)/%: $(TMPDIR)/%
-mkdir -pv $(dir $@)
/bin/mv -fv $< $@
$(PACKAGETRAFILE): $(TMPPATH)
cd $</..; tar cvf $@ $<
# publish package files
.PHONY: publish
publish: $(TF_PUBLICATIONPATH)/$(PACKAGEGZIPFILE) \
$(TF_PUBLICATIONPATH)/$(PACKAGEBZIPFILE)
# TMPPATH contents
TMPPATHCONTENTS=README.compile README.1st TFbashrc LICENSE.GPL \
src $(PACKAGECONTENTS)
#======================================================================
ifdef THEFROZZLEHASDONEITALREADY
package:
......
Supports Markdown
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