Commit 7b4816a8 authored by Sidnei da Silva's avatar Sidnei da Silva

parent 2b5e19c5
...@@ -7,7 +7,8 @@ NAME=Zope ...@@ -7,7 +7,8 @@ NAME=Zope
MAJOR_VERSION=<<ZOPE_MAJOR_VERSION>> MAJOR_VERSION=<<ZOPE_MAJOR_VERSION>>
MINOR_VERSION=<<ZOPE_MINOR_VERSION>> MINOR_VERSION=<<ZOPE_MINOR_VERSION>>
RELEASE_TAG=<<VERSION_RELEASE_TAG>> RELEASE_TAG=<<VERSION_RELEASE_TAG>>
PACKAGE_NAME=$(NAME)-$(MAJOR_VERSION).$(MINOR_VERSION)-$(RELEASE_TAG) ZOPEVERSION=$(MAJOR_VERSION).$(MINOR_VERSION)-$(RELEASE_TAG)
PACKAGE_NAME=$(NAME)-$(ZOPEVERSION)
PYTHON="<<PYTHON>>" PYTHON="<<PYTHON>>"
TMPDIR="<<TMP_DIR>>" TMPDIR="<<TMP_DIR>>"
...@@ -31,7 +32,9 @@ RMRF=deltree /y ...@@ -31,7 +32,9 @@ RMRF=deltree /y
CD=cd CD=cd
XCOPY=xcopy /i /s /e /y XCOPY=xcopy /i /s /e /y
COPY=copy COPY=copy
MOVE=move
EXISTS=IF EXIST EXISTS=IF EXIST
NOT_EXISTS=IF NOT EXIST
default: build default: build
# default: The default step (invoked when make is called without a target) # default: The default step (invoked when make is called without a target)
...@@ -59,6 +62,16 @@ install: build version_txt ...@@ -59,6 +62,16 @@ install: build version_txt
@ echo Zope binaries installed successfully. @ echo Zope binaries installed successfully.
@ echo Now run '$(PYTHON) $(PREFIX)\bin\mkzopeinstance.py' @ echo Now run '$(PYTHON) $(PREFIX)\bin\mkzopeinstance.py'
$(BASE_DIR)/inst/tmp/$(PACKAGE_NAME).tgz:
$(MAKE) sdist
$(NOT_EXISTS) inst\tmp $(MKDIR) inst\tmp
$(MOVE) $(PACKAGE_NAME).tgz inst\tmp
# installer: Create the Zope Installer.
installer: $(BASE_DIR)/inst/tmp/$(PACKAGE_NAME).tgz
$(CD) inst && sh Winbuilders/buildout zope ZOPEVERSION=$(ZOPEVERSION)
# inplace: Do an in-place build # inplace: Do an in-place build
inplace: inplace:
$(MAKE) install PREFIX="$(BASE_DIR)" $(MAKE) install PREFIX="$(BASE_DIR)"
......
cd %1%
set MAKEFLAGS=
nmake build
nmake install
...@@ -33,7 +33,7 @@ Source:"bin\*.*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs ...@@ -33,7 +33,7 @@ Source:"bin\*.*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs
Source:"doc\*.*"; DestDir: "{app}\doc"; Flags: ignoreversion recursesubdirs Source:"doc\*.*"; DestDir: "{app}\doc"; Flags: ignoreversion recursesubdirs
Source:"lib\*.*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs Source:"lib\*.*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs
Source:"skel\*.*"; DestDir: "{app}\skel"; Flags: ignoreversion recursesubdirs Source:"skel\*.*"; DestDir: "{app}\skel"; Flags: ignoreversion recursesubdirs
Source:"zopeskel\*.*"; DestDir: "{app}\zopeskel"; Flags: ignoreversion recursesubdirs
; these are required to be put into the bin directory for proper function of NT services ; these are required to be put into the bin directory for proper function of NT services
Source:"bin\Lib\site-packages\win32\PythonService.exe"; DestDir: "{app}\bin"; Flags: ignoreversion Source:"bin\Lib\site-packages\win32\PythonService.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
Source:"bin\Lib\site-packages\pywin32_system32\PyWinTypes24.dll"; DestDir: "{app}\bin"; Flags: ignoreversion Source:"bin\Lib\site-packages\pywin32_system32\PyWinTypes24.dll"; DestDir: "{app}\bin"; Flags: ignoreversion
......
...@@ -39,8 +39,8 @@ TOUCH=touch ...@@ -39,8 +39,8 @@ TOUCH=touch
NMAKE=nmake NMAKE=nmake
CSCRIPT=cscript CSCRIPT=cscript
ECHO=echo ECHO=echo
ISS_DIR=$(CYGROOT)/Progra~1/Inno Setup 5 ISS_DIR=$(PROGRAMFILES)\\Inno Setup 5
ISS_COMPILER=$(ISS_DIR)/Compil32.exe ISS_COMPILER=$(ISS_DIR)\\Compil32.exe
# We need a version that understands cygwin paths, so /bin/ # We need a version that understands cygwin paths, so /bin/
UNZIP=/bin/unzip UNZIP=/bin/unzip
......
...@@ -72,7 +72,7 @@ tmp: ...@@ -72,7 +72,7 @@ tmp:
$(ARB_PYSRCDIR): tmp/$(PYDIRNAME).tgz $(ARB_PYSRCDIR): tmp/$(PYDIRNAME).tgz
$(MKDIR) "$(SRC_DIR)" $(MKDIR) "$(SRC_DIR)"
$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(PYDIRNAME).tgz $(CD) "$(SRC_DIR)" && $(TAR) xzf ../tmp/$(PYDIRNAME).tgz
$(TOUCH) "$(ARB_PYSRCDIR)" $(TOUCH) "$(ARB_PYSRCDIR)"
# unzip warns about .exe not being exactly a .zip, then succeeds in # unzip warns about .exe not being exactly a .zip, then succeeds in
......
ZOPEVERSION := 2.9.3 ZOPEVERSION = 2.9.3
ZOPEDIRNAME := Zope-$(ZOPEVERSION) ZOPEDIRNAME := Zope-$(ZOPEVERSION)
ZOPE_REQUIRED_FILES=tmp/$(ZOPEDIRNAME).tgz ZOPE_REQUIRED_FILES=tmp/$(ZOPEDIRNAME).tgz
REQUIRED_FILES=$(PYTHON_REQUIRED_FILES)\ REQUIRED_FILES=$(PYTHON_REQUIRED_FILES) \
$(ZOPE_REQUIRED_FILES) $(ZOPE_REQUIRED_FILES)
clean_zope: clean_zope:
$(RMRF) src/$(ZOPEDIRNAME) $(RMRF) src/$(ZOPEDIRNAME)
install_zope: src/$(ZOPEDIRNAME)/install.py \ install_zope: src/$(ZOPEDIRNAME)/inst/configure.py \
install_python \ install_python \
$(BUILD_DIR)/lib/python/Zope2/version.txt \ $(BUILD_DIR)/lib/python/Zope2/version.txt \
$(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe $(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe
...@@ -40,27 +40,16 @@ $(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe: $(BUILD_DIR)/lib/python/Zope2/versio ...@@ -40,27 +40,16 @@ $(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe: $(BUILD_DIR)/lib/python/Zope2/versio
# Build the Inno installer. # Build the Inno installer.
$(CD) "$(BUILD_DIR)";"$(ISS_COMPILER)" /cc "$(WIN_BUILD_DIR)\zope.iss" $(CD) "$(BUILD_DIR)";"$(ISS_COMPILER)" /cc "$(WIN_BUILD_DIR)\zope.iss"
MAKEZOPE="$(MAKEFILEDIR)/bin/makezope.bat" "$(WIN_SRC_DIR)\\$(ZOPEDIRNAME)"
# This builds Zope, then installs it into the build directory, then # This builds Zope, then installs it into the build directory, then
# creates lib/python/Zope2/version.txt in the build directory. # creates lib/python/Zope2/version.txt in the build directory.
#
# Yuck: for whatever reason, distutils refuses to allow an absolute
# path for the --home option, so this hardcodes "build" as the name of
# the build directory, and assumes "build" is a sibling of SRC_DIR.
#
# Yuck: the --no-compile option here has no effect: the install step
# creates oodles of unwanted .pyc files. They're removed by the
# $(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe target, though, before
# building the installer.
#
# Yuck: no matter what I pass to --install-headers, it throws away the
# last path component. We actually want to copy the Zope/ZODB headers
# into bin/Include. The "nonsense" at the end gets thrown away, and that
# smells like a bug. When it gets fixed, I suppose this will copy the
# headers to bin/Include/nonsense/.
$(BUILD_DIR)/lib/python/Zope2/version.txt: $(BUILD_DIR)/bin/python.exe $(BUILD_DIR)/lib/python/Zope2/version.txt: $(BUILD_DIR)/bin/python.exe
cd "$(SRC_DIR)/$(ZOPEDIRNAME)" && \ cd "$(SRC_DIR)/$(ZOPEDIRNAME)" && \
"$<" install.py install --no-compile --home=../../build \ "$<" inst/configure.py \
--install-headers=../../build/bin/Include/nonsense --prefix="$(WIN_BUILD_DIR)" \
--no-compile
$(MAKEZOPE)
echo Zope $(ZOPEVERSION) > $@ echo Zope $(ZOPEVERSION) > $@
$(TOUCH) $@ $(TOUCH) $@
...@@ -68,6 +57,7 @@ tmp/$(ZOPEDIRNAME).tgz: ...@@ -68,6 +57,7 @@ tmp/$(ZOPEDIRNAME).tgz:
$(TOUCH) tmp/$(ZOPEDIRNAME).tgz $(TOUCH) tmp/$(ZOPEDIRNAME).tgz
# This merely unpacks the Zope tarball. # This merely unpacks the Zope tarball.
src/$(ZOPEDIRNAME)/install.py: tmp/$(ZOPEDIRNAME).tgz src/$(ZOPEDIRNAME)/inst/configure.py: tmp/$(ZOPEDIRNAME).tgz
$(MKDIR) "$(SRC_DIR)" $(MKDIR) "$(SRC_DIR)"
$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(ZOPEDIRNAME).tgz $(CD) "$(SRC_DIR)" && $(TAR) xzf ../tmp/$(ZOPEDIRNAME).tgz
$(TOUCH) $@
...@@ -19,7 +19,9 @@ from distutils import filelist ...@@ -19,7 +19,9 @@ from distutils import filelist
INCLUDES = tuple('.*'.split()) INCLUDES = tuple('.*'.split())
EXCLUDES = tuple(r""".*.svn\\ .*CVS\\ .*.tgz EXCLUDES = tuple(r""".*.svn\\ .*CVS\\ .*.tgz
.*makefile .*Makefile inst\\tmp\\.* .*build-base\\ .*makefile$ .*Makefile$
.*inst\\tmp\\.* .*inst\\src\\.*
.*build-base\\ .*build\\
.*~ .*.#.*""".split()) .*~ .*.#.*""".split())
def collect(top_dir, includes=INCLUDES, excludes=EXCLUDES): def collect(top_dir, includes=INCLUDES, excludes=EXCLUDES):
...@@ -41,8 +43,9 @@ def collect(top_dir, includes=INCLUDES, excludes=EXCLUDES): ...@@ -41,8 +43,9 @@ def collect(top_dir, includes=INCLUDES, excludes=EXCLUDES):
def tar_it_up(dest, files): def tar_it_up(dest, files):
tar = tarfile.open(dest, mode='w:gz') tar = tarfile.open(dest, mode='w:gz')
basename = os.path.splitext(os.path.basename(dest))[0]
for fname in files: for fname in files:
tar.add(fname, recursive=False) tar.add(fname, os.path.join(basename, fname), recursive=False)
tar.close() tar.close()
def main(options, args): def main(options, args):
......
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