PLATFORM_IF_MATCH(linux) PLATFORM_ELSE PLATFORM_ENDIF : /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 /dev/null || exit 1 for FILE in `ls lib/bcfg2/bin`; do \ ln -sf ../lib/bcfg2/bin/${FILE} bin/${FILE}; \ if [ ! "`printf "${FILE}" | cut -c 1-5`x" = "bcfg2x" ]; then \ ln -sf ../lib/bcfg2/bin/${FILE} bin/b2-${FILE}; \ fi; \ done # Make doc available from /usr/local/share/doc/bcfg2 mkdir share 2>/dev/null || exit 1 mkdir share/doc 2>/dev/null || exit 1 mkdir share/doc/bcfg2 2>/dev/null || exit 1 (cp ${builddir}/doc/manual.pdf share/doc/bcfg2/ || true) cp -r ${builddir}/examples share/doc/bcfg2/ # Make man pages available from /usr/local/man mv lib/bcfg2/share/man . # Make tools dirs and copy over tools mkdir lib/bcfg2/tools || exit 1 cp ${builddir}/tools/* lib/bcfg2/tools/ mkdir sbin 2>/dev/null || exit 1 mkdir share/doc/bcfg2/tools 2>/dev/null || exit 1 # Makes tools with #! line executable for FILE in `ls lib/bcfg2/tools`; do \ F="lib/bcfg2/tools/${FILE}"; \ if [ "`head -1 ${F} | grep ^#\!/`x" != "x" ]; then \ chmod 755 ${F} ; \ fi; \ done # Make executable tools available from /usr/local/sbin, and nonexecutable # tools/tools doc available from /usr/local/share/doc/bcfg2/tools for FILE in `ls lib/bcfg2/tools`; do \ F="lib/bcfg2/tools/${FILE}"; \ if [ -x ${F} ]; then \ ln -sf ../lib/bcfg2/tools/${FILE} sbin/b2-example-tool-${FILE}; \ else \ ln -sf ../../../../lib/bcfg2/tools/${FILE} share/doc/bcfg2/tools/${FILE}; \ fi; \ done # Make "this encap is installed" sentinal file available in /usr/local/var/encap mkdir var 2>/dev/null || exit 1 mkdir var/encap 2>/dev/null || exit 1 touch var/encap/${ENCAP_PKGNAME} ]]> ${BASEDIR}/postinstall.log 2>&1 3>&1 else printf "\npostinstall: already ran\n\t${BASEDIR}/b2-regexplace.sh, not running again...\n" >> ${BASEDIR}/postinstall.log fi ]]> description Bcfg2 - Provides a declarative interface to system configuration prereq pkgspec >= bcfg2-zlib-1.2.3 prereq pkgspec >= bcfg2-libiconv-1.9.2 prereq pkgspec >= bcfg2-gettext-0.14.5 prereq pkgspec >= bcfg2-openssl-0.9.8b prereq pkgspec >= bcfg2-libstdc++-0.1 prereq pkgspec >= bcfg2-libgcc-0.1 prereq pkgspec >= bcfg2-python-2.4.3 prereq pkgspec >= bcfg2-pyopenssl-0.6 prereq pkgspec >= bcfg2-libxml2-2.6.26 prereq pkgspec >= bcfg2-libxslt-1.1.17 prereq pkgspec >= bcfg2-lxml-1.0.1