|
diff --git a/mkipks b/mkipks index 982a007..63d1e22 100755 --- a/ mkipks+++ b/ mkipks |
|
@@ -54,9 +54,9 @@ do |
54 | IMAGEDIR=$1 |
54 | IMAGEDIR=$1 |
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 |
62 | echo >&2 '$OPIEDIR is not the standard /usr/Qtopia directory.' |
62 | echo >&2 '$OPIEDIR is not the standard /usr/Qtopia directory.' |
@@ -76,14 +76,8 @@ do |
76 | esac |
76 | esac |
77 | shift |
77 | shift |
78 | done |
78 | done |
79 | |
79 | |
80 | if [ -n "$CLASSIC" ] |
| |
81 | then |
| |
82 | DATADIR=$TDIR/data |
| |
83 | CTRLDIR=$TDIR/control |
| |
84 | fi |
| |
85 | |
| |
86 | if [ -z "$FILES" ] |
80 | if [ -z "$FILES" ] |
87 | then |
81 | then |
88 | FILES=`find $OPIEDIR -name "*.control" -print` |
82 | FILES=`find $OPIEDIR -name "*.control" -print` |
89 | fi |
83 | fi |
@@ -217,9 +211,9 @@ do |
217 | [ ! -z "$depends" ] && echo "Depends: $depends" >>$CTRLDIR/control |
211 | [ ! -z "$depends" ] && echo "Depends: $depends" >>$CTRLDIR/control |
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 |
225 | do |
219 | do |
@@ -227,26 +221,9 @@ do |
227 | then |
221 | then |
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 |
252 | echo >&2 "Built $RESULT ($size)" |
229 | echo >&2 "Built $RESULT ($size)" |
|