summaryrefslogtreecommitdiff
path: root/mkipks
Unidiff
Diffstat (limited to 'mkipks') (more/less context) (ignore whitespace changes)
-rwxr-xr-xmkipks29
1 files changed, 3 insertions, 26 deletions
diff --git a/mkipks b/mkipks
index 982a007..63d1e22 100755
--- a/mkipks
+++ b/mkipks
@@ -55,7 +55,7 @@ do
55 DATADIR=$IMAGEDIR 55 DATADIR=$IMAGEDIR
56 mkdir -p $IMAGEDIR 56 mkdir -p $IMAGEDIR
57 ;; -classic) 57 ;; -classic)
58 CLASSIC=1 58 classicopts=-c
59 ;; -rpm) 59 ;; -rpm)
60 if [ "$OPIEDIR" != "/opt/Qtopia" ] 60 if [ "$OPIEDIR" != "/opt/Qtopia" ]
61 then 61 then
@@ -77,12 +77,6 @@ do
77 shift 77 shift
78done 78done
79 79
80if [ -n "$CLASSIC" ]
81then
82 DATADIR=$TDIR/data
83 CTRLDIR=$TDIR/control
84fi
85
86if [ -z "$FILES" ] 80if [ -z "$FILES" ]
87then 81then
88 FILES=`find $OPIEDIR -name "*.control" -print` 82 FILES=`find $OPIEDIR -name "*.control" -print`
@@ -218,7 +212,7 @@ do
218 [ ! -z "$provides" ] && echo "Provides: $provides" >>$CTRLDIR/control 212 [ ! -z "$provides" ] && echo "Provides: $provides" >>$CTRLDIR/control
219 [ ! -z "$conflicts" ] && echo "Conflicts: $conflicts" >>$CTRLDIR/control 213 [ ! -z "$conflicts" ] && echo "Conflicts: $conflicts" >>$CTRLDIR/control
220 egrep -v "^(Files|Version|Depends|Provides|Conflicts|Architecture):" >>$CTRLDIR/control $i 214 egrep -v "^(Files|Version|Depends|Provides|Conflicts|Architecture):" >>$CTRLDIR/control $i
221 [ -n "$CLASSIC" ] && echo "$DEB_VERSION" >$TDIR/debian-binary 215 [ -n "$classicopts" ] && echo "$DEB_VERSION" >$TDIR/debian-binary
222 base=${i%.control} 216 base=${i%.control}
223 scripts="preinst postinst prerm postrm" 217 scripts="preinst postinst prerm postrm"
224 for pf in $scripts 218 for pf in $scripts
@@ -228,24 +222,7 @@ do
228 cp ${base}.$pf $CTRLDIR/$pf 222 cp ${base}.$pf $CTRLDIR/$pf
229 fi 223 fi
230 done 224 done
231 if [ -z "$CLASSIC" ] 225 cd $ORIGDIR; $OPIEDIR/scripts/ipkg-build $classicopts -o root -g root $TDIR; cd $OPIEDIR;
232 then
233 cd $ORIGDIR; $OPIEDIR/scripts/ipkg-build -o root -g root $TDIR; cd $OPIEDIR;
234 else
235 if [ "`id -u`" != "0" ]
236 then
237 if [ -z "$ROOTWARNED" ]
238 then
239 echo Warning. You are not root. Please become root or use fakeroot.
240 ROOTWARNED=1
241 fi
242 else
243 chown -R root.root $TDIR/*
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
249 RESULT=$package.ipk 226 RESULT=$package.ipk
250 if [ -n "$VERB" ] 227 if [ -n "$VERB" ]
251 then 228 then