#!/bin/bash ## src2pkg script for: libxml2 ## Auto-generated by src2pkg-2.1 ## src2pkg - Copyright 2005-2009 Gilbert Ashley SOURCE_NAME='libxml2-2.7.8.tar.xz' NAME='libxml2' # Use ALT_NAME to override guessed value VERSION='2.7.8' # Use ALT_VERSION to override guessed value # ARCH='' BUILD='2' # PRE_FIX='usr' # Any extra options go here: # EXTRA_CONFIGS="" PATCHLIST='libxml2-2.7.8.broken.versioning.diff.gz' # BuildRequires=python # recommended: --splitpkg=docs,devel # Optional function replaces configure_source, compile_source, fake_install # To use, uncomment and write/paste CODE between the {} brackets. # build() { CODE } # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the named packaging steps: pre_process find_source make_dirs unpack_source fix_source_perms configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # mkdir -p $DOC_DIR/examples mv $PKG_DIR$docdir/$NAME-python-$VERSION/examples/* $DOC_DIR/examples rm -rf $PKG_DIR/$docdir/$NAME-python-$VERSION # get rid of gtk-doc (2.4MB) # ( cd $PKG_DIR/usr/share && rm -rf gtk-doc ) fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst # split the package mkdir -p $PKG_BUILDS_DIR/py-libxml2_${VERSION}-${ARCH}-${BUILD}${SIG}/usr/lib${LIBDIRSUFFIX} mv $PKG_DIR/usr/lib${LIBDIRSUFFIX}/python2.6 \ $PKG_BUILDS_DIR/py-libxml2_${VERSION}-${ARCH}-${BUILD}${SIG}/usr/lib${LIBDIRSUFFIX}/ ( cd $PKG_BUILDS_DIR/py-libxml2_${VERSION}-${ARCH}-${BUILD}${SIG} && \ { mkdir -p install echo "#!/bin/sh" > install/$PKG_POSTINST echo "rm -f usr/lib${LIBDIRSUFFIX}/python2.6/site-packages/libxml2.pyc" >> install/$PKG_POSTINST echo "rm -f usr/lib${LIBDIRSUFFIX}/python2.6/site-packages/drv_libxml2.pyc" >>install/$PKG_POSTINST echo "#!/bin/sh" >> install/$PKG_POSTRM echo "rm -f usr/lib${LIBDIRSUFFIX}/python2.6/site-packages/libxml2.pyc" >> install/$PKG_POSTRM echo "rm -f usr/lib${LIBDIRSUFFIX}/python2.6/site-packages/drv_libxml2.pyc" >> install/$PKG_POSTRM cat $CWD/py-libxml2.pkg-desc > install/$PKG_DESC case $PACKAGER in ''|src2pkg) : ;; *) sed -i "s%src2pkg%$PACKAGER%" install/$PKG_DESC esac mkdir -p $docdir/py-libxml2_${VERSION} cat $SRC_DIR/COPYING > $docdir/py-libxml2_${VERSION}/COPYING echo "# py-libxml2_$VERSION" > install/$PKG_REQUIRED echo "# Requires:" >> install/$PKG_REQUIRED echo "libxml2_${VERSION}-${ARCH}-${BUILD}${SIG}" >> install/$PKG_REQUIRED echo "python" >> install/$PKG_REQUIRED tpkg-make $PKG_BUILDS_DIR/py-libxml2_${VERSION}-${ARCH}-${BUILD}${SIG}.tpkg echo $CYAN" Notice - "$NORMAL"pylibxml2 package may need to be moved." } ) make_package post_process ## See the documentation for more help and examples. Below are some of # the most common Extras and Options for easy cut-and-paste use. # DOCLIST='' PATCHLIST='' INSTALL_TYPE='' # CONFIG_COMMAND='' MAKE_COMMAND='' INSTALL_LINE='' # When editing src2pkg scripts to add custom code, use these variables # to refer to the current directory, the sources or the package tree: # $CWD (current directory), $SRC_DIR (sources), $PKG_DIR (package tree) # Other commonly-used directories include: $DOC_DIR (document directory) # $MAN_DIR (man-page directory) $DATA_DIR (shared-data directory)