author | schurig <schurig> | 2003-06-06 14:42:22 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-06 14:42:22 (UTC) |
commit | 923ca7f364bbbece39bcc99d2e5e6a5716bd835b (patch) (unidiff) | |
tree | 6f6c820e132d796bc6404c3d8bba2d1062384cc3 /scripts | |
parent | 802e9457b1bc158c61849755215fe2a5bad6231d (diff) | |
download | opie-923ca7f364bbbece39bcc99d2e5e6a5716bd835b.zip opie-923ca7f364bbbece39bcc99d2e5e6a5716bd835b.tar.gz opie-923ca7f364bbbece39bcc99d2e5e6a5716bd835b.tar.bz2 |
don't pack CVS directories into IPKs
-rwxr-xr-x | scripts/mkipkg | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/mkipkg b/scripts/mkipkg index 9c5e184..43bd3a3 100755 --- a/scripts/mkipkg +++ b/scripts/mkipkg | |||
@@ -322,64 +322,67 @@ ctrldir=$tempDir/CONTROL | |||
322 | 322 | ||
323 | mkdir -p $ctrldir | 323 | mkdir -p $ctrldir |
324 | 324 | ||
325 | if [ ! -e $subst ] || [ -z "$subst" ]; then | 325 | if [ ! -e $subst ] || [ -z "$subst" ]; then |
326 | cat $control > $ctrldir/control.new | 326 | cat $control > $ctrldir/control.new |
327 | else | 327 | else |
328 | sed -f $subst < $control > $ctrldir/control.new | 328 | sed -f $subst < $control > $ctrldir/control.new |
329 | fi | 329 | fi |
330 | 330 | ||
331 | createFileList $ctrldir/control.new ipkgFileList | 331 | createFileList $ctrldir/control.new ipkgFileList |
332 | 332 | ||
333 | if [ "$?" != "0" ]; then | 333 | if [ "$?" != "0" ]; then |
334 | echo "$self: ERROR: missing files, not building $control" | 334 | echo "$self: ERROR: missing files, not building $control" |
335 | rm -rf $tempDir | 335 | rm -rf $tempDir |
336 | exit 1 | 336 | exit 1 |
337 | fi | 337 | fi |
338 | 338 | ||
339 | 339 | ||
340 | cat $ctrldir/control.new | egrep -v '^(Files|FileExcludeMask|FileIncludeMask):' > $ctrldir/control | 340 | cat $ctrldir/control.new | egrep -v '^(Files|FileExcludeMask|FileIncludeMask):' > $ctrldir/control |
341 | rm -f $ctrldir/control.new | 341 | rm -f $ctrldir/control.new |
342 | 342 | ||
343 | ( cd $destdir && tar -cf - $ipkgFileList 2>/dev/null ) | ( cd $tempDir && tar -xf - 2>/dev/null ) | 343 | ( cd $destdir && tar -cf - $ipkgFileList 2>/dev/null ) | ( cd $tempDir && tar -xf - 2>/dev/null ) |
344 | 344 | ||
345 | if [ -z "$filesubst" ]; then | 345 | if [ -z "$filesubst" ]; then |
346 | ( cd $tempDir && stripFiles "$ipkgFileList" ) | 346 | ( cd $tempDir && stripFiles "$ipkgFileList" ) |
347 | else | 347 | else |
348 | if ! (echo $filesubst|grep -q '^/'); then | 348 | if ! (echo $filesubst|grep -q '^/'); then |
349 | filesubst="$oldpwd/$filesubst" | 349 | filesubst="$oldpwd/$filesubst" |
350 | fi | 350 | fi |
351 | ( cd $tempDir && substAndStripFiles "$ipkgFileList" $filesubst ) | 351 | ( cd $tempDir && substAndStripFiles "$ipkgFileList" $filesubst ) |
352 | fi | 352 | fi |
353 | 353 | ||
354 | # removing CVS directories | ||
355 | find $tempDir -name CVS -a -type d -print0 | xargs -0 rm -rf | ||
356 | |||
354 | path="`echo "$PATH" | sed -e "s/\:/ /g"`" | 357 | path="`echo "$PATH" | sed -e "s/\:/ /g"`" |
355 | if [ -z "$mkfsjffs2" ]; then | 358 | if [ -z "$mkfsjffs2" ]; then |
356 | for i in $path; do | 359 | for i in $path; do |
357 | if [ -x "$i/mkfs.jffs2" ]; then | 360 | if [ -x "$i/mkfs.jffs2" ]; then |
358 | mkfsjffs2="$i/mkfs.jffs2" | 361 | mkfsjffs2="$i/mkfs.jffs2" |
359 | break | 362 | break |
360 | fi | 363 | fi |
361 | done | 364 | done |
362 | fi | 365 | fi |
363 | 366 | ||
364 | if [ -z "$mkfsjffs2" ]; then | 367 | if [ -z "$mkfsjffs2" ]; then |
365 | echo "$self: WARNING: no mkjfs.jffs2 found in path. Falling back to using du" | 368 | echo "$self: WARNING: no mkjfs.jffs2 found in path. Falling back to using du" |
366 | echo "for size calculation. mkfs.jffs2 is recommended for size calculation" | 369 | echo "for size calculation. mkfs.jffs2 is recommended for size calculation" |
367 | echo "as it calculates the real package size on the compressed file system," | 370 | echo "as it calculates the real package size on the compressed file system," |
368 | echo "in contrast to du calculating the uncompressed size!" | 371 | echo "in contrast to du calculating the uncompressed size!" |
369 | buildsize=`du -h -s $tempDir | awk '{print $1}'` | 372 | buildsize=`du -h -s $tempDir | awk '{print $1}'` |
370 | else | 373 | else |
371 | buildsize=`$mkfsjffs2 -r $tempDir | wc -c` | 374 | buildsize=`$mkfsjffs2 -r $tempDir | wc -c` |
372 | fi | 375 | fi |
373 | 376 | ||
374 | if [ "$buildsize" != "0" ]; then | 377 | if [ "$buildsize" != "0" ]; then |
375 | echo "Installed-Size: $buildsize" >> $ctrldir/control | 378 | echo "Installed-Size: $buildsize" >> $ctrldir/control |
376 | fi | 379 | fi |
377 | 380 | ||
378 | installScript $preinst | 381 | installScript $preinst |
379 | installScript $postinst | 382 | installScript $postinst |
380 | installScript $prerm | 383 | installScript $prerm |
381 | installScript $posrm | 384 | installScript $posrm |
382 | 385 | ||
383 | $ipkgbuild $classic -o $user -g $group $tempDir | 386 | $ipkgbuild $classic -o $user -g $group $tempDir |
384 | 387 | ||
385 | rm -rf $tempDir | 388 | rm -rf $tempDir |