180-add_installed_size.patch 428 B

1234567891011121314
  1. --- a/ipkg-build
  2. +++ b/ipkg-build
  3. @@ -250,6 +250,11 @@ mkdir $tmp_dir
  4. echo $CONTROL > $tmp_dir/tarX
  5. ( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
  6. +
  7. +installed_size=`stat -c "%s" $tmp_dir/data.tar.gz`
  8. +sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
  9. + $pkg_dir/$CONTROL/control
  10. +
  11. ( cd $pkg_dir/$CONTROL && $TAR $ogargs -czf $tmp_dir/control.tar.gz . )
  12. rm $tmp_dir/tarX