|
diff --git a/mkipks b/mkipks index 572c8f1..b355689 100755 --- a/ mkipks+++ b/ mkipks |
|
@@ -184,41 +184,41 @@ do |
184 | #size=$(du -h -s $DATADIR | sed -e 's/[ ].*//') |
184 | #size=$(du -h -s $DATADIR | sed -e 's/[ ].*//') |
185 | size=$(mkfs.jffs2 -r $DATADIR | wc -c) |
185 | size=$(mkfs.jffs2 -r $DATADIR | wc -c) |
186 | echo "Package: $packagename" >$CTRLDIR/control |
186 | echo "Package: $packagename" >$CTRLDIR/control |
187 | echo "Installed-Size: $size" >>$CTRLDIR/control |
187 | echo "Installed-Size: $size" >>$CTRLDIR/control |
188 | echo "Filename: ./$package.ipk" >>$CTRLDIR/control |
188 | echo "Filename: ./$package.ipk" >>$CTRLDIR/control |
189 | echo "Version: $version" >>$CTRLDIR/control |
189 | echo "Version: $version" >>$CTRLDIR/control |
190 | echo "Depends: $depends" >>$CTRLDIR/control |
190 | echo "Depends: $depends" >>$CTRLDIR/control |
191 | egrep -v "^(Files|Version|Depends):" >>$CTRLDIR/control $i |
191 | egrep -v "^(Files|Version|Depends):" >>$CTRLDIR/control $i |
192 | echo "$DEB_VERSION" >$TDIR/debian-binary |
192 | echo "$DEB_VERSION" >$TDIR/debian-binary |
193 | base=${i%.control} |
193 | base=${i%.control} |
194 | scripts="preinst postinst prerm postrm" |
194 | scripts="preinst postinst prerm postrm" |
195 | for pf in $scripts |
195 | for pf in $scripts |
196 | do |
196 | do |
197 | if [ -x ${base}.$pf ] |
197 | if [ -x ${base}.$pf ] |
198 | then |
198 | then |
199 | cp ${base}.$pf $CTRLDIR/$pf |
199 | cp ${base}.$pf $CTRLDIR/$pf |
200 | fi |
200 | fi |
201 | done |
201 | done |
202 | if [ "$UID" = 0 ] |
202 | if [ "$UID" = 0 ] |
203 | then |
203 | then |
204 | chown -R root.root $TDIR |
204 | chown -R root.root $TDIR |
205 | else |
205 | else |
206 | echo "Warning: You are not root. Unable to squash permissions." |
206 | echo "Warning: You are not root. Unable to squash permissions." |
207 | fi |
207 | fi |
208 | ( cd $CTRLDIR; tar --owner=root --group=root cfz ../control.tar.gz ./*; ) |
208 | ( cd $CTRLDIR; tar cfz ../control.tar.gz ./*; ) |
209 | ( cd $DATADIR; tar --owner=root --group=root cfz ../data.tar.gz ./*; ) |
209 | ( cd $DATADIR; tar cfz ../data.tar.gz ./*; ) |
210 | ( cd $TDIR; rm -rf control data; tar cf - ./debian-binary ./control.tar.gz ./data.tar.gz; ) | gzip >$RDIR/$package.ipk |
210 | ( cd $TDIR; rm -rf control data; tar cf - ./debian-binary ./control.tar.gz ./data.tar.gz; ) | gzip >$RDIR/$package.ipk |
211 | RESULT=$package.ipk |
211 | RESULT=$package.ipk |
212 | if [ -n "$VERB" ] |
212 | if [ -n "$VERB" ] |
213 | then |
213 | then |
214 | echo >&2 "Built $RESULT ($size)" |
214 | echo >&2 "Built $RESULT ($size)" |
215 | fi |
215 | fi |
216 | if [ -n "$LIST" ] |
216 | if [ -n "$LIST" ] |
217 | then |
217 | then |
218 | echo $RESULT |
218 | echo $RESULT |
219 | fi |
219 | fi |
220 | fi |
220 | fi |
221 | else |
221 | else |
222 | echo >&2 "Not building $package package" |
222 | echo >&2 "Not building $package package" |
223 | fi |
223 | fi |
224 | done |
224 | done |
|