Skip to content
Snippets Groups Projects
Commit ce9782ed authored by Edileuton Henrique de Oliveira's avatar Edileuton Henrique de Oliveira
Browse files

build: Add rule to make the install package

parent 2117425a
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ VERSION = 1.4.0 ...@@ -23,7 +23,7 @@ VERSION = 1.4.0
BASE = .. BASE = ..
BUILD = build BUILD = build
PACKAGE = $(BUILD)/SEED2-run PACKAGE = $(BUILD)/SEED2
CC = gcc CC = gcc
CFLAGS = -g -O2 -m32 -static -Wall CFLAGS = -g -O2 -m32 -static -Wall
...@@ -33,10 +33,14 @@ WGET_VERSION = 1.13.4 ...@@ -33,10 +33,14 @@ WGET_VERSION = 1.13.4
WGET_URL = http://gnu.c3sl.ufpr.br/ftp/wget/wget-$(WGET_VERSION).tar.gz WGET_URL = http://gnu.c3sl.ufpr.br/ftp/wget/wget-$(WGET_VERSION).tar.gz
WGET = wget-$(WGET_VERSION) WGET = wget-$(WGET_VERSION)
BOOTSTRAP_SIZE = $(shell echo $$(( `wc -l bootstraps/bootstrap-update.sh | cut -d' ' -f1` + 1 ))) BOOTSTRAP_INSTALL_SIZE = $(shell echo $$(( `wc -l bootstraps/bootstrap-install.sh | cut -d' ' -f1` + 1 )))
BOOTSTRAP_UPDATE_SIZE = $(shell echo $$(( `wc -l bootstraps/bootstrap-update.sh | cut -d' ' -f1` + 1 )))
all: proinfodata-$(VERSION)-update.run all: proinfodata-$(VERSION)-update.run
install: proinfodata-$(VERSION)-install.run
clean: clean:
@rm -rf $(BUILD) @rm -rf $(BUILD)
cd $(BASE)/client; make clean cd $(BASE)/client; make clean
...@@ -105,6 +109,9 @@ $(BUILD)/.package: $(BUILD)/$(WGET)/src/wget $(BASE)/client/bin/client $(BASE)/c ...@@ -105,6 +109,9 @@ $(BUILD)/.package: $(BUILD)/$(WGET)/src/wget $(BASE)/client/bin/client $(BASE)/c
cp -ar "$(BASE)/client/bin/client" "$(PACKAGE)/client/bin/" cp -ar "$(BASE)/client/bin/client" "$(PACKAGE)/client/bin/"
@mkdir -p "$(PACKAGE)/client/conf" @mkdir -p "$(PACKAGE)/client/conf"
echo "$(VERSION)" > "$(PACKAGE)/client/conf/version" echo "$(VERSION)" > "$(PACKAGE)/client/conf/version"
@if ! test -z $(INEP); then \
echo "$(INEP)" > "$(PACKAGE)/client/conf/inep"; \
fi
cp -a "$(BUILD)/$(WGET)/src/wget" "$(PACKAGE)/bin/" cp -a "$(BUILD)/$(WGET)/src/wget" "$(PACKAGE)/bin/"
@touch $@ @touch $@
...@@ -128,10 +135,20 @@ $(BUILD)/.md5summed: $(BUILD)/.backedup ...@@ -128,10 +135,20 @@ $(BUILD)/.md5summed: $(BUILD)/.backedup
@touch $@ @touch $@
proinfodata-$(VERSION)-update.run: $(BUILD)/.md5summed proinfodata-$(VERSION)-update.run: $(BUILD)/.md5summed
tar -C $(BUILD) -cvzf $(BUILD)/SEED2-run.tgz SEED2-run rm -rf "$(PACKAGE)/client/conf/inep"
md5sum $(BUILD)/SEED2-run.tgz | awk '{print $$1}' > $(BUILD)/SEED2-run.tgz.md5sum tar -C $(BUILD) -cvzf $(BUILD)/SEED2.tgz SEED2
sed "s/BOOTSTRAP_LINES=/BOOTSTRAP_LINES=$(BOOTSTRAP_SIZE)/g; \ md5sum $(BUILD)/SEED2.tgz | awk '{print $$1}' > $(BUILD)/SEED2.tgz.md5sum
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-run.tgz.md5sum)\"/g" \ s/MD5_CHECK=/MD5_CHECK=\"$(shell cat $(BUILD)/SEED2.tgz.md5sum)\"/g" \
bootstraps/bootstrap-update.sh > "$@" bootstraps/bootstrap-update.sh > "$@"
cat $(BUILD)/SEED2-run.tgz >> "$@" cat $(BUILD)/SEED2.tgz >> "$@"
proinfodata-$(VERSION)-install.run: $(BUILD)/.md5summed
tar -C $(BUILD) -cvzf $(BUILD)/SEED2.tgz SEED2
md5sum $(BUILD)/SEED2.tgz | awk '{print $$1}' > $(BUILD)/SEED2.tgz.md5sum
sed "s/BOOTSTRAP_LINES=/BOOTSTRAP_LINES=$(BOOTSTRAP_INSTALL_SIZE)/g; \
s/MD5_CHECK=/MD5_CHECK=\"$$(md5sum $(BUILD)/SEED2.tgz | awk '{print $$1}')\"/g" \
bootstraps/bootstrap-install.sh > "$@"
cat $(BUILD)/SEED2.tgz >> "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment