169 lines
6.3 KiB
Plaintext
169 lines
6.3 KiB
Plaintext
|
#!/bin/bash
|
|||
|
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
|
|||
|
#dieses Framework wird im CVS Repository
|
|||
|
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verf<72>gung gestellt
|
|||
|
#
|
|||
|
#Lage dieser Datei im Archiv: $HeadURL$
|
|||
|
#
|
|||
|
#(c) 2003 Harald Kueller, Germany
|
|||
|
#This program is free software; you can redistribute it and/or
|
|||
|
#modify ist under the terms of the GNU General Public License
|
|||
|
#as published by the Free Software Foundation; either version
|
|||
|
#2 of the License, or (at your option) any later version.
|
|||
|
#
|
|||
|
#This program is distributed in the hope that it will be useful,
|
|||
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|||
|
#See the GNU General Public License for more details.
|
|||
|
#
|
|||
|
#You should have received a copy of the GNU General Public License
|
|||
|
#along with this program; if not write to the Free Software Foundation,
|
|||
|
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
#
|
|||
|
#Dies ist ein Module zur Verwendung mit genpkg. Die Erzeugung eines
|
|||
|
#Viitor Linux Packetes wird <20>ber die Funktionen premk, mk und postmk
|
|||
|
#gesteuert. premk() dient zur Vorbereitung des Sourcecodes. Hier k<>nnen
|
|||
|
#diverse <20>nderungen am sourcecode (mit awk/sed usw.) vorgenommen werden
|
|||
|
#mk() umfasst die source Konfiguration und das <20>bersetzten des source
|
|||
|
#codes. Auch die Installation mu<6D> von mk erledigt werden. Hier gild dass
|
|||
|
#die Installation immer nach $TMPROOT erfolgen soll (meisst kann das mit
|
|||
|
#"make DESTDIR=$TMPROOT install" angestossen werden). postmk kann
|
|||
|
#vor der packeterstellung noch einiges am installationtree <20>ndern. postmk
|
|||
|
#l<>uft nachdem die Packetabh<62>ngigkeiten erstellt wurden.
|
|||
|
#Das Verhalten von genpkg kann <20>ber die Variable MKPKG gesteuert werden.
|
|||
|
#Hier m<>ssen FLAGS zur Steuerung gesetzt werden. Folgende Flags werden
|
|||
|
#erkannt:
|
|||
|
#
|
|||
|
# 1 : Package Erzeugung erzwingen. Packet wird, auch wenn es schon
|
|||
|
# vorhanden ist, ohne weitere r<>ckfragen neu Erzeugt.
|
|||
|
# 2 : Package Installation erzwingen. Installpkg wird mit -f aufgerufen.
|
|||
|
# Das bewirkt, das installpkg keine r<>ckfragen bei der installation
|
|||
|
# Stellt, und das packet in jedemfall (neu) installiert.
|
|||
|
# 4 : Sourcepacket nicht nach MAKEDIR entpacken. Ist dieses Flag gesetzt
|
|||
|
# muss sich das Module selber um das Entpacken der sourcedateien k<>mmern.
|
|||
|
# vor allem wichtig bei Packeten, f<>r die es keine source.tgz gibt
|
|||
|
# (z.B. aus dem CVS generierte Packete).
|
|||
|
# 8 : Erstellung des Packetes aus $TMPROOT wird unterdr<64>ckt. Dies ist bei
|
|||
|
# manchen Sonderf<72>llen m<>glich - wenn sich z.B. der Packetnamen nicht
|
|||
|
# aus dem Namen des sourcearchives ableiten l<>sst. Packet sollte in
|
|||
|
# so einem Fall in der postmk() Funktion erstellt werden.
|
|||
|
# 16 : Packet wird nicht installiert. Bei Packeten wie tar oder bash kann
|
|||
|
# die installation mittelst installpkg probleme machen.
|
|||
|
# 32 : Dependics File so erzeugen, das die Abh<62>ngigkeiten bei der installation
|
|||
|
# erf<72>llt sein m<>ssen. installpkg bricht in so einem fall bei fehlenden
|
|||
|
# packeten die installation ab, und gibt nicht "nur" warnmeldungen aus.
|
|||
|
# Wichtig bei packeten mit postinstallroutine, die software aus dem
|
|||
|
# frisch installierten Packet verwendet (wie z.B. postgresql)
|
|||
|
# 64 : sourcetree aufr<66>umen nach packeterstellung unterbinden.
|
|||
|
# 128 : Patches zu den Sourcen nicht einspielen - Module muss sich darum
|
|||
|
# k<>mmern
|
|||
|
|
|||
|
#Module zur Erstellung des Packetes:
|
|||
|
#Quelle der Source Archive:
|
|||
|
#Kurzbeschreibung:
|
|||
|
#
|
|||
|
#
|
|||
|
#Letzte <20>nderung von: $Author$
|
|||
|
#Datum der letzten <20>nderung: $Date$
|
|||
|
#Version der Datei: $Revision$
|
|||
|
#
|
|||
|
#
|
|||
|
|
|||
|
SRCPATH=X11/Net
|
|||
|
SRCDIR=mozilla
|
|||
|
|
|||
|
premk() {
|
|||
|
mkdir ../build-thunderbird
|
|||
|
cd ../build-thunderbird
|
|||
|
}
|
|||
|
|
|||
|
mk32() {
|
|||
|
CC="gcc $BUILDOPTIONS32" \
|
|||
|
CXX="g++ $BUILDOPTIONS32" \
|
|||
|
LDFLAGS="-L/lib -L/usr/lib -L/usr/X11R7/lib -L/opt/gnome/lib" \
|
|||
|
../mozilla*/configure --target=$TARGET32 \
|
|||
|
--build=$TARGET32 \
|
|||
|
--host=$TARGET32 \
|
|||
|
--prefix=/opt/firefox \
|
|||
|
--libexecdir=/opt/firefox/bin \
|
|||
|
--sysconfdir=/etc/sysconfig/firefox \
|
|||
|
--x-includes=/usr/X11R7/include \
|
|||
|
--x-libraries=/usr/X11R7/$LIBDIR \
|
|||
|
--with-x \
|
|||
|
--with-pthreads \
|
|||
|
--with-system-jpeg \
|
|||
|
--with-system-zlib \
|
|||
|
--with-system-png \
|
|||
|
--with-java-include-path=/usr/$LIBDIR/j2sdk/include \
|
|||
|
--with-java-bin-path=/usr/$LIBDIR/j2sdk/bin \
|
|||
|
--with-qt-dir=/usr/$LIBDIR/qt \
|
|||
|
--enable-application=mail \
|
|||
|
--enable-xinerama \
|
|||
|
--enable-image-decoders=all \
|
|||
|
--disable-installer \
|
|||
|
--disable-updater
|
|||
|
sed -e "s/= ld$/= ld -melf_i386/" config/autoconf.mk |
|
|||
|
sed -e "s/x86_64/i686/" >/tmp/autoconf.mk
|
|||
|
mv /tmp/autoconf.mk config/autoconf.mk
|
|||
|
make -j $NUMCPU
|
|||
|
make -j $NUMCPU DESTDIR=$TMPROOT install
|
|||
|
cd ../mozilla*
|
|||
|
rm -r ../build-thunderbird
|
|||
|
mkdir ../build-thunderbird
|
|||
|
cd ../build-thunderbird
|
|||
|
}
|
|||
|
|
|||
|
mk() {
|
|||
|
if [ "$MK64BIT" == "true" ]; then
|
|||
|
ADDOPTIONS="--libdir=\${prefix}/lib64"
|
|||
|
fi
|
|||
|
CC="gcc $BUILDOPTIONS" \
|
|||
|
CXX="g++ $BUILDOPTIONS" \
|
|||
|
LDFLAGS="-L$LIBDIR -L/usr/$LIBDIR -L/usr/X11R7/$LIBDIR -L/opt/gnome/$LIBDIR" \
|
|||
|
ac_cv_visibility_pragma=no \
|
|||
|
../mozilla*/configure --target=$TARGET \
|
|||
|
--prefix=/opt/firefox \
|
|||
|
$ADDOPTIONS \
|
|||
|
--libexecdir=/opt/firefox/bin \
|
|||
|
--sysconfdir=/etc/sysconfig/firefox \
|
|||
|
--x-includes=/usr/X11R7/include \
|
|||
|
--x-libraries=/usr/X11R7/$LIBDIR \
|
|||
|
--with-x \
|
|||
|
--with-pthreads \
|
|||
|
--with-system-jpeg \
|
|||
|
--with-system-zlib \
|
|||
|
--with-system-png \
|
|||
|
--with-java-include-path=/usr/$LIBDIR/j2sdk/include \
|
|||
|
--with-java-bin-path=/usr/$LIBDIR/j2sdk/bin \
|
|||
|
--with-qt-dir=/usr/$LIBDIR/qt \
|
|||
|
--enable-application=mail \
|
|||
|
--enable-xinerama \
|
|||
|
--enable-image-decoders=all \
|
|||
|
--disable-installer \
|
|||
|
--disable-updater
|
|||
|
make -j $NUMCPU
|
|||
|
make -j $NUMCPU DESTDIR=$TMPROOT install
|
|||
|
}
|
|||
|
|
|||
|
postmk() {
|
|||
|
GetSVN Viitor_thunderbird $TMPROOT
|
|||
|
cd ../mozilla*
|
|||
|
rm -r ../build-thunderbird
|
|||
|
echo "pref(\"network.protocol-handler.app.http\", \"firefox\");" >>$TMPROOT/opt/firefox/lib/thunderbird*/defaults/pref/all-thunderbird.js
|
|||
|
echo "pref(\"network.protocol-handler.app.https\", \"firefox\");" >>$TMPROOT/opt/firefox/lib/thunderbird*/defaults/pref/all-thunderbird.js
|
|||
|
if [ "$MK64BIT" == "true" ]; then
|
|||
|
cd $TMPROOT/opt/firefox/lib64
|
|||
|
ln -s thunderbird* thunderbird
|
|||
|
cd -
|
|||
|
cd $TMPROOT/opt/firefox/include
|
|||
|
ln -s thunderbird* thunderbird
|
|||
|
cd -
|
|||
|
fi
|
|||
|
cd $TMPROOT/opt/firefox/lib
|
|||
|
ln -s thunderbird* thunderbird
|
|||
|
cd -
|
|||
|
cd $TMPROOT/opt/firefox/include
|
|||
|
ln -s thunderbird* thunderbird
|
|||
|
cd -
|
|||
|
}
|