Repository 32bit  Forum
Repository 64bit  Wiki

Enlightenment DR17 from svn: differenze tra le versioni

Da Slacky.eu.
 
(8 revisioni intermedie di un utente non mostrate)
Riga 1: Riga 1:
[[Category:Script]]
[[Category:Script]]
Semplice script che scarica enlightenment da svn, lo compila e lo pacchettizza e installa ;)
+
Semplice script che scarica enlightenment da svn, lo compila e lo pacchettizza e installa ;)<br>
  +
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
  +
<pre>
<pre>
#!/bin/sh
#!/bin/sh
# e17 Slackware Builder
+
# This simple script download lastest trunk from e17's SVN and packages it ;)
+
# Heavily based on the Slackware 13.1 SlackBuild
# Compatible with Slackware 13.0 and (hopefully) later
+
# Written by jimmy_page_89 ( jimmy_page_89@hotmail.it )
# Copyright jimmy_page_89 ( email jimmy_page_89 AT hotmail DOT it )
+
# Heavily changed by albatros_la aka AsPh4lTo
# Heavily changed by albatros_la aka AsPh4lTo
# Thanks to Conraid for SVN help :D
+
  +
# 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
set -e
echo "##e17 Slackware Builder##"
+
PKGNAME=enlightenment
TMP=${TMP:-/tmp/txz/e17}
+
BUILD=${BUILD:-1sl}
NAME=enlightenment
+
ARCH=${ARCH:-i486}
PKG=$TMP/package-$NAME
+
SOURCE="http://svn.enlightenment.org/svn/e"
DEPPKG=$TMP/dep-package-$NAME
+
CWD=$(pwd)
TAG=1jim
+
TMP=${TMP:-/tmp/buildpkgs/$PKGNAME}
CWD=`pwd`
+
DEPPKG=$TMP/dep-package-$PKGNAME
OUTPUT=$CWD
+
PKG=$TMP/package-$PKGNAME
ARCH="x86_64"
+
OUTPUT=${OUTPUT:-$CWD}
JOBS="-j2"
+
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"
if [ ! -d $PKG ]
+
###elmdentica
then
+
###Set to 1 if you want to release this package
mkdir -p $PKG || exit 1
+
RELEASE=0
fi
 
if [ "$ARCH" = "i486" ]; then
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+
LIBDIRSUFFIX=""
SLKLDFLAGS=""
+
elif [ "$ARCH" = "i586" ]; then
  +
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  +
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
+
LIBDIRSUFFIX=""
SLKLDFLAGS=""
 
elif [ "$ARCH" = "x86_64" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+
LIBDIRSUFFIX="64"
SLKLDFLAGS="-L/usr/lib64"
+
SLKLDFLAGS="-L/usr/lib64"
fi
fi
if [ -f $CWD/error.log ]
+
rm -rf $TMP
then
+
mkdir -p $TMP $PKG $OUTPUT
rm -rf $CWD/error.log
 
fi
 
echo "checking dependencies..."
+
if [ -e $CWD/error.log ]; then
if [ ! -d $OUTPUT ];then
+
rm $CWD/error.log
mkdir -p $OUTPUT
 
fi
 
mkdir -p $TMP
 
cd $OUTPUT
 
for j in lua libast libmpd;
 
do
 
if [ ! -e /var/log/packages/$j-* ];then
 
echo "Please install $j, exiting..."
 
exit 1
 
fi
fi
done
+
cd $TMP
cd $TMP
if [ ! -d e ]
+
if [ ! -d e ]; then
then
 
echo "Start Downloading..."
echo "Start Downloading..."
svn co http://svn.enlightenment.org/svn/e || exit 1
+
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
fi
cp $CWD/xinitrc.enlightenment17 . || exit 1
+
cd $TMP/e
cd $TMP/e
VERSION=r$(LANG=en_US svn info | awk '/Revision:/{print $2}')
VERSION=r$(LANG=en_US svn info | awk '/Revision:/{print $2}')
cd $TMP/e/trunk
cd $TMP/e/trunk
for i in BINDINGS BROKEN devs DOCS E16 packaging PROTO SCRIPTS THEMES web;
+
for i in BINDINGS BROKEN devs DOCS E16 packaging SCRIPTS THEMES web;
do
do
rm -rf $i || exit 1
+
rm -rf $i
done
done
function doinst {
+
function doinst
echo "if [ -x /usr/bin/update-mime-database ]; then
+
{
  +
echo "if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database /usr/share/mime &> /dev/null
/usr/bin/update-mime-database /usr/share/mime &> /dev/null
fi" >> $PKG/install/doinst.sh
fi" >> $PKG/install/doinst.sh
echo "" >> $PKG/install/doinst.sh
+
echo "" >> $PKG/install/doinst.sh
echo "if [ -x /usr/bin/update-desktop-database ]; then
+
echo "if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
/usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
fi" >> $PKG/install/doinst.sh
fi" >> $PKG/install/doinst.sh
echo "" >> $PKG/install/doinst.sh
+
echo "" >> $PKG/install/doinst.sh
echo "if [ -x /usr/bin/gtk-update-icon-cache ]; then
+
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
/usr/bin/gtk-update-icon-cache -f -q /usr/share/icons/hicolor 1> /dev/null 2> /dev/null
fi" >> $PKG/install/doinst.sh
fi" >> $PKG/install/doinst.sh
echo "" >> $PKG/install/doinst.sh
+
echo "" >> $PKG/install/doinst.sh
}
}
function stripbin {
+
function stripbin
( cd $PKG
+
{
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+
( cd $PKG
xargs strip --strip-unneeded 2> /dev/null || true
+
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 : | \
+
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
xargs strip --strip-unneeded 2> /dev/null
+
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
)
+
)
}
}
mkdir -p $OUTPUT || exit 1
+
for i in $BASE $EXTRA $PLUGINS
for i in imlib2 eina eet imlib2_loaders imlib2_tools evas ecore efreet embryo edje e_dbus e exml esmart eterm ethumb exquisite expedite emotion emprint etk etk_extra engrave enhance edata ecore_li edb emphasis epsilon evolve exhibit e_utils epeg ewl elementary elementary-alarm elementary-presenter elementary-sms waker alarm bling calendar configmenu cpu deskshow diskio drawer efm-nav efm-path exalt emu 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 estickies
 
do
do
echo "
+
echo "Building $i..."
--- 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;;
case $i in
 
imlib2|eina|eet|imlib2_loaders|imlib2_tools|evas|ecore|efreet|embryo|edje|e_dbus|e|exml|esmart|ethumb|exquisite|expedite|emotion|emprint|ewl|exalt|estickies) cd $TMP/e/trunk/$i;;
 
eterm) cd $TMP/e/trunk/$i/Eterm;;
eterm) cd $TMP/e/trunk/$i/Eterm;;
etk|etk_extra|engrave|enhance|edata|ecore_li|edb|emphasis|epsilon|evolve|exhibit|e_utils|epeg) cd $TMP/e/trunk/OLD/$i;;
+
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;;
elementary|elementary-alarm|elementary-presenter|elementary-sms|waker) cd $TMP/e/trunk/TMP/st/$i;;
alarm|bling|calendar|configmenu|cpu|deskshow|diskio|drawer|emu|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) cd $TMP/e/trunk/E-MODULES-EXTRA/$i;;
 
efm-nav|efm-path) cd $TMP/e/trunk/E-MODULES-EXTRA/`echo $i|sed s/-/_/`;;
efm-nav|efm-path) cd $TMP/e/trunk/E-MODULES-EXTRA/`echo $i|sed s/-/_/`;;
esac
+
epdf) cd $TMP/e/trunk/PROTO/$i;;
case $i in
+
*) cd $TMP/e/trunk/E-MODULES-EXTRA/$i;;
ecore) ECORE="--enable-ecore-evas-software-buffer --enable-ecore-evas-software-x11 --enable-ecore-evas-xrender-x11 --enable-ecore-evas-opengl-x11 --enable-ecore-evas-software-16-x11 --enable-ecore-evas-xrender-xcb --enable-ecore-evas-software-gdi --enable-ecore-evas-software-ddraw --enable-ecore-evas-direct3d--enable-ecore-evas-opengl-glew --enable-ecore-evas-software-16-ddraw--enable-ecore-evas-quartz --enable-ecore-evas-software-sdl --enable-ecore-evas-directfb --enable-ecore-evas-fb --enable-ecore-evas-software-16-wince --enable-ecore-x --enable-ecore-fb --enable-ecore-evas --enable-ecore-evas-g1 --enable-ecore-job --enable-ecore-con --enable-ecore-ipc --enable-ecore-txt";;
+
esac
imlib2|eina|eet|imlib2_loaders|imlib2_tools|evas|efreet|embryo|edje|e_dbus|e|exml|esmart|eterm|ethumb|exquisite|expedite|emotion|emprint|etk|etk_extra|engrave|enhance|edata|ecore_li|edb|emphasis|epsilon|evolve|exhibit|e_utils|epeg|ewl|elementary|elementary-alarm|elementary-presenter|elementary-sms|waker|alarm|bling|calendar|configmenu|cpu|deskshow|diskio|drawer|efm-nav|efm-path|emu|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) ECORE="";;
+
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";;
exalt) ECORE="--with-wpa-supplicant=/sbin/wpa_supplicant --with-dhcp=/sbin/dhclient";;
esac
+
epdf) ECORE="--enable-poppler";;
chown -R root:root .
+
e) ECORE="--enable-device-udev";;
find . \
+
*) ECORE="";;
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+
esac
-exec chmod 755 {} \; -o \
 
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 
-exec chmod 644 {} \;
 
  +
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
if [ "$i" = "evfs" ];then
+
echo "--- $i building error log ---" >> $CWD/error.log
mv debian/changelog debian/changelog.in
 
fi
 
case $i in
+
###fixing epdf
imlib2|eina|eet|imlib2_loaders|imlib2_tools|evas|ecore|efreet|embryo|edje|e_dbus|e|exml|esmart|eterm|ethumb|exquisite|expedite|emotion|emprint|etk|etk_extra|engrave|enhance|edata|ecore_li|edb|emphasis|epsilon|evolve|exhibit|e_utils|epeg|ewl|elementary|elementary-alarm|elementary-presenter|elementary-sms|waker|exalt|alarm|bling|calendar|configmenu|cpu|deskshow|diskio|drawer|efm-nav|efm-path|emu|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)
+
case $i in epdf)
LDFLAGS="$SLKLDFLAGS" \
+
cd src/lib/mupdf
CFLAGS="$SLKCFLAGS" \
+
make
CXXFLAGS="$SLKCFLAGS" \
+
cd $TMP/e/trunk/PROTO/$i
./autogen.sh \
+
;;
--prefix=/usr \
+
esac
$ECORE \
 
--libdir=/usr/lib${LIBDIRSUFFIX} \
 
--sysconfdir=/etc \
 
--localstatedir=/var \
 
--mandir=/usr/man \
 
--disable-static || exit 1
 
;;
 
ewl|estickies)
 
ECORE_EVAS_LIBS="$SLKLDFLAGS -lecore_evas -lecore_x -lecore_input -lecore_txt -levas -lecore -leina" \
 
ECORE_XCB_LIBS="$SLKLDFLAGS -lxcb -lecore_x -lecore_input -lecore_txt -levas -lecore -leina" \
 
ECORE_X_LIBS="$SLKLDFLAGS -lecore_x -lecore_input -lecore_txt -levas -lecore -leina" \
 
ECORE_LIBS="$SLKLDFLAGS -lecore_txt -lecore_file -lecore_con -lgnutls -lcurl -lecore -leina" \
 
EDJE_LIBS="$SLKLDFLAGS -ledje -lecore_imf_evas -llua -lm -lembryo -lecore_job -leet -lecore_imf -levas -lecore -leina" \
 
EFREET_LIBS="$SLKLDFLAGS -lefreet -lefreet_mime -lecore_file -lecore_con -lgnutls -lcurl -lecore -leina" \
 
EMOTION_LIBS="$SLKLDFLAGS -lemotion -levas -leina" \
 
EVAS_LIBS="$SLKLDFLAGS -levas -leina" \
 
EPSILON_LIBS="$SLKLDFLAGS -lepsilon" \
 
LDFLAGS="$SLKLDFLAGS" \
 
CFLAGS=" $SLKCFLAGS" \
 
CXXFLAGS="$SLKCFLAGS" \
 
./autogen.sh \
 
--prefix=/usr \
 
--libdir=/usr/lib${LIBDIRSUFFIX} \
 
--sysconfdir=/etc \
 
--localstatedir=/var \
 
--mandir=/usr/man \
 
--libexecdir=/usr/lib${LIBDIRSUFFIX} \
 
--disable-static || exit 1
 
;;
 
esac
 
echo "--- $i building error log ---" >> $CWD/error.log
+
make -j2 2>>$CWD/error.log
make $JOBS 2>>$CWD/error.log|| exit 1
 
make install DESTDIR=$PKG || exit 1
+
make install DESTDIR=$PKG
if [ -d $DEPPKG ]
+
if [ -d $DEPPKG ]; then
then
+
rm -rf $DEPPKG
rm -rf $DEPPKG
+
mkdir -p $DEPPKG
mkdir -p $DEPPKG
+
fi
fi
+
make install DESTDIR=$DEPPKG || exit 1
+
make install DESTDIR=$DEPPKG
cd $DEPPKG
+
cd $DEPPKG
makepkg -l y -c n $TMP/$i\_dep_inst.txz
+
makepkg -l y -c n $TMP/$i\_dep_inst.txz $SEE
installpkg $TMP/$i\_dep_inst.txz
+
echo "Installing $i..."
  +
upgradepkg --install-new $TMP/$i\_dep_inst.txz
done
done
for i in imlib2 eina eet imlib2_loaders imlib2_tools evas ecore efreet embryo edje e_dbus e exml esmart eterm ethumb exquisite expedite emotion emprint etk etk_extra engrave enhance edata ecore_li edb emphasis epsilon evolve exhibit e_utils epeg ewl elementary elementary-alarm elementary-presenter elementary-sms waker alarm bling calendar configmenu cpu deskshow diskio drawer efm-nav efm-path exalt emu 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 estickies
+
for i in $BASE $EXTRA $PLUGINS
do
do
removepkg /var/log/packages/$i\_dep_inst
+
removepkg /var/log/packages/$i\_dep_inst
done
done
stripbin
stripbin
mkdir -p $PKG/usr/doc/$NAME || exit 1
+
mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION
cp -a $TMP/e/trunk/e/{AUTHORS,COPYING,INSTALL,NEWS,README} $PKG/usr/doc/$NAME
+
cp -a $TMP/e/trunk/e/{AUTHORS,COPYING,INSTALL,NEWS,README} $PKG/usr/doc/$PKGNAME-$VERSION
mkdir -p $PKG/etc/X11/xinit
mkdir -p $PKG/etc/X11/xinit
Riga 147: Riga 177:
mkdir -p $PKG/install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+
cat $TMP/slack-desc > $PKG/install/slack-desc
cat $CWD/slack-desc > $PKG/usr/doc/$NAME/slack-desc
+
cat $TMP/slack-desc > $PKG/usr/doc/$NAME/slack-desc
cat $CWD/e17.SlackBuild > $PKG/usr/doc/$NAME/e17.SlackBuild
+
cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$NAME/$PKGNAME.SlackBuild
doinst
doinst
Riga 156: Riga 186:
chown -R root:root .
chown -R root:root .
# Dependencies manually added because requiredbuilder
+
###If you're not going to release this package,
# takes a huge amount of time!
+
if [ "$RELEASE" = "1" ] && [ -x "$(which requiredbuilder 2>/dev/null)" ];then
#requiredbuilder -v -y -s $CWD $PKG
+
requiredbuilder -y -v -s $CWD $PKG
echo "lua >= 5.1.4-i486-4as
+
fi
libast >= 0.7-i486-3ms
 
libmpd >= 0.19.0-i486-1as" > $CWD/slack-required
 
makepkg -l y -c n $OUTPUT/$NAME-$VERSION-$ARCH-$TAG.txz || exit 1
+
### finally make the package.
  +
/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD.${PKGTYPE:-txz}
if [[ "$1" = "--cleanup" ]]
+
if [ "$1" = "--cleanup" ]; then
then
+
rm -rf $TMP
rm -rf $TMP || exit 1
 
fi
fi
</pre>
</pre>

Versione attuale delle 22:15, 29 giu 2010

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