#!/bin/sh # ###################################################### # Build script for RPI # # # # See .info for details # # # # October 16, 2012 # ###################################################### ###################################################### # Configure extension creation parameters # ###################################################### SRCNAM=iso-codes-3.43.tar.xz WRKDIR=iso-codes-3.43 EXTNAM=iso-codes TMPDIR=/tmp/iso-codes ###################################################### # Prepare extension creation # ###################################################### # Remove dirs and files left from previous creation rm -r -f $WRKDIR rm -r -f $TMPDIR rm -r -f $TMPDIR-locale # Crete temporary directory mkdir -p $TMPDIR ###################################################### # Compile extension # ###################################################### # Export variables needed for compilation export CFLAGS="-Os -pipe" export CXXFLAGS="-Os -pipe -fno-exceptions -fno-rtti" export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig # Unpack source in current directory tar -xf $SRCNAM # Configure it cd $WRKDIR ./configure --prefix=/usr/local # Compile make # Install in base temp dir make install DESTDIR=$TMPDIR # Delete compilation work directory cd .. rm -r -f $WRKDIR # Move locale files mkdir -p $TMPDIR-locale/usr/local/share mv $TMPDIR/usr/local/share/locale $TMPDIR-locale/usr/local/share # Adjust directory access rigths find $TMPDIR/ -type d | xargs chmod -v 755; # Remove pkgconfig #rm -r -f $TMPDIR/usr/local/share/pkgconfig ###########################r######################## # Create base extension in temp dir # ################################################### cd $TMPDIR cd .. mksquashfs $TMPDIR $EXTNAM.tcz cd $TMPDIR find usr -not -type d > $EXTNAM.tcz.list mv ../$EXTNAM.tcz . # Create md5 file md5sum $EXTNAM.tcz > $EXTNAM.tcz.md5.txt # Cleanup temp directory rm -r -f usr ################################################### # Create locale extension in temp dir # ################################################### cd $TMPDIR-locale cd .. mksquashfs $TMPDIR-locale $EXTNAM-locale.tcz cd $TMPDIR-locale find usr -not -type d > $EXTNAM-locale.tcz.list mv ../$EXTNAM-locale.tcz . # Create md5 file md5sum $EXTNAM-locale.tcz > $EXTNAM-locale.tcz.md5.txt # Cleanup temp directory rm -r -f usr