diff options
author | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-06 15:35:55 +0000 |
---|---|---|
committer | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-06 15:35:55 +0000 |
commit | 39ab351aee7bb86fa90450edc0ab75cdf705728f (patch) | |
tree | af83b97155df6a1d0914f9cd4ebaea1dbd78c015 /encap | |
parent | 905358e4ecac7f6ff389e4b7883a0de4824ff9b6 (diff) | |
download | bcfg2-39ab351aee7bb86fa90450edc0ab75cdf705728f.tar.gz bcfg2-39ab351aee7bb86fa90450edc0ab75cdf705728f.tar.bz2 bcfg2-39ab351aee7bb86fa90450edc0ab75cdf705728f.zip |
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
Diffstat (limited to 'encap')
-rw-r--r-- | encap/TODO | 4 | ||||
-rw-r--r-- | encap/tools/README | 4 | ||||
-rw-r--r-- | encap/tools/bcfg2-python-apt/Makefile | 60 | ||||
-rw-r--r-- | encap/tools/bcfg2-python-apt/README | 3 | ||||
-rw-r--r-- | encap/tools/bcfg2-python-apt/bcfg2-python-apt-0.6.19.ep | 93 |
5 files changed, 164 insertions, 0 deletions
diff --git a/encap/TODO b/encap/TODO index ab536f293..b5c6547fb 100644 --- a/encap/TODO +++ b/encap/TODO @@ -15,6 +15,10 @@ * Make *-doc* .ep's "shared" instead of platform-specific. + * Update README to refer to need to make/install tools/bcfg2-python-apt + on apt-using platforms (Debian, Ubuntu etc.) - also mention false error + message you will get if you don't. + * Announce to mailing list: * daemontools & ostiary stuff * encap support for Solaris (sparc and x86) diff --git a/encap/tools/README b/encap/tools/README index 9720e3353..bdb4cd1ab 100644 --- a/encap/tools/README +++ b/encap/tools/README @@ -1,3 +1,7 @@ +bcfg2-python-apt +---------------- +Needed for bcfg2 clients that use the "Advanced Packaging Tool" (apt). + bcfg2-server ------------ Encaps for bcfg2 server deps. Only for GNU/Linux. 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 @@ +<?xml version="1.0"?> + +<!-- $Id$ --> + +<encap_profile + profile_ver="1.0" + pkgspec="bcfg2-python-apt-0.6.19" +> + +<environment + variable="CC" + value="gcc" + type="set" +/> + +<environment + variable="PATH" +PLATFORM_IF_MATCH(solaris) + value="/usr/local/lib/bcfg2/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:" +PLATFORM_ELSE + value="/usr/local/lib/bcfg2/bin:/usr/local/bin:" +PLATFORM_ENDIF + type="prepend" +/> + +PLATFORM_IF_MATCH(linux) +PLATFORM_ELSE +<environment + variable="MAKE" + value="gmake" + type="set" +/> +PLATFORM_ENDIF + +<environment + variable="LDFLAGS" +PLATFORM_IF_MATCH(linux) + value="-L/usr/local/lib/bcfg2/lib -Wl,-rpath,/usr/local/lib/bcfg2/lib" +PLATFORM_ELSE_IF_MATCH(aix) + value="-L/usr/local/lib/bcfg2/lib -Wl,-blibpath:/usr/local/lib/bcfg2/lib:/usr/lib" +PLATFORM_ELSE_IF_MATCH(solaris) + value="-L/usr/local/lib/bcfg2/lib -R/usr/local/lib/bcfg2/lib:/usr/lib -YP,/usr/local/lib/bcfg2/lib:/usr/lib" +PLATFORM_ELSE +PLATFORM_ENDIF + type="set" +/> + +<environment + variable="CPPFLAGS" + value="-I/usr/local/lib/bcfg2/include" + type="set" +/> + +<source +url="http://www.pobox.com/users/dclark/mirror/python-apt/python-apt_0.6.19.tar.gz + http://ftp.debian.org/debian/pool/main/p/python-apt/python-apt_0.6.19.tar.gz" +subdir="python-apt-0.6.19" +> + +<configure> +/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 +</configure> + +<build> +/usr/local/lib/bcfg2/bin/python setup.py build \ +--build-base=${builddir}/build +</build> + +<install> +/usr/local/lib/bcfg2/bin/python setup.py install \ +--prefix=${ENCAP_SOURCE}/${ENCAP_PKGNAME}/lib/bcfg2 \ +</install> + +<clean> +/usr/local/lib/bcfg2/bin/python setup.py clean --all +</clean> + +</source> + +<prepackage type="set"> +mkdir var 2>/dev/null || exit 0 +mkdir var/encap 2>/dev/null || exit 0 +touch var/encap/${ENCAP_PKGNAME} +</prepackage> + +<encapinfo> +description python-apt - python interface to libapt-pkg +</encapinfo> + +</encap_profile> |