The produced deb file now contains the proper installed-size field.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-10-16 17:58:19 +02:00
parent daa6f09529
commit 52b8913bb6
2 changed files with 10 additions and 2 deletions

View File

@ -76,15 +76,22 @@ deb: debfile debsource
debfile: all
rm -rf $(DEBDIR)
mkdir -p $(DEBDIR)
cp -r debsrc/. $(DEBDIR)
mkdir -p $(DEBDIR)/boot
mkdir -p $(DEBDIR)/boot
cp sortix/sortix.bin $(DEBDIR)/boot
cp sortix/sortix.initrd $(DEBDIR)/boot
expr \( `stat --printf="%s" $(DEBDIR)/boot/sortix.bin` \
+ `stat --printf="%s" $(DEBDIR)/boot/sortix.initrd` \
+ 1023 \) / 1024 > $(DEBDIR)/boot/deb.size
cp -r debsrc/. $(DEBDIR)
mkdir -p $(DEBDIR)/boot
SIZE=`cat $(DEBDIR)/boot/deb.size`; \
cat debsrc/DEBIAN/control | \
sed "s/SORTIX_PACKAGE_NAME/$(PACKAGENAME)/g" | \
sed "s/SORTIX_VERSION/$(VERSION)/g" | \
sed "s/SORTIX_ARCH/all/g" | \
sed "s/SORTIX_SIZE/$$SIZE/g" | \
cat > $(DEBDIR)/DEBIAN/control
rm $(DEBDIR)/boot/deb.size
dpkg --build $(DEBDIR) $(DEBFILE)
rm -rf $(DEBDIR)/DEBIAN
(cd builds/$(DEBNAME) && tar cfzv ../$(DEBNAME).tar.gz `ls`)

View File

@ -3,6 +3,7 @@ Version: SORTIX_VERSION
Section: kernel
Priority: optional
Architecture: SORTIX_ARCH
Installed-Size: SORTIX_SIZE
Essential: no
Recommends: grub2, xorriso
Provides: sortix