2008-05-03 17:01:13 +00:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
|
|
|
|
|
#dieses Framework wird im CVS Repository
|
|
|
|
|
#:pserver:cvs.tramp-bbs.de:/opt/cvs zur Verf<72>gung gestellt
|
|
|
|
|
#
|
2011-02-08 20:09:56 +00:00
|
|
|
|
#Lage dieser Datei im Archiv: $HeadURL: svn://svn.compuextreme.de/Viitor/V962/ViitorMake/SysBuild/development/Python $
|
2008-05-03 17:01:13 +00:00
|
|
|
|
#
|
|
|
|
|
#(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.
|
|
|
|
|
#
|
|
|
|
|
#Module zur Erstellung des Packetes: Python
|
|
|
|
|
#Quelle der Source Archive: http://www.python.org/
|
|
|
|
|
#Kurzbeschreibung:
|
|
|
|
|
#Interpreter spracht mit netzwerk Schwerpunkt.
|
|
|
|
|
#
|
|
|
|
|
#Letzte <20>nderung von: $Author$
|
2011-02-08 20:09:56 +00:00
|
|
|
|
#Datum der letzten <20>nderung: $Date: 2010-01-22 13:48:41 +0100 (Fr, 22 Jan 2010) $
|
|
|
|
|
#Version der Datei: $Rev$
|
2008-05-03 17:01:13 +00:00
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
#Pfad zum Basis-Sourcetree :
|
2009-05-21 09:28:44 +00:00
|
|
|
|
SRCPATH=Development/Interpreter
|
2008-05-03 17:01:13 +00:00
|
|
|
|
|
2009-04-28 19:51:05 +00:00
|
|
|
|
(( MKPKG = $MKPKG | 128 ))
|
|
|
|
|
|
2008-05-03 17:01:13 +00:00
|
|
|
|
premk() {
|
2009-06-07 11:27:55 +00:00
|
|
|
|
sed -i "s@/usr/X11R6@/usr/X11R7@g" setup.py
|
2009-04-28 19:51:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mk32() {
|
|
|
|
|
CC="gcc ${BUILDOPTIONS32}" \
|
|
|
|
|
CXX="g++ ${BUILDOPTIONS32}" \
|
|
|
|
|
./configure --prefix=/usr \
|
|
|
|
|
--with-signal-module \
|
|
|
|
|
--with-threads \
|
|
|
|
|
--with-cycle-gc \
|
|
|
|
|
--with-fpectl \
|
|
|
|
|
--enable-shared &&
|
|
|
|
|
make -j $NUMPU
|
|
|
|
|
make -j $NUMCPU DESTDIR=$TMPROOT install
|
|
|
|
|
mv -v $TMPROOT/usr/bin/python{,-32} &&
|
|
|
|
|
mv -v $TMPROOT/usr/bin/python2.6{,-32} &&
|
2010-01-22 12:48:41 +00:00
|
|
|
|
mv -v $TMPROOT/usr/bin/python2.6-config{,-32}
|
|
|
|
|
rm $TMPROOT/usr/bin/python-config
|
|
|
|
|
ln -s python2.6-config-32 $TMPROOT/usr/bin/python-config-32
|
2009-04-28 19:51:05 +00:00
|
|
|
|
mv -v $TMPROOT/usr/include/python2.6/pyconfig{,-32}.h
|
|
|
|
|
make distclean
|
2008-05-03 17:01:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mk() {
|
|
|
|
|
if [ "$MK64BIT" == "true" ]; then
|
|
|
|
|
ADDOPTIONS="--libdir=/usr/lib64"
|
2009-04-28 20:09:30 +00:00
|
|
|
|
SrcPatch $MAKEDIR/Python* $LFSSOURCE/$SRCPATH/Python-*-multilib-*.patch.*
|
|
|
|
|
sed -i -e "s:@@MULTILIB_DIR@@:lib64:g" \
|
|
|
|
|
Lib/distutils/command/install.py \
|
|
|
|
|
Lib/distutils/sysconfig.py \
|
|
|
|
|
Lib/site.py \
|
|
|
|
|
Makefile.pre.in \
|
|
|
|
|
Modules/Setup.dist \
|
|
|
|
|
Modules/getpath.c \
|
|
|
|
|
setup.py
|
2008-05-03 17:01:13 +00:00
|
|
|
|
fi
|
2009-04-28 19:51:05 +00:00
|
|
|
|
CC="gcc $BUILDOPTIONS" \
|
|
|
|
|
CXX="g++ $BUILDOPTIONS" \
|
|
|
|
|
./configure --prefix=/usr \
|
2008-05-03 17:01:13 +00:00
|
|
|
|
$ADDOPTIONS \
|
|
|
|
|
--with-signal-module \
|
|
|
|
|
--with-threads \
|
|
|
|
|
--with-cycle-gc \
|
|
|
|
|
--with-fpectl \
|
2009-04-28 19:51:05 +00:00
|
|
|
|
--enable-shared
|
|
|
|
|
make -j $NUMCPU
|
|
|
|
|
make -j $NUMCPU DESTDIR=$TMPROOT install
|
2009-06-17 13:29:17 +00:00
|
|
|
|
if [ "$MK64BIT" == "true" ]; then
|
2009-12-22 16:54:47 +00:00
|
|
|
|
mv -v $TMPROOT/usr/bin/python{,-64}
|
|
|
|
|
mv -v $TMPROOT/usr/bin/python2.6{,-64}
|
2009-06-07 11:27:55 +00:00
|
|
|
|
mv -v $TMPROOT/usr/include/python2.6/pyconfig{,-64}.h
|
2010-01-22 12:48:41 +00:00
|
|
|
|
mv -v $TMPROOT/usr/bin/python2.6-config{,-64}
|
|
|
|
|
rm $TMPROOT/usr/bin/python-config
|
|
|
|
|
ln -s python2.6-config-64 $TMPROOT/usr/bin/python-config-64
|
2009-06-07 11:27:55 +00:00
|
|
|
|
ln -s multiarch_wrapper $TMPROOT/usr/bin/python
|
|
|
|
|
ln -s multiarch_wrapper $TMPROOT/usr/bin/python2.6
|
2010-01-22 12:48:41 +00:00
|
|
|
|
ln -s multiarch_wrapper $TMPROOT/usr/bin/python-config
|
2009-06-07 11:27:55 +00:00
|
|
|
|
fi
|
2008-05-03 17:01:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
postmk() {
|
2009-06-07 11:27:55 +00:00
|
|
|
|
if [ "$MK64BIT" == "true" ]; then
|
2009-04-28 19:51:05 +00:00
|
|
|
|
cat > $TMPROOT/usr/include/python2.6/pyconfig.h << "EOF"
|
|
|
|
|
/* pyconfig.h - Stub Header */
|
|
|
|
|
#ifndef __STUB__PYCONFIG_H__
|
|
|
|
|
#define __STUB__PYCONFIG_H__
|
|
|
|
|
|
|
|
|
|
#if defined(__x86_64__) || \
|
|
|
|
|
defined(__sparc64__) || \
|
|
|
|
|
defined(__arch64__) || \
|
|
|
|
|
defined(__powerpc64__) || \
|
|
|
|
|
defined (__s390x__)
|
|
|
|
|
# include "pyconfig-64.h"
|
|
|
|
|
#else
|
|
|
|
|
# include "pyconfig-32.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif /* __STUB__PYCONFIG_H__ */
|
|
|
|
|
EOF
|
2009-06-07 11:27:55 +00:00
|
|
|
|
fi
|
2008-05-03 17:01:13 +00:00
|
|
|
|
}
|