#!/bin/sh [ `id -u` != 0 ] && { echo "fail"; exit 1; } export CFLAGS="-march=i486 -mtune=i686 -Os -pipe" export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" export CPPFLAGS="-I/usr/local/include" export LDFLAGS="-L/usr/local/lib" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig mirror="http://voxel.dl.sourceforge.net/sourceforge/sqlalchemy/" basename="SQLAlchemy" sep="-" version="0.5.3" description="SQLAlchemy (TESTING)" author="Michael Bayer" license="MIT" homepage="http://www.sqlalchemy.org" extensionby="Kingdomcome" comments="Python SQL toolkit\n\t\t\tSupports most popular SQL databases\n\t\t\tRequires python.tcel and your favorite database with driver\n\t\t\tie: SQLite3.tcel and pysqlite2.tcel" ppicompat="\n\n\t\t\tThis extension is PPI compatible" date=`date +%Y/%m/%d` tce="tce" tcz="tcz" compiledeps="advcomp.tce cramfs-utils.tce" eval ${tce}deps="python.tcel" eval ${tcz}deps="python.tczl" builddeps="python.tcel python-devs.tcel" #writeables="" #flags="" #editMake='' #postinstall='#!/bin/sh\n\n' ## prepare environment for i in ${compiledeps} ${builddeps}; do su - tc -c "tce-load ${i} wget install"; done mkdir -p ${basename}/tmp/package/ && cd ${basename}/ pwd=`pwd` #download and extract source wget ${mirror}${basename}${sep}${version}.tar.gz && tar xzf ${basename}${sep}${version}.tar.gz cd ${basename}${sep}${version}/ ## build package rm -f /usr/local/lib/python2.5/site-packages/README python setup.py build python setup.py install ##clean up build files rm -r ${pwd}/${basename}${sep}${version} ${pwd}/${basename}${sep}${version}.tar.gz ## create tce cd / find usr/local/lib/python2.5/site-packages/ -not -type d > ${pwd}/${basename}.${tce}.list tar czvf ${pwd}/${basename}.${tce} --numeric-owner -T ${pwd}/${basename}.${tce}.list advdef -z4 ${pwd}/${basename}.${tce} ## create tcz cd ${pwd}/tmp/package && tar xzf ${pwd}/${basename}.${tce} if [ "${writables}" ]; then [ -e ../rwfiles.list ] && rm -f ../rwfiles.list for files in ${writeables}; do find usr -not -type d -name ${files} >> ../rwfiles.list; done tar czvf user.tar.gz --numeric-owner -T ../rwfiles.list && advdef -z4 user.tar.gz for files in `cat ../rwfiles.list`; do rm -f ${files}; done rm -f ../rwfiles.list fi mkfs.cramfs ./ ${pwd}/${basename}.${tcz} cp ${pwd}/${basename}.${tce}.list ${pwd}/${basename}.${tcz}.list ## md5, dep, and info files for ext in ${tce} ${tcz}; do md5sum ${pwd}/${basename}.${ext} > ${pwd}/${basename}.${ext}.md5.txt eval deps=\${${ext}deps} if [ "${deps}" ]; then for files in ${deps}; do echo ${files} >> ${pwd}/${basename}.${ext}.dep; done fi eval ${tce}comments="'${comments}${ppicompat}'" eval ${tcz}comments="'${comments}'" eval thecomments=\${${ext}comments} echo -e "Title:\t\t\t${basename}.${ext}\nDescription:\t\t${description}\nVersion:\t\t${version}\nAuthor:\t\t\t${author}" > ${pwd}/${basename}.${ext}.info echo -en "Original-site:\t\t${homepage}\nCopying-policy:\t\t${license}\nSize:\t\t\t" >> ${pwd}/${basename}.${ext}.info du -sh ${pwd}/${basename}.${ext} | cut -f 1 >> ${pwd}/${basename}.${ext}.info echo -e "Extension_by:\t\t${extensionby}\nComments:\t\t${thecomments}\nChange-log:\t\t----\nCurrent:\t\t${date} First Version" >> ${pwd}/${basename}.${ext}.info done ## clean up package files rm -rf ${pwd}/tmp/ /tmp/mark && echo "Everything is in ${basename}/" exit 0