summaryrefslogtreecommitdiff
path: root/mkipks
Unidiff
Diffstat (limited to 'mkipks') (more/less context) (ignore whitespace changes)
-rwxr-xr-xmkipks2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkipks b/mkipks
index 8c865d3..78498f8 100755
--- a/mkipks
+++ b/mkipks
@@ -1,141 +1,141 @@
1#!/bin/sh 1#!/bin/sh
2 2
3QTE_VERSION=2.3.3 3QTE_VERSION=2.3.3
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/S98opie 8rm -f etc/rc2.d/S98opie
9ln -s ../init.d/opie etc/rc2.d/S98opie 9ln -s ../init.d/opie etc/rc2.d/S98opie
10 10
11mkdir -p etc/rcS.d 11mkdir -p etc/rcS.d
12rm -f etc/rcS.d/S01bootsplash 12rm -f etc/rcS.d/S01bootsplash
13ln -s ../init.d/opie etc/rcS.d/S01bootsplash 13ln -s ../init.d/bootsplash etc/rcS.d/S01bootsplash
14 14
15rm -f ipaq/etc/rc2.d/S96opieatd 15rm -f ipaq/etc/rc2.d/S96opieatd
16ln -s ../init.d/opieatd ipaq/etc/rc2.d/S96opieatd 16ln -s ../init.d/opieatd ipaq/etc/rc2.d/S96opieatd
17 17
18 18
19 19
20VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h) 20VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\..*\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
21VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h) 21VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION ".*\.\([0-9]*\)\..*".*/\1/p' <$OPIEDIR/include/qpe/version.h)
22VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$OPIEDIR/include/qpe/version.h) 22VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION ".*\..*\.\([0-9]*\).*/\1/p' <$OPIEDIR/include/qpe/version.h)
23SUB_VERSION=$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$OPIEDIR/include/qpe/version.h) 23SUB_VERSION=$(sed -n -e 's,.*SUB_VERSION \"\(.*\)\".*,\1,p' <$OPIEDIR/include/qpe/version.h)
24if grep -q 'QPE_VERSION .*snapshot' $OPIEDIR/include/qpe/version.h 24if grep -q 'QPE_VERSION .*snapshot' $OPIEDIR/include/qpe/version.h
25then 25then
26 VERSION_CVS="$(date +%Y%m%d)" 26 VERSION_CVS="$(date +%Y%m%d)"
27 SUB_VERSION=$VERSION_CVS 27 SUB_VERSION=$VERSION_CVS
28else 28else
29 VERSION_CVS="" 29 VERSION_CVS=""
30fi 30fi
31 31
32QPE_VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT 32QPE_VERSION=$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT
33 33
34ARCH=arm 34ARCH=arm
35STRIP=arm-linux-strip 35STRIP=arm-linux-strip
36STRIP_FILES="*ARM*not stripped" 36STRIP_FILES="*ARM*not stripped"
37 37
38TDIR=/tmp/ipk$$ 38TDIR=/tmp/ipk$$
39DATADIR=$TDIR 39DATADIR=$TDIR
40CTRLDIR=$TDIR/CONTROL 40CTRLDIR=$TDIR/CONTROL
41 41
42IMAGEDIR= 42IMAGEDIR=
43VERB= 43VERB=
44LIST= 44LIST=
45RPM= 45RPM=
46 46
47while [ $# -ne 0 ] 47while [ $# -ne 0 ]
48do 48do
49 case "$1" in 49 case "$1" in
50 -v) 50 -v)
51 VERB=1 51 VERB=1
52 echo >&2 "Packaging for version $VERSION_MAJ.$VERSION_MIN.$VERSION_PAT$VERSION_CVS" 52 echo >&2 "Packaging for version $VERSION_MAJ.$VERSION_MIN.$VERSION_PAT$VERSION_CVS"
53 ;; -l) 53 ;; -l)
54 LIST=1 54 LIST=1
55 ;; -i) 55 ;; -i)
56 shift 56 shift
57 IMAGEDIR=$1 57 IMAGEDIR=$1
58 DATADIR=$IMAGEDIR 58 DATADIR=$IMAGEDIR
59 mkdir -p $IMAGEDIR 59 mkdir -p $IMAGEDIR
60 ;; -rpm) 60 ;; -rpm)
61 if [ "$OPIEDIR" != "/opt/Qtopia" ] 61 if [ "$OPIEDIR" != "/opt/Qtopia" ]
62 then 62 then
63 echo >&2 '$OPIEDIR is not the standard /usr/Qtopia directory.' 63 echo >&2 '$OPIEDIR is not the standard /usr/Qtopia directory.'
64 sleep 1 64 sleep 1
65 #exit 1 65 #exit 1
66 fi 66 fi
67 RPM=1 67 RPM=1
68 ;; -arch) 68 ;; -arch)
69 shift 69 shift
70 ARCH=$1 70 ARCH=$1
71 STRIP= 71 STRIP=
72 STRIP_FILES= 72 STRIP_FILES=
73 ;; /*) 73 ;; /*)
74 FILES="$FILES $1" 74 FILES="$FILES $1"
75 ;; *) 75 ;; *)
76 FILES="$FILES $PWD/$1" 76 FILES="$FILES $PWD/$1"
77 esac 77 esac
78 shift 78 shift
79done 79done
80 80
81 81
82if [ -z "$FILES" ] 82if [ -z "$FILES" ]
83then 83then
84 FILES=`find $OPIEDIR -name "*.control" -print` 84 FILES=`find $OPIEDIR -name "*.control" -print`
85fi 85fi
86 86
87RDIR=$PWD 87RDIR=$PWD
88cd $OPIEDIR 88cd $OPIEDIR
89 89
90for i in $FILES 90for i in $FILES
91do 91do
92 rm -rf $TDIR 92 rm -rf $TDIR
93 93
94 mkdir -p $DATADIR 94 mkdir -p $DATADIR
95 mkdir -p $CTRLDIR 95 mkdir -p $CTRLDIR
96 96
97 packagename=${i##*/}; packagename=${packagename%.control} 97 packagename=${i##*/}; packagename=${packagename%.control}
98 version=$(eval echo '"'$(sed -n -e "s/^Version: *//p" $i)'"') 98 version=$(eval echo '"'$(sed -n -e "s/^Version: *//p" $i)'"')
99 depends=$(eval echo '"'$(sed -n -e "s/^Depends: *//p" $i)'"') 99 depends=$(eval echo '"'$(sed -n -e "s/^Depends: *//p" $i)'"')
100 files=$(eval echo $(sed -n -e "s/^Files://p" $i)) 100 files=$(eval echo $(sed -n -e "s/^Files://p" $i))
101 arch=$(eval echo $(sed -n -e "s/^Arch://p" $i)) 101 arch=$(eval echo $(sed -n -e "s/^Arch://p" $i))
102 section=$(sed -n -e "s/^Section: *//p" $i) 102 section=$(sed -n -e "s/^Section: *//p" $i)
103 provides=$(sed -n -e "s/^Provides: *//p" $i) 103 provides=$(sed -n -e "s/^Provides: *//p" $i)
104 conflicts=$(sed -n -e "s/^Conflicts: *//p" $i) 104 conflicts=$(sed -n -e "s/^Conflicts: *//p" $i)
105 license=$(sed -n -e "s/^License: *//p" $i) 105 license=$(sed -n -e "s/^License: *//p" $i)
106 summary=$(sed -n -e "s/^Description: *//p" $i) 106 summary=$(sed -n -e "s/^Description: *//p" $i)
107 package=${packagename}_${version}_$ARCH 107 package=${packagename}_${version}_$ARCH
108 ERROR= 108 ERROR=
109 if [ -z "$files" ] 109 if [ -z "$files" ]
110 then 110 then
111 mkdir -p $DATADIR/usr/share/doc/$packagename 111 mkdir -p $DATADIR/usr/share/doc/$packagename
112 else 112 else
113 for f in $files 113 for f in $files
114 do 114 do
115 if [ -d $f ] 115 if [ -d $f ]
116 then 116 then
117 ffiles=$(find $f -type f -o -type b -o -type c -o -type l) 117 ffiles=$(find $f -type f -o -type b -o -type c -o -type l)
118 else 118 else
119 ffiles=$f 119 ffiles=$f
120 fi 120 fi
121 for ff in $ffiles 121 for ff in $ffiles
122 do 122 do
123 case $ff in 123 case $ff in
124 */CVS/*) 124 */CVS/*)
125 continue 125 continue
126 ;;*~) 126 ;;*~)
127 continue 127 continue
128 ;;*.control) 128 ;;*.control)
129 continue 129 continue
130 ;; $QTDIR/*) 130 ;; $QTDIR/*)
131 BASE=$(dirname /opt/QtPalmtop/${ff#$QTDIR/}) 131 BASE=$(dirname /opt/QtPalmtop/${ff#$QTDIR/})
132 ;; etc/*.d/*) 132 ;; etc/*.d/*)
133 BASE=$(dirname /$ff) 133 BASE=$(dirname /$ff)
134 ;; ipaq/*) 134 ;; ipaq/*)
135 BASE=$(dirname ${ff#ipaq}) 135 BASE=$(dirname ${ff#ipaq})
136 ;; *) 136 ;; *)
137 # For SHARP ROM compatibility. Should change to Qtopia. 137 # For SHARP ROM compatibility. Should change to Qtopia.
138 BASE=/opt/QtPalmtop/$(dirname $ff) 138 BASE=/opt/QtPalmtop/$(dirname $ff)
139 esac 139 esac
140 140
141 if [ -f $ff -o -b $ff -o -c $ff ] 141 if [ -f $ff -o -b $ff -o -c $ff ]