1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Run zenmap bundling script under jhbuild to ensure standardized environment.

This commit is contained in:
dmiller
2019-06-13 03:53:25 +00:00
parent 9e38ee9a76
commit e0e03311a5
2 changed files with 7 additions and 9 deletions

View File

@@ -31,7 +31,7 @@ NMAP_UPDATE_BUILD_DIR = nmap-update-build
NMAP_UPDATE_STAGING_DIR = nmap-update-root
JHBUILD_PREFIX=$(HOME)/gtk/inst
export JHBUILD_PREFIX
JHBUILD_SOURCE=$(HOME)/gtk/source
PREFIX = /usr/local
# Extra distribution file names
@@ -190,7 +190,7 @@ stage-%: export-tarball
rsync -a --files-from "$(JHBUILD_PREFIX)/_jhbuild/manifests/$*" "$(JHBUILD_PREFIX)" $*-root/
stage-zenmap: export-$(ZENMAP_BUILD_DIR)
cd $(ZENMAP_BUILD_DIR)/zenmap && install_scripts/macosx/make-bundle.sh
cd $(ZENMAP_BUILD_DIR)/zenmap && jhbuild run install_scripts/macosx/make-bundle.sh
rm -rf $(ZENMAP_STAGING_DIR)
mkdir -p $(ZENMAP_STAGING_DIR)
cp -rf $(ZENMAP_BUILD_DIR)/zenmap/dist/Zenmap.app $(ZENMAP_STAGING_DIR)

View File

@@ -1,6 +1,8 @@
#!/bin/sh -e
set -x
test "x$UNDER_JHBUILD" = "x" && exit 1
# make-bundle.sh
APP_NAME=Zenmap
ZENMAP_DIST_DIR=$PWD/dist
@@ -21,11 +23,7 @@ echo "Removing old build."
rm -rf "$ZENMAP_DIST_DIR" "$ZENMAP_BUILD_DIR"
echo "Building bundle"
# jhbuild bootstrap
# jhbuild build meta-gtk-osx-bootstrap
# jhbuild build meta-gtk-osx-core
# jhbuild build meta-gtk-osx-python
jhbuild run gtk-mac-bundler "$SCRIPT_DIR/zenmap.bundle"
gtk-mac-bundler "$SCRIPT_DIR/zenmap.bundle"
echo "Stripping unoptimized Python libraries"
#Remove some stuff that is unneeded. This cuts 40M off the installed size.
@@ -45,8 +43,8 @@ find "$BASE/Resources/lib/python2.7" -type f -name '*.pyo' | while read py; do
done
echo "Building using distutils"
jhbuild run python setup.py build --executable "/usr/bin/env python"
jhbuild run python setup.py install vanilla --prefix "$BASE/Resources"
python setup.py build --executable "/usr/bin/env python"
python setup.py install vanilla --prefix "$BASE/Resources"
echo "Renaming main Zenmap executable."
mv $BASE/MacOS/$APP_NAME $BASE/MacOS/zenmap.bin