From 39ab351aee7bb86fa90450edc0ab75cdf705728f Mon Sep 17 00:00:00 2001 From: Daniel Joseph Barnhart Clark Date: Sun, 6 Aug 2006 15:35:55 +0000 Subject: Add python-apt for platforms that use apt git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2048 ce84e21b-d406-0410-9b95-82705330c041 --- encap/tools/bcfg2-python-apt/Makefile | 60 ++++++++++++++ encap/tools/bcfg2-python-apt/README | 3 + .../bcfg2-python-apt/bcfg2-python-apt-0.6.19.ep | 93 ++++++++++++++++++++++ 3 files changed, 156 insertions(+) create mode 100644 encap/tools/bcfg2-python-apt/Makefile create mode 100644 encap/tools/bcfg2-python-apt/README create mode 100644 encap/tools/bcfg2-python-apt/bcfg2-python-apt-0.6.19.ep (limited to 'encap/tools/bcfg2-python-apt') diff --git a/encap/tools/bcfg2-python-apt/Makefile b/encap/tools/bcfg2-python-apt/Makefile new file mode 100644 index 000000000..929bc97ec --- /dev/null +++ b/encap/tools/bcfg2-python-apt/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 + +PYTHON-APT = bcfg2-python-apt-0.6.19 + +.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} ${PYTHON-APT}.installed + +encaps : ${EPKG} ${MKENCAP} ${PYTHON-APT}.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}/bcfg2-python-apt* || true ) + ( rm -rf ${ENCAPDIR}/bcfg2-python-apt* || true ) diff --git a/encap/tools/bcfg2-python-apt/README b/encap/tools/bcfg2-python-apt/README new file mode 100644 index 000000000..a5f251fef --- /dev/null +++ b/encap/tools/bcfg2-python-apt/README @@ -0,0 +1,3 @@ +Before building this, make sure that you have these libraries installed: + * /usr/lib/libapt-pkg* (Part of the "apt" package on Debian) + * /usr/lib/libapt-inst* (Part of the "apt-utils" package on Debian) \ No newline at end of file diff --git a/encap/tools/bcfg2-python-apt/bcfg2-python-apt-0.6.19.ep b/encap/tools/bcfg2-python-apt/bcfg2-python-apt-0.6.19.ep new file mode 100644 index 000000000..448d04351 --- /dev/null +++ b/encap/tools/bcfg2-python-apt/bcfg2-python-apt-0.6.19.ep @@ -0,0 +1,93 @@ + + + + + + + + + + +PLATFORM_IF_MATCH(linux) +PLATFORM_ELSE + +PLATFORM_ENDIF + + + + + + + + +/usr/local/lib/bcfg2/bin/python setup.py build_ext \ +-I/usr/local/lib/bcfg2/include \ +-L/usr/local/lib/bcfg2/lib \ +-L/usr/local/lib/bcfg2/lib/python2.4/site-packages + + + +/usr/local/lib/bcfg2/bin/python setup.py build \ +--build-base=${builddir}/build + + + +/usr/local/lib/bcfg2/bin/python setup.py install \ +--prefix=${ENCAP_SOURCE}/${ENCAP_PKGNAME}/lib/bcfg2 \ + + + +/usr/local/lib/bcfg2/bin/python setup.py clean --all + + + + + +mkdir var 2>/dev/null || exit 0 +mkdir var/encap 2>/dev/null || exit 0 +touch var/encap/${ENCAP_PKGNAME} + + + +description python-apt - python interface to libapt-pkg + + + -- cgit v1.2.3-1-g7c22