summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xmkipks1
1 files changed, 1 insertions, 0 deletions
diff --git a/mkipks b/mkipks
index 45f2fb2..dedb060 100755
--- a/mkipks
+++ b/mkipks
@@ -1,109 +1,110 @@
1#!/bin/sh 1#!/bin/sh
2 2
3QTE_VERSION=2.3.2 3QTE_VERSION=2.3.2
4DEB_VERSION=2.0 4DEB_VERSION=2.0
5 5
6# Have to do this here, since CVS can't store symlinks 6# Have to do this here, since CVS can't store symlinks
7mkdir -p etc/rc2.d 7mkdir -p etc/rc2.d
8rm -f etc/rc2.d/S98qpe 8rm -f etc/rc2.d/S98qpe
9ln -s ../init.d/qpe etc/rc2.d/S98qpe 9ln -s ../init.d/qpe etc/rc2.d/S98qpe
10 10
11VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h) 11VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
12VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h) 12VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
13VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$OPIEDIR/include/qpe/version.h) 13VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$OPIEDIR/include/qpe/version.h)
14SUB_VERSION=$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$OPIEDIR/include/qpe/version.h)
14if grep -q 'QPE_VERSION .*snapshot' $OPIEDIR/include/qpe/version.h 15if grep -q 'QPE_VERSION .*snapshot' $OPIEDIR/include/qpe/version.h
15then 16then
16 VERSION_CVS="_$(date +%Y%m%d)" 17 VERSION_CVS="_$(date +%Y%m%d)"
17else 18else
18 VERSION_CVS="" 19 VERSION_CVS=""
19fi 20fi
20 21
21QPE_VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT 22QPE_VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT
22 23
23ARCH=arm 24ARCH=arm
24STRIP=arm-linux-strip 25STRIP=arm-linux-strip
25STRIP_FILES="*Advanced RISC Machines ARM*not stripped" 26STRIP_FILES="*Advanced RISC Machines ARM*not stripped"
26 27
27TDIR=/tmp/ipk$$ 28TDIR=/tmp/ipk$$
28DATADIR=$TDIR/data 29DATADIR=$TDIR/data
29CTRLDIR=$TDIR/control 30CTRLDIR=$TDIR/control
30 31
31IMAGEDIR= 32IMAGEDIR=
32VERB= 33VERB=
33LIST= 34LIST=
34RPM= 35RPM=
35 36
36while [ $# -ne 0 ] 37while [ $# -ne 0 ]
37do 38do
38 case "$1" in 39 case "$1" in
39 -v) 40 -v)
40 VERB=1 41 VERB=1
41 echo >&2 "Packaging for version $VERSION_MAJ.$VERSION_MIN.$VERSION_PAT$VERSION_CVS" 42 echo >&2 "Packaging for version $VERSION_MAJ.$VERSION_MIN.$VERSION_PAT$VERSION_CVS"
42 ;; -l) 43 ;; -l)
43 LIST=1 44 LIST=1
44 ;; -i) 45 ;; -i)
45 shift 46 shift
46 IMAGEDIR=$1 47 IMAGEDIR=$1
47 DATADIR=$IMAGEDIR 48 DATADIR=$IMAGEDIR
48 mkdir -p $IMAGEDIR 49 mkdir -p $IMAGEDIR
49 ;; -rpm) 50 ;; -rpm)
50 if [ "$OPIEDIR" != "/opt/Qtopia" ] 51 if [ "$OPIEDIR" != "/opt/Qtopia" ]
51 then 52 then
52 echo >&2 '$OPIEDIR is not the standard /usr/Qtopia directory.' 53 echo >&2 '$OPIEDIR is not the standard /usr/Qtopia directory.'
53 sleep 1 54 sleep 1
54 #exit 1 55 #exit 1
55 fi 56 fi
56 RPM=1 57 RPM=1
57 ;; -arch) 58 ;; -arch)
58 shift 59 shift
59 ARCH=$1 60 ARCH=$1
60 STRIP= 61 STRIP=
61 STRIP_FILES= 62 STRIP_FILES=
62 ;; /*) 63 ;; /*)
63 FILES="$FILES $1" 64 FILES="$FILES $1"
64 ;; *) 65 ;; *)
65 FILES="$FILES $PWD/$1" 66 FILES="$FILES $PWD/$1"
66 esac 67 esac
67 shift 68 shift
68done 69done
69 70
70 71
71if [ -z "$FILES" ] 72if [ -z "$FILES" ]
72then 73then
73 FILES=`find $OPIEDIR -name "*.control" -print` 74 FILES=`find $OPIEDIR -name "*.control" -print`
74fi 75fi
75 76
76RDIR=$PWD 77RDIR=$PWD
77cd $OPIEDIR 78cd $OPIEDIR
78 79
79for i in $FILES 80for i in $FILES
80do 81do
81 rm -rf $TDIR 82 rm -rf $TDIR
82 83
83 mkdir -p $DATADIR 84 mkdir -p $DATADIR
84 mkdir -p $CTRLDIR 85 mkdir -p $CTRLDIR
85 86
86 packagename=${i##*/}; packagename=${packagename%.control} 87 packagename=${i##*/}; packagename=${packagename%.control}
87 version=$(eval echo '"'$(sed -n -e "s/^Version: *//p" $i)'"') 88 version=$(eval echo '"'$(sed -n -e "s/^Version: *//p" $i)'"')
88 depends=$(eval echo '"'$(sed -n -e "s/^Depends: *//p" $i)'"') 89 depends=$(eval echo '"'$(sed -n -e "s/^Depends: *//p" $i)'"')
89 files=$(eval echo $(sed -n -e "s/^Files://p" $i)) 90 files=$(eval echo $(sed -n -e "s/^Files://p" $i))
90 arch=$(eval echo $(sed -n -e "s/^Arch://p" $i)) 91 arch=$(eval echo $(sed -n -e "s/^Arch://p" $i))
91 section=$(sed -n -e "s/^Section: *//p" $i) 92 section=$(sed -n -e "s/^Section: *//p" $i)
92 license=$(sed -n -e "s/^License: *//p" $i) 93 license=$(sed -n -e "s/^License: *//p" $i)
93 summary=$(sed -n -e "s/^Description: *//p" $i) 94 summary=$(sed -n -e "s/^Description: *//p" $i)
94 package=${packagename}_${version}_$ARCH 95 package=${packagename}_${version}_$ARCH
95 ERROR= 96 ERROR=
96 if [ -z "$files" ] 97 if [ -z "$files" ]
97 then 98 then
98 mkdir -p $DATADIR/usr/share/doc/$packagename 99 mkdir -p $DATADIR/usr/share/doc/$packagename
99 else 100 else
100 for f in $files 101 for f in $files
101 do 102 do
102 if [ -d $f ] 103 if [ -d $f ]
103 then 104 then
104 ffiles=$(find $f -type f -o -type b -o -type c -o -type l) 105 ffiles=$(find $f -type f -o -type b -o -type c -o -type l)
105 else 106 else
106 ffiles=$f 107 ffiles=$f
107 fi 108 fi
108 for ff in $ffiles 109 for ff in $ffiles
109 do 110 do