From 34bd5a5d725aca50ff4f864a8c4eba14a9a91924 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Wed, 23 Dec 2015 20:13:40 +0100 Subject: [PATCH] - added pythondir patch (pass --purelib to setup.py invocations to use appropriate purelib dir for /usr prefix --- nmap-pythondir.patch | 20 ++++++++++++++++++++ nmap.spec | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 nmap-pythondir.patch diff --git a/nmap-pythondir.patch b/nmap-pythondir.patch new file mode 100644 index 0000000..0da59d9 --- /dev/null +++ b/nmap-pythondir.patch @@ -0,0 +1,20 @@ +--- nmap-7.01/Makefile.in.orig 2015-12-08 21:54:07.000000000 +0100 ++++ nmap-7.01/Makefile.in 2015-12-23 18:21:13.149204287 +0100 +@@ -345,7 +345,7 @@ + + install-zenmap: $(ZENMAPDIR)/setup.py + $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 +- cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --force $(if $(DESTDIR),--root "$(DESTDIR)") ++ cd $(ZENMAPDIR) && $(PYTHON) setup.py --quiet install --prefix "$(prefix)" --install-purelib=@pythondir@ --force $(if $(DESTDIR),--root "$(DESTDIR)") + $(INSTALL) -c -m 644 docs/zenmap.1 $(DESTDIR)$(mandir)/man1/ + # Create a symlink from nmapfe to zenmap if nmapfe doesn't exist or is + # already a link. +@@ -362,7 +362,7 @@ + @cd $(NPINGDIR) && $(MAKE) + + install-ndiff: +- cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" $(if $(DESTDIR),--root "$(DESTDIR)") ++ cd $(NDIFFDIR) && $(PYTHON) setup.py install --prefix "$(prefix)" --install-purelib=@pythondir@ $(if $(DESTDIR),--root "$(DESTDIR)") + + NSE_FILES = scripts/script.db scripts/*.nse + NSE_LIB_LUA_FILES = nselib/*.lua nselib/*.luadoc diff --git a/nmap.spec b/nmap.spec index 140a580..b7743a6 100644 --- a/nmap.spec +++ b/nmap.spec @@ -23,6 +23,7 @@ Patch1: %{name}-system-lua.patch Patch2: %{name}-system-dnet.patch Patch3: %{name}-desktop.patch Patch4: ncat-system-ssl.patch +Patch5: %{name}-pythondir.patch URL: http://nmap.org/ BuildRequires: autoconf >= 2.50 BuildRequires: automake @@ -149,6 +150,7 @@ zastosowań. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build ln -s config/acinclude.m4 libdnet-stripped -- 2.44.0