#!/bin/sh
#
######################################################
# Build script for TinyCore 2.x                     					  #
#                                                    						  	  #
# See .info for details                              					  #
#                                                    							  #
# December 28, 2009                                   					  #
######################################################
# Build dependency list
# compiletc
# python
# python_setuptools
######################################################
# Configure extension creation parameters           				  #
######################################################

SRCNAM=pyxdg-0.18.tar.gz
WRKDIR=pyxdg-0.18
TMPDIR=/tmp/package


######################################################
# Prepare extension creation                         					  #
######################################################

# Remove dirs and files left from previous creation

rm -r -f $WRKDIR

rm -r -f $TMPDIR

# Create temporary directory

mkdir -p $TMPDIR

# Unpack source in current directory

tar -xf $SRCNAM

cd $WRKDIR

# Install in base temp dir
touch /tmp/mark

sudo python setup.py install

find /usr/local -newer /tmp/mark -not -typ d > /tmp/list

tar -T /tmp/list -czvf /tmp/pyxdg.tar.gz

cd ..
rm -r -f $WRKDIR

cd $TMPDIR

tar -xf /tmp/pyxdg.tar.gz

# Adjust directory access rigths

find $TMPDIR/ -type d | xargs chmod -v 755
