summaryrefslogtreecommitdiff
path: root/mkipks
authorkergoth <kergoth>2003-01-26 19:46:41 (UTC)
committer kergoth <kergoth>2003-01-26 19:46:41 (UTC)
commitf389dd4e3d5ceacb15b5c0b751a618d7586d6c31 (patch) (side-by-side diff)
tree4409bbfaee1f3467ccebef0d1ebbd20ba949bad0 /mkipks
parentfcc5341e8eaef9586cb7fd2b40a22198de0d196d (diff)
downloadopie-f389dd4e3d5ceacb15b5c0b751a618d7586d6c31.zip
opie-f389dd4e3d5ceacb15b5c0b751a618d7586d6c31.tar.gz
opie-f389dd4e3d5ceacb15b5c0b751a618d7586d6c31.tar.bz2
Rather hackish, but necessary, bits. mkipks now parses the qglobal header from $QTDIR to obtain both the base qt version and the full version string, thereby letting me use ipkg depends to Depends: libqt2-emb (>= 2.3.4-beta4).
Diffstat (limited to 'mkipks') (more/less context) (show whitespace changes)
-rwxr-xr-xmkipks20
1 files changed, 18 insertions, 2 deletions
diff --git a/mkipks b/mkipks
index d4e4b38..3fbf160 100755
--- a/mkipks
+++ b/mkipks
@@ -1,52 +1,68 @@
#!/bin/sh
-[ -z "$QTE_VERSION" ] && QTE_VERSION=2.3.4
-[ -z "$QTE_BASEVERSION" ] && QTE_BASEVERSION=2.3.4
+if [ -z "$QTE_BASEVERSION" ]
+then
+ if [ -e $QTDIR/include/qglobal.h ]
+ then
+ QTE_BASEVERSION=`cat $QTDIR/include/qglobal.h|grep '^#define QT_VERSION'|grep -v STR|sed -e 's,#define QT_VERSION\t*,,;' -e 's,.*\([0-9]\)\([0-9]\)\([0-9]\).*,\1.\2.\3,;'`
+ else
+ QTE_BASEVERSION=2.3.4
+ fi
+fi
+if [ -z "$QTE_VERSION" ]
+then
+ if [ -e $QTDIR/include/qglobal.h ]
+ then
+ QTE_VERSION=`cat $QTDIR/include/qglobal.h|grep '^#define QT_VERSION_STR'|sed -e 's,#define QT_VERSION_STR\t*,,;' -e 's,.*"\([^"]*\)".*,\1,;'`
+ else
+ QTE_VERSION=2.3.4
+ fi
+fi
[ -z "$QTE_REVISION" ] && QTE_REVISION=3
DEB_VERSION=2.0
# Have to do this here, since CVS can't store symlinks
mkdir -p $OPIEDIR/etc/rcS.d
ln -sf ../init.d/bootsplash $OPIEDIR/etc/rcS.d/S01bootsplash
VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$OPIEDIR/include/qpe/version.h)
SUB_VERSION=$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$OPIEDIR/include/qpe/version.h)
if grep -q 'QPE_VERSION .*snapshot' $OPIEDIR/include/qpe/version.h
then
[ -z "$VERSION_CVS" ] && VERSION_CVS="$(date +%Y%m%d)"
SUB_VERSION=$VERSION_CVS
else
VERSION_CVS=""
fi
QPE_VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT
ARCH=arm
STRIP=arm-linux-strip
STRIP_FILES="*ARM*not stripped"
TDIR=/tmp/ipk$$
DATADIR=$TDIR
CTRLDIR=$TDIR/CONTROL
IMAGEDIR=
VERB=
LIST=
RPM=
while [ $# -ne 0 ]
do
case "$1" in
-v)
VERB=1
echo >&2 "Packaging for version $VERSION_MAJ.$VERSION_MIN.$VERSION_PAT$VERSION_CVS"
;; -l)
LIST=1
;; -i)
shift
IMAGEDIR=$1
DATADIR=$IMAGEDIR
mkdir -p $IMAGEDIR