~jfb-tempo-consulting/unifield-wm/packaging_py27_US-3833

« back to all changes in this revision

Viewing changes to windows/Makefile

  • Committer: Jeff Allen
  • Date: 2017-06-27 14:26:16 UTC
  • Revision ID: jeff.allen@geneva.msf.org-20170627142616-bp9pdad2bxhivayn
Remove version from the Postgres install dir

update.py will manage the two install dirs itself during major
upgrades. Using a version-less install directory simplifies
minor upgrades and prevents us from needing to edit the
service entry while doing a major upgrade.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
FILES_DIRECTORY=files
6
6
 
7
7
PG_VER=9.6.3-2
8
 
# Only update this on major versions, i.e. 9.x.y -> 10.x
9
 
PG_DIR=pgsql-9
10
8
PG_ZIP=postgresql-$(PG_VER)-windows-binaries.zip
11
9
 
12
 
MAKENSIS_ARGUMENTS=/DMAJOR_VERSION=$(MAJOR_VERSION) /DMINOR_VERSION=$(MINOR_VERSION) /DREVISION_VERSION=$(REVISION_VERSION) /DBUILD_VERSION=$(BUILD_VERSION) /DPG_DIR=$(PG_DIR) /DPG_VER=$(PG_VER)
 
10
MAKENSIS_ARGUMENTS=/DMAJOR_VERSION=$(MAJOR_VERSION) /DMINOR_VERSION=$(MINOR_VERSION) /DREVISION_VERSION=$(REVISION_VERSION) /DBUILD_VERSION=$(BUILD_VERSION) /DPG_VER=$(PG_VER)
13
11
 
14
12
LAUNCH_PY2EXE=python -B setup.py py2exe
15
13
LAUNCH_MAKENSIS=$(HOME)/nsis-3.01/makensis.exe $(MAKENSIS_ARGUMENTS) setup.nsi
54
52
        wget https://get.enterprisedb.com/postgresql/$(PG_ZIP)
55
53
 
56
54
# Extract the minimal Postgres install from the distribution zip file
57
 
$(PG_DIR): $(PG_ZIP)
58
 
        unzip $(PG_ZIP) pgsql/bin/* pgsql/lib/* pgsql/share/* -d $(PG_DIR)
59
 
        mv $(PG_DIR)/pgsql/* $(PG_DIR)
60
 
        rmdir $(PG_DIR)/pgsql
 
55
pgsql: $(PG_ZIP)
 
56
        unzip $(PG_ZIP) pgsql/bin/* pgsql/lib/* pgsql/share/*
61
57
# the origin.txt file serves two purposes: to show where the files
62
58
# came from, and to workaround a bug in NSIS that it cannot scan a
63
59
# directory with only subdirs in it (it needs a file)
64
 
        echo $(PG_ZIP) > $(PG_DIR)/origin.txt
 
60
        echo $(PG_ZIP) > pgsql/origin.txt
65
61
 
66
 
allinone: standalone $(PG_DIR)
 
62
allinone: standalone pgsql
67
63
        $(LAUNCH_MAKENSIS)
68
64
        cp ./openerp-*.exe $(FILES_DIRECTORY)/openerp-allinone-setup-$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_VERSION)-r$(REVISION_VERSION).exe
69
65
        cp ./static/server-extra/PKGINFO $(FILES_DIRECTORY)/openerp-allinone-setup-$(MAJOR_VERSION).$(MINOR_VERSION)-$(BUILD_VERSION)-r$(REVISION_VERSION).txt