build: Fix corrupted package error in the update package

Signed-off-by: 's avatarEdileuton Henrique de Oliveira <eho09@c3sl.ufpr.br>
parent 17284a48
...@@ -23,7 +23,7 @@ VERSION = 1.4.1 ...@@ -23,7 +23,7 @@ VERSION = 1.4.1
BASE = .. BASE = ..
BUILD = build BUILD = build
PACKAGE = $(BUILD)/SEED2 PACKAGE = $(BUILD)/SEED2-run
CC = gcc CC = gcc
CFLAGS = -g -O2 -m32 -static -Wall CFLAGS = -g -O2 -m32 -static -Wall
...@@ -49,7 +49,7 @@ clean: ...@@ -49,7 +49,7 @@ clean:
####################### #######################
# BUILD WGET # BUILD WGET
# ####################### ########################
$(BUILD)/$(WGET).tar.gz: $(BUILD)/$(WGET).tar.gz:
@mkdir -p $(BUILD) @mkdir -p $(BUILD)
...@@ -135,20 +135,18 @@ $(BUILD)/.md5summed: $(BUILD)/.backedup ...@@ -135,20 +135,18 @@ $(BUILD)/.md5summed: $(BUILD)/.backedup
@touch $@ @touch $@
proinfodata-$(VERSION)-update.run: $(BUILD)/.md5summed proinfodata-$(VERSION)-update.run: $(BUILD)/.md5summed
rm -rf "$(PACKAGE)/client/conf/inep" tar -C $(BUILD) -cvzf $(BUILD)/SEED2-run.tgz SEED2-run
tar -C $(BUILD) -cvzf $(BUILD)/SEED2.tgz SEED2 md5sum $(BUILD)/SEED2-run.tgz | awk '{print $$1}' > $(BUILD)/SEED2-run.tgz.md5sum
md5sum $(BUILD)/SEED2.tgz | awk '{print $$1}' > $(BUILD)/SEED2.tgz.md5sum
sed "s/BOOTSTRAP_LINES=/BOOTSTRAP_LINES=$(BOOTSTRAP_UPDATE_SIZE)/g; \ sed "s/BOOTSTRAP_LINES=/BOOTSTRAP_LINES=$(BOOTSTRAP_UPDATE_SIZE)/g; \
s/FILE=/FILE=\"$@\"/g; \ s/FILE=/FILE=\"$@\"/g; \
s/MD5_CHECK=/MD5_CHECK=\"$(shell cat $(BUILD)/SEED2.tgz.md5sum)\"/g" \ s/MD5_CHECK=/MD5_CHECK=\"$$(md5sum $(PACKAGE).tgz | awk '{print $$1}')\"/g" \
bootstraps/bootstrap-update.sh > "$@" bootstraps/bootstrap-update.sh > "$@"
cat $(BUILD)/SEED2.tgz >> "$@" cat $(BUILD)/SEED2-run.tgz >> "$@"
proinfodata-$(VERSION)-install.run: $(BUILD)/.md5summed proinfodata-$(VERSION)-install.run: $(BUILD)/.md5summed
tar -C $(BUILD) -cvzf $(BUILD)/SEED2.tgz SEED2 tar -C $(BUILD) -cvzf $(BUILD)/SEED2.tgz SEED2
md5sum $(BUILD)/SEED2.tgz | awk '{print $$1}' > $(BUILD)/SEED2.tgz.md5sum md5sum $(BUILD)/SEED2.tgz | awk '{print $$1}' > $(BUILD)/SEED2.tgz.md5sum
sed "s/BOOTSTRAP_LINES=/BOOTSTRAP_LINES=$(BOOTSTRAP_INSTALL_SIZE)/g; \ sed "s/BOOTSTRAP_LINES=/BOOTSTRAP_LINES=$(BOOTSTRAP_INSTALL_SIZE)/g; \
s/MD5_CHECK=/MD5_CHECK=\"$$(md5sum $(BUILD)/SEED2.tgz | awk '{print $$1}')\"/g" \ s/MD5_CHECK=/MD5_CHECK=\"$$(md5sum $(PACKAGE).tgz | awk '{print $$1}')\"/g" \
bootstraps/bootstrap-install.sh > "$@" bootstraps/bootstrap-install.sh > "$@"
cat $(BUILD)/SEED2.tgz >> "$@" cat $(BUILD)/SEED2.tgz >> "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment