summaryrefslogtreecommitdiffstats
path: root/encap/tools/makeself
diff options
context:
space:
mode:
Diffstat (limited to 'encap/tools/makeself')
-rw-r--r--encap/tools/makeself/Makefile60
-rw-r--r--encap/tools/makeself/makeself-2.1.4.ep63
2 files changed, 123 insertions, 0 deletions
diff --git a/encap/tools/makeself/Makefile b/encap/tools/makeself/Makefile
new file mode 100644
index 000000000..fc62cecc2
--- /dev/null
+++ b/encap/tools/makeself/Makefile
@@ -0,0 +1,60 @@
+# $Id$
+
+.PHONY : all install clean uninstall encaps rename
+.SUFFIXES :
+.SUFFIXES : .ep .installed .packaged
+
+BASEDIR = /usr/local
+ENCAPDIR = ${BASEDIR}/encap
+export ENCAPDIR
+EPKG = ${BASEDIR}/bin/epkg
+export EPKG
+MKENCAP = ${BASEDIR}/bin/mkencap
+export MKENCAP
+
+MAKESELF = makeself-2.1.4
+
+.ep.installed : # Clean, compile and install an encap package
+ @printf "***** START .ep.installed for |$*| ***** \n"
+ ( ${EPKG} -q -r ${ENCAPDIR}/$* || true )
+ ( rm -rf ${ENCAPDIR}/$* || true )
+ ( ${MKENCAP} -m /usr/local/bin/m4 -b -DUP $*.ep || true ) > $*.log 2>&1
+ ( ${MKENCAP} -m /usr/local/bin/m4 -b -T $*.ep || true ) >> $*.log 2>&1
+ ( ${MKENCAP} -m /usr/local/bin/m4 -b -CBI $*.ep ) >> $*.log 2>&1
+ ${EPKG} -q -i ${ENCAPDIR}/$*
+ test -h ${BASEDIR}/var/encap/$*
+ touch $*.installed
+ @printf "***** STOP .ep.installed for |$*| ***** \n"
+
+.installed.packaged : # Create .tar.gz encap packages for distribution
+ @printf "***** START .installed.packaged for |$*| ***** \n"
+ ( rm ${ENCAPDIR}/$*-*.tar.gz || true )
+ ( cd ${ENCAPDIR} && ${MKENCAP} -e $* || true )
+ cd ${ENCAPDIR} && ${MKENCAP} -c $*
+ mv ${ENCAPDIR}/$*-encap-*.tar.gz .
+ touch $*.packaged
+ @printf "***** STOP .installed.packaged for |$*| ***** \n"
+
+all :
+ ( $(MAKE) install > make.log 2>&1 && $(MAKE) encaps >> make.log 2>&1 ) &
+
+install : ${EPKG} ${MKENCAP} ${MAKESELF}.installed
+
+encaps : ${EPKG} ${MKENCAP} ${MAKESELF}.packaged
+
+rename : encaps
+ test "$${OS}x" != "x"
+ for EARCHIVE in `ls *-encap-*.tar.gz`; do \
+ mv $${EARCHIVE} `printf $${EARCHIVE} | awk -F- '{$$NF = "OSDIST.tar.gz" ; print}' | sed s:\ :-:g | sed s:OSDIST:\$${OS}:g` ; \
+ done
+
+clean :
+ ( rm *.log || true )
+ ( rm *.packaged || true )
+ ( rm *.gz || true )
+ ( rm *~ || true )
+
+uninstall : clean
+ ( rm *.installed || true )
+ ( ${EPKG} -q -r ${ENCAPDIR}/makeself* || true )
+ ( rm -rf ${ENCAPDIR}/makeself* || true )
diff --git a/encap/tools/makeself/makeself-2.1.4.ep b/encap/tools/makeself/makeself-2.1.4.ep
new file mode 100644
index 000000000..8e8c5f2b5
--- /dev/null
+++ b/encap/tools/makeself/makeself-2.1.4.ep
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+
+<!-- $Id$ -->
+
+<encap_profile
+ profile_ver="1.0"
+ pkgspec="makeself-2.1.4"
+>
+
+<source
+url="http://www.pobox.com/users/dclark/mirror/makeself/makeself-2.1.4.run
+ http://www.megastep.org/makeself/makeself-2.1.4.run"
+subdir="/"
+>
+<!-- TODO check above megastep URL, and create mirror -->
+
+<unpack><![CDATA[
+cd .. && \
+rm -rf ${ENCAP_PKGNAME} && \
+/bin/sh ${ENCAP_PKGNAME}.run
+]]></unpack>
+
+<configure>
+:
+</configure>
+
+<build>
+:
+</build>
+
+<install>
+test -d ${ENCAP_SOURCE} || mkdir ${ENCAP_SOURCE}
+test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME} || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}
+test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/bin || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/bin
+test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man
+test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man/man1 || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man/man1
+test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share
+test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc
+test -d ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/makeself || mkdir ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/makeself
+if [ -d ${builddir}/${ENCAP_PKGNAME}.run ]; then rmdir ${builddir}/${ENCAP_PKGNAME}.run; fi
+cp ${builddir}/* ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/makeself
+mv ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/makeself/*.sh ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/bin
+mv ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/share/doc/makeself/*.1 ${ENCAP_SOURCE}/${ENCAP_PKGNAME}/man/man1
+</install>
+
+<clean>
+:
+</clean>
+
+</source>
+
+<prepackage type="set">
+# Make "this encap is installed" sentinal file available in /usr/local/var/encap
+test -d var || mkdir var
+test -d var/encap || mkdir var/encap
+touch var/encap/${ENCAP_PKGNAME}
+</prepackage>
+
+<encapinfo>
+description makeself - Make self-extractable archives on Unix
+</encapinfo>
+
+</encap_profile>