Skip to content

Commit

Permalink
changed tar command to variable TAR_COMMAND so that (optionally) syst…
Browse files Browse the repository at this point in the history
…ems with a native non-gnu tar could use an alternative; tar is default so that there is no change for other users; for example on Mac the homebrew install of gnu-tar is gtar; see lines 61-65 of vars.sample, and line 11 of makefile.inc
  • Loading branch information
Terry-Weymouth committed Jun 20, 2014
1 parent 90540b4 commit 1aa3776
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion R/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ R_EXEC = $(PREFIX)/bin/R
R_FLAGS ?= -O2 -march=native -mtune=native

$(R_SOURCE):
curl -f $(R_MIRROR)/src/base/R-3/$@.tar.gz | tar xzf -
curl -f $(R_MIRROR)/src/base/R-3/$@.tar.gz | $(TAR_COMMAND) xzf -

build/Makefile: $(R_SOURCE)
mkdir -p build && cd build && \
Expand Down
6 changes: 3 additions & 3 deletions env/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ REMOTE_FILE_STORAGE = http://files.thehyve.net
KETTLE_VERSION=4.4.0

UBUNTU_PACKAGES=postgresql make git rsync libcairo-dev php5-cli php5-json curl \
tar openjdk-7-jdk gfortran g++ unzip
$(TAR_COMMAND) openjdk-7-jdk gfortran g++ unzip

GROOVY_VERSION=2.1.9

Expand Down Expand Up @@ -31,7 +31,7 @@ $(TRANSMART_LOADER_ARCHIVE):
curl -f $(REMOTE_FILE_STORAGE)/$@ > $@

$(TRANSMART_LOADER)-from-file-server: $(TRANSMART_LOADER_ARCHIVE) $(TRANSMART_LOADER)-from-file-server/conf/log4j.properties
tar --touch -xf $< -C $@
$(TAR_COMMAND) --touch -xf $< -C $@

$(GROOVY_ZIP):
curl -f "$(GROOVY_URL)" > $@
Expand Down Expand Up @@ -67,7 +67,7 @@ $(KETTLE_ARCHIVE):
curl -L -f "http://downloads.sourceforge.net/project/pentaho/Data%20Integration/4.4.0-stable/$@" > $@

data-integration: $(KETTLE_ARCHIVE)
tar --touch -xzf $<
$(TAR_COMMAND) --touch -xzf $<

/var/lib/postgresql/tablespaces:
/bin/bash -c 'mkdir -p $@/{biomart,deapp,indx,search_app,transmart}'
Expand Down
2 changes: 2 additions & 0 deletions makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ PSQL_COMMAND = $(PGSQL_BIN)psql -v ON_ERROR_STOP=1 --single-transaction -X
PGDUMP_COMMAND = $(PGSQL_BIN)pg_dump
PGDUMPALL_COMMAND = $(PGSQL_BIN)pg_dumpall

TAR_COMMAND ?= tar

.DELETE_ON_ERROR:
10 changes: 5 additions & 5 deletions samples/common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ DATA_LOCATION := http://files.thehyve.net/sample_data/


%/clinical: %/%_clinical.tar.xz
tar -C $* -xJf $(subst %,$*,$<)
$(TAR_COMMAND) -C $* -xJf $(subst %,$*,$<)

%/annotation: %/%_annotation.tar.xz
tar -C $* -xJf $(subst %,$*,$<)
$(TAR_COMMAND) -C $* -xJf $(subst %,$*,$<)

%/expression: %/%_expression.tar.xz
tar -C $* -xJf $(subst %,$*,$<)
$(TAR_COMMAND) -C $* -xJf $(subst %,$*,$<)

%/analysis: %/%_analysis.tar.xz
tar -C $* -xJf $(subst %,$*,$<)
$(TAR_COMMAND) -C $* -xJf $(subst %,$*,$<)

%/acgh: %/%_acgh.tar.xz
tar -C $* -xJf $(subst %,$*,$<)
$(TAR_COMMAND) -C $* -xJf $(subst %,$*,$<)

%/%_clinical.tar.xz %/%_annotation.tar.xz %/%_expression.tar.xz %/%_analysis.tar.xz %/%_acgh.tar.xz:
curl -f $(DATA_LOCATION)$(notdir $(subst %,$*,$@)) > $(subst %,$*,$@)
8 changes: 4 additions & 4 deletions solr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ EXAMPLE_FILES=etc contexts lib logs resources solr-webapp \
webapps README.txt start.jar

$(ROOT_FILES): solr-$(SOLR_VERSION).tgz
tar xzf $< --touch --strip-components=1 solr-$(SOLR_VERSION)/$@
$(TAR_COMMAND) xzf $< --touch --strip-components=1 solr-$(SOLR_VERSION)/$@

$(EXAMPLE_FILES): solr-$(SOLR_VERSION).tgz
tar xzf $< --touch --strip-components=2 solr-$(SOLR_VERSION)/example/$@
$(TAR_COMMAND) xzf $< --touch --strip-components=2 solr-$(SOLR_VERSION)/example/$@

DRIVER=contrib/dataimporthandler/lib/$(JDBC_DRIVER)
$(DRIVER): $(JDBC_DRIVER_PATH)
test -d contrib || $(MAKE) contrib
cp "$<" "$@"

solr: solr-$(SOLR_VERSION).tgz
tar xzf $< --touch --strip-components=2 \
$(TAR_COMMAND) xzf $< --touch --strip-components=2 \
--exclude $(SOLR_VERSION)/solr/collection1 \
solr-$(SOLR_VERSION)/example/solr

solr/collection1:
test -d solr || $(MAKE) solr #don't add dep because solr is touched on each run
tar xzf solr-$(SOLR_VERSION).tgz --touch --strip-components=3 \
$(TAR_COMMAND) xzf solr-$(SOLR_VERSION).tgz --touch --strip-components=3 \
-C solr solr-$(SOLR_VERSION)/example/solr/collection1
rm $@/core.properties #so solr doesn't see the dir as core

Expand Down
6 changes: 6 additions & 0 deletions vars.sample
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ KITCHEN=/path/to/data-integration/kitchen.sh
#end with /
TSUSER_HOME=$HOME/

#optional TAR commend - e.g. tar on Mac does not work;
# on Mac homebrew: brew install gnu-tar ; will set command gtar
# if this is unset, then value defaults to tar (system tar command)
#TAR_COMMAND=gtar
#export TAR_COMMAND

# If your distro uses an old version of groovy, do make -C env groovy,
# and uncomment this. Version 2.1.9 is known to work, versions before 2
# are known not to work
Expand Down

0 comments on commit 1aa3776

Please sign in to comment.