summaryrefslogtreecommitdiff
authorkergoth <kergoth>2002-09-05 15:31:09 (UTC)
committer kergoth <kergoth>2002-09-05 15:31:09 (UTC)
commit45f8f55b7ffde37733a2afd65da9e554a4970c87 (patch) (unidiff)
tree6ed282773d16a92100b21a14aa9d53e1a01a8355
parent3d672fdd23777ab8a17d7579c43453a8ce8a5180 (diff)
downloadopie-45f8f55b7ffde37733a2afd65da9e554a4970c87.zip
opie-45f8f55b7ffde37733a2afd65da9e554a4970c87.tar.gz
opie-45f8f55b7ffde37733a2afd65da9e554a4970c87.tar.bz2
Added -classic flag to create old style ipks. Note: this script is and has always been a ugly hack. Should rewrite it one of these days.
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xmkipks30
1 files changed, 28 insertions, 2 deletions
diff --git a/mkipks b/mkipks
index 78498f8..29db5c0 100755
--- a/mkipks
+++ b/mkipks
@@ -57,6 +57,8 @@ do
57 IMAGEDIR=$1 57 IMAGEDIR=$1
58 DATADIR=$IMAGEDIR 58 DATADIR=$IMAGEDIR
59 mkdir -p $IMAGEDIR 59 mkdir -p $IMAGEDIR
60 ;; -classic)
61 CLASSIC=1
60 ;; -rpm) 62 ;; -rpm)
61 if [ "$OPIEDIR" != "/opt/Qtopia" ] 63 if [ "$OPIEDIR" != "/opt/Qtopia" ]
62 then 64 then
@@ -78,6 +80,11 @@ do
78 shift 80 shift
79done 81done
80 82
83if [ -n "$CLASSIC" ]
84then
85 DATADIR=$TDIR/data
86 CTRLDIR=$TDIR/control
87fi
81 88
82if [ -z "$FILES" ] 89if [ -z "$FILES" ]
83then 90then
@@ -200,7 +207,11 @@ do
200 if [ ! -z "$size" ]; then 207 if [ ! -z "$size" ]; then
201 echo "Installed-Size: $size" >>$CTRLDIR/control 208 echo "Installed-Size: $size" >>$CTRLDIR/control
202 else 209 else
210 if [ -z "$SIZEWARNED" ]
211 then
203 echo "Warning, no mkfs.jffs2 found, unable to set Installed-Size." 212 echo "Warning, no mkfs.jffs2 found, unable to set Installed-Size."
213 SIZEWARNED=1
214 fi
204 fi 215 fi
205 echo "Architecture: $ARCH" >>$CTRLDIR/control 216 echo "Architecture: $ARCH" >>$CTRLDIR/control
206 echo "Filename: ./$package.ipk" >>$CTRLDIR/control 217 echo "Filename: ./$package.ipk" >>$CTRLDIR/control
@@ -209,7 +220,7 @@ do
209 [ ! -z "$provides" ] && echo "Provides: $provides" >>$CTRLDIR/control 220 [ ! -z "$provides" ] && echo "Provides: $provides" >>$CTRLDIR/control
210 [ ! -z "$conflicts" ] && echo "Conflicts: $conflicts" >>$CTRLDIR/control 221 [ ! -z "$conflicts" ] && echo "Conflicts: $conflicts" >>$CTRLDIR/control
211 egrep -v "^(Files|Version|Depends|Provides|Conflicts|Architecture):" >>$CTRLDIR/control $i 222 egrep -v "^(Files|Version|Depends|Provides|Conflicts|Architecture):" >>$CTRLDIR/control $i
212 # echo "$DEB_VERSION" >$TDIR/debian-binary 223 [ -n "$CLASSIC" ] && echo "$DEB_VERSION" >$TDIR/debian-binary
213 base=${i%.control} 224 base=${i%.control}
214 scripts="preinst postinst prerm postrm" 225 scripts="preinst postinst prerm postrm"
215 for pf in $scripts 226 for pf in $scripts
@@ -219,7 +230,22 @@ do
219 cp ${base}.$pf $CTRLDIR/$pf 230 cp ${base}.$pf $CTRLDIR/$pf
220 fi 231 fi
221 done 232 done
222 $OPIEDIR/scripts/ipkg-build -o root -g root $TDIR 233 if [ -z "$CLASSIC" ]
234 then
235 $OPIEDIR/scripts/ipkg-build -o root -g root $TDIR
236 else
237 if [ "`id -u`" != "0" ]
238 then
239 if [ -z "$ROOTWARNED" ]
240 then
241 echo Warning. You are not root. Please become root or use fakeroot.
242 ROOTWARNED=1
243 fi
244 fi
245 ( cd $DATADIR && tar -czf $TDIR/data.tar.gz * )
246 ( cd $CTRLDIR && tar -czf $TDIR/control.tar.gz * )
247 ( cd $TDIR && tar -czf $OPIEDIR/$package.ipk ./control.tar.gz ./data.tar.gz ./debian-binary )
248 fi
223 RESULT=$package.ipk 249 RESULT=$package.ipk
224 if [ -n "$VERB" ] 250 if [ -n "$VERB" ]
225 then 251 then