Repository 32bit  Forum
Repository 64bit  Wiki

Enlightenment DR17 from svn

Da Slacky.eu.

Semplice script che scarica enlightenment da svn, lo compila e lo pacchettizza e installa ;)
Salvatelo in un file chiamato enlightenment.SlackBuild Per chiarimenti, migliorie, malfunzionamenti, riferitevi al thread apposito su Slacky.eu http://www.slacky.eu/forum/viewtopic.php?f=4&t=32328&p=282288#p282288

#!/bin/sh

# Heavily based on the Slackware 13.1 SlackBuild
# Written by jimmy_page_89 ( jimmy_page_89@hotmail.it ) 

# Heavily changed by albatros_la aka AsPh4lTo

# Last build from jimmy_page_89 ( jimmy_page_89@hotmail.it )

# Thanks to Conraid for SVN help

# Slackware build script for enlightenment
# Official Site: http://www.enlightenment.org/

# This script download lastest trunk from e17's SVN and packages it ;)

# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

removepkg `ls /var/log/packages/ | grep dep_inst` > /dev/null

set -e

PKGNAME=enlightenment
BUILD=${BUILD:-1sl}
ARCH=${ARCH:-i486}
SOURCE="http://svn.enlightenment.org/svn/e"
CWD=$(pwd)
TMP=${TMP:-/tmp/buildpkgs/$PKGNAME}
DEPPKG=$TMP/dep-package-$PKGNAME
PKG=$TMP/package-$PKGNAME
OUTPUT=${OUTPUT:-$CWD}
BASE="eina eet imlib2_loaders evas ecore efreet embryo edje e_dbus eeze e"
EXTRA="esmart eterm emotion epdf ethumb exquisite expedite emprint edata ecore_li edb engrave epeg elementary empower exalt ephoto elicit enlil enki editje edje_viewer"
PLUGINS="elementary-alarm elementary-presenter elementary-sms alarm calendar cpu deskshow diskio drawer efm-nav efm-path exalt exalt-client execwatch flame forecasts iiirk language mail mem moon mpdule net news notification penguins photo places rain screenshot skel slideshow snow taskbar tclock tiling uptime weather winselector wlan empris everything-mpris everything-pidgin everything-places everything-skel everything-tracker everything-wallpaper everything-websearch exebuf quickaccess winlist-ng"

###elmdentica
###Set to 1 if you want to release this package
RELEASE=0

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
  SLKLDFLAGS="-L/usr/lib64"
fi

rm -rf $TMP
mkdir -p $TMP $PKG $OUTPUT

if [ -e $CWD/error.log ]; then
  rm $CWD/error.log
fi

cd $TMP
if [ ! -d e ]; then
 echo "Start Downloading..."
 svn co $SOURCE
 wget http://slackbuilds.org/slackbuilds/13.1/desktop/enlightenment/xinitrc.enlightenment17
 wget http://slackbuilds.org/slackbuilds/13.1/desktop/enlightenment/slack-desc
fi

cd $TMP/e
VERSION=r$(LANG=en_US svn info | awk '/Revision:/{print $2}')

cd $TMP/e/trunk
for i in BINDINGS BROKEN devs DOCS E16 packaging SCRIPTS THEMES web;
do
   rm -rf $i
done

function doinst
{
  echo "if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database /usr/share/mime &> /dev/null
fi" >> $PKG/install/doinst.sh
  echo "" >> $PKG/install/doinst.sh
  echo "if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
fi" >> $PKG/install/doinst.sh
  echo "" >> $PKG/install/doinst.sh
  echo "if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache  -f -q /usr/share/icons/hicolor 1> /dev/null 2> /dev/null
fi" >> $PKG/install/doinst.sh
  echo "" >> $PKG/install/doinst.sh
}

function stripbin
{
  ( cd $PKG
    find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
    find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
    find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
  )
}

for i in $BASE $EXTRA $PLUGINS
do
  echo "Building $i..."
  case $i in
	   eina|eet|eeze|imlib2_loaders|evas|ecore|efreet|embryo|edje|e_dbus|e|ethumb|exquisite|expedite|editje|emotion|emprint|edje_viewer|empower|elmdentica|exalt|ephoto|elicit|enki|enlil) cd $TMP/e/trunk/$i;;
	   eterm) cd $TMP/e/trunk/$i/Eterm;;
	   esmart|engrave|edata|ecore_li|edb|e_utils|epeg) cd $TMP/e/OLD/$i;;
           elementary|elementary-alarm|elementary-presenter|elementary-sms|waker) cd $TMP/e/trunk/TMP/st/$i;;
	   efm-nav|efm-path) cd $TMP/e/trunk/E-MODULES-EXTRA/`echo $i|sed s/-/_/`;;
	   epdf) cd $TMP/e/trunk/PROTO/$i;;
	   *) cd $TMP/e/trunk/E-MODULES-EXTRA/$i;;
  esac
  case $i in
	   eina) ECORE="--enable-amalgamation --enable-default-mempool --enable-mempool-chained-pool --enable-mempool-buddy --disable-magic-debug";;
	   eet) ECORE="--enable-amalgamation --enable-assert";;
	   evas) ECORE="--enable-xrender-x11 --enable-sdl-primitive --enable-software-16-ddraw --enable-fb --enable-cpu-mmx --enable-cpu-sse --enable-small-dither-mask --enable-line-dither-mask --enable-gl-x11 --enable-gl-grew --enable-buffer";;
	   ecore) ECORE="--enable-ecore-config --enable-ecore-ipc --enable-ecore-file --enable-ecore-imf --enable-ecore-imf-evas --enable-ecore-input --enable-ecore-input-evas --enable-ecore-sdl --enable-ecore-evas --enable-ecore-evas-opengl-x11 --enable-ecore-x -enable-ecore-con";;
	   edje) ECORE="--enable-amalgamation --enable-edje-program-cache --enable-edje-calc-cache --enable-fixed-point";;
	   eterm) ECORE="--enable-profile --enable-trans --enable-mms --enable-sse2 --enable-utmp --enable-auto-encoding --enable-multi-charset --enable-xim --enable-greek --enable-name-reporting-escapes --with-theme-update --with-x";;
	   exalt) ECORE="--with-wpa-supplicant=/sbin/wpa_supplicant --with-dhcp=/sbin/dhclient";;
	   epdf) ECORE="--enable-poppler";;

	   e) ECORE="--enable-device-udev";;
	   *) ECORE="";;
  esac

  chown -R root:root .
  chmod -R u+w,go+r-w,a-s .
  case $i in
           elicit)
    ./bootstrap
    LDFLAGS="$SLKLDFLAGS" \
    CFLAGS="$SLKCFLAGS" \
    CXXFLAGS="$SLKCFLAGS" \
    ./configure \
      --prefix=/usr \
      --libdir=/usr/lib${LIBDIRSUFFIX} \
      --sysconfdir=/etc \
      --localstatedir=/var \
      --mandir=/usr/man \
      --disable-static \
      $ECORE
      ;;
	   *)
  LDFLAGS="$SLKLDFLAGS" \
  CFLAGS="$SLKCFLAGS" \
  CXXFLAGS="$SLKCFLAGS" \
  ./autogen.sh \
    --prefix=/usr \
    --libdir=/usr/lib${LIBDIRSUFFIX} \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --mandir=/usr/man \
    --disable-static \
    $ECORE
    ;;
  esac

  echo "--- $i building error log ---" >> $CWD/error.log

###fixing epdf
  case $i in epdf)
    cd src/lib/mupdf
    make
    cd $TMP/e/trunk/PROTO/$i
    ;;
  esac

  make -j2 2>>$CWD/error.log

  make install DESTDIR=$PKG

  if [ -d $DEPPKG ]; then
    rm -rf $DEPPKG
    mkdir -p $DEPPKG
  fi
  
  make install DESTDIR=$DEPPKG
  cd $DEPPKG
  makepkg -l y -c n $TMP/$i\_dep_inst.txz $SEE
  echo "Installing $i..."
  upgradepkg --install-new $TMP/$i\_dep_inst.txz

done

for i in $BASE $EXTRA $PLUGINS
do
  removepkg /var/log/packages/$i\_dep_inst
done

stripbin

mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION
cp -a $TMP/e/trunk/e/{AUTHORS,COPYING,INSTALL,NEWS,README} $PKG/usr/doc/$PKGNAME-$VERSION

mkdir -p $PKG/etc/X11/xinit
cp $TMP/xinitrc.enlightenment17 $PKG/etc/X11/xinit/

mkdir -p $PKG/install
cat $TMP/slack-desc > $PKG/install/slack-desc
cat $TMP/slack-desc > $PKG/usr/doc/$NAME/slack-desc
cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$NAME/$PKGNAME.SlackBuild

doinst

cd $PKG
chown -R root:root .

###If you're not going to release this package, 
if [ "$RELEASE" = "1" ] && [ -x "$(which requiredbuilder 2>/dev/null)" ];then
    requiredbuilder -y -v -s $CWD $PKG
fi

### finally make the package. 
/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD.${PKGTYPE:-txz}

if [ "$1" = "--cleanup" ]; then
  rm -rf $TMP
fi
Strumenti personali
Namespace

Varianti