nmap-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. %bcond_with gtk2
  2. Summary: Network exploration tool and security scanner
  3. Summary(ja): 多機能なポートスキャナー
  4. Name: nmap
  5. Version: 7.92
  6. Release: 1%{?_dist_release}
  7. Group: network
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: GPL
  11. URL: https://nmap.org/
  12. Source0: https://nmap.org/dist/%{name}-%{version}.tar.bz2
  13. #Source1: zenmap.desktop
  14. # Patches from Fedora rawhide
  15. #prevent possible race condition for shtool, rhbz#158996
  16. Patch1: nmap-4.03-mktemp.patch
  17. #don't suggest to scan microsoft
  18. Patch2: nmap-4.52-noms.patch
  19. # upstream provided patch for rhbz#845005, not yet in upstream repository
  20. Patch3: ncat_reg_stdin.diff
  21. Patch4: nmap-6.25-displayerror.patch
  22. # https://github.com/nmap/nmap/pull/2247
  23. Patch7: nmap_resolve_config.patch
  24. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  25. BuildRequires: libpcap-devel
  26. BuildRequires: libssh2-devel
  27. BuildRequires: lua-devel
  28. BuildRequires: openssl-devel
  29. BuildRequires: pcre-devel
  30. BuildRequires: zlib-devel
  31. %if %{with gtk2}
  32. BuildRequires: python-devel
  33. BuildRequires: pygtk2-devel
  34. %else
  35. Obsoletes: nmap-frontend < 7.92
  36. %endif
  37. %description
  38. Nmap is a utility for network exploration or security auditing. It
  39. supports ping scanning (determine which hosts are up), many port
  40. scanning techniques (determine what services the hosts are offering),
  41. and TCP/IP fingerprinting (remote host operating system
  42. identification). Nmap also offers flexible target and port
  43. specification, decoy scanning, determination of TCP sequence
  44. predictability characteristics, sunRPC scanning, reverse-identd
  45. scanning, and more.
  46. %description -l ja
  47. Nmap はネットワークの調査やセキュリティ診断を行うユーティリティです。
  48. ping によるスキャン(どのホストが稼働中かの調査)、様々なポートスキャン
  49. 技術(そのホストがどのサービスを提供しているかの調査)や、TCP/IP 指紋
  50. の検査(そのホストの OS を特定)をサポートしています。Nmap は調査対象や
  51. ポートを柔軟に設計することもでき、おとりスキャン、TCP シーケンスの
  52. 予測可能な性質の測定、Sun RPC スキャン、逆 identd スキャンなどの
  53. 機能も提供します。
  54. %if %{with gtk2}
  55. %package frontend
  56. Summary: Gtk+ frontend for nmap
  57. Summary(ja): Nmap の GTK+ フロントエンド
  58. Group: Applications/System
  59. Requires: nmap = %{version}-%{release}
  60. Requires: python pygtk2 pysqlite
  61. Provides: zenmap = %{version}-%{release}
  62. %description frontend
  63. This package includes zenmap, a GTK+ frontend for nmap. The nmap package must
  64. be installed before installing nmap-frontend.
  65. %description frontend -l ja
  66. Nmap の GTK+ ベースのフロントエンド(zenmap)です。このパッケージをインストール
  67. する前に、nmap パッケージをインストールする必要があります。
  68. %endif
  69. %debug_package
  70. %prep
  71. %setup -q
  72. %autopatch -p1
  73. #be sure we're not using tarballed copies of some libraries
  74. #rm -rf liblua libpcap libpcre macosx mswin32 ###TODO###
  75. rm -rf libpcap libpcre macosx mswin32 libssh2 libz
  76. %build
  77. export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
  78. export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
  79. %configure \
  80. --without-zenmap \
  81. --without-ndiff \
  82. --with-libpcap=yes \
  83. --with-liblua=included \
  84. --with-libssh2=yes \
  85. --enable-dbus
  86. %make_build
  87. %install
  88. rm -rf $RPM_BUILD_ROOT
  89. make install DESTDIR=$RPM_BUILD_ROOT STRIP=true
  90. rm -f $RPM_BUILD_ROOT%{_bindir}/uninstall_ndiff
  91. #do not include certificate bundle (#734389)
  92. rm -f %{buildroot}%{_datadir}/ncat/ca-bundle.crt
  93. rmdir %{buildroot}%{_datadir}/ncat
  94. #we provide 'nc' replacement (#1653119)
  95. touch %{buildroot}%{_mandir}/man1/nc.1.gz
  96. touch %{buildroot}%{_bindir}/nc
  97. %if %{with gtk2}
  98. rm -f $RPM_BUILD_ROOT%{_bindir}/uninstall_zenmap
  99. cp docs/zenmap.1 $RPM_BUILD_ROOT%{_mandir}/man1/
  100. gzip $RPM_BUILD_ROOT%{_mandir}/man1/* || :
  101. pushd $RPM_BUILD_ROOT%{_mandir}/man1
  102. ln -s zenmap.1.gz nmapfe.1.gz
  103. ln -s zenmap.1.gz xnmap.1.gz
  104. popd
  105. #desktop-file-install --vendor= \
  106. # --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  107. # %{SOURCE1};
  108. rm -f $RPM_BUILD_ROOT%{_datadir}/applications/zenmap-root.desktop
  109. %endif
  110. %find_lang %{name} --with-man
  111. %clean
  112. rm -rf %{buildroot}
  113. %post
  114. %{_sbindir}/alternatives --install %{_bindir}/nc nc %{_bindir}/ncat 10 \
  115. --slave %{_mandir}/man1/nc.1.gz nc-man %{_mandir}/man1/ncat.1.gz
  116. %preun
  117. if [ $1 -eq 0 ]; then
  118. %{_sbindir}/alternatives --remove nc %{_bindir}/ncat
  119. fi
  120. %files -f %{name}.lang
  121. %defattr(-,root,root)
  122. %license LICENSE
  123. %doc CHANGELOG README.md
  124. %doc docs/nmap.usage.txt docs/nmap.dtd
  125. %{_bindir}/nmap
  126. %{_bindir}/ncat
  127. %{_bindir}/nping
  128. %{_datadir}/nmap
  129. %{_mandir}/man1/nmap.1*
  130. %{_mandir}/man1/ncat.1*
  131. %{_mandir}/man1/nping.1*
  132. %ghost %{_bindir}/nc
  133. %ghost %{_mandir}/man1/nc.1.gz
  134. %if %{with gtk2}
  135. %files frontend
  136. %defattr(-,root,root)
  137. %{_bindir}/nmapfe
  138. %{_bindir}/xnmap
  139. %{_bindir}/zenmap
  140. %{python_sitelib}/*
  141. %{_datadir}/applications/*.desktop
  142. #%{_datadir}/icons/*
  143. #%{_datadir}/pixmaps/zenmap
  144. %{_datadir}/zenmap
  145. %{_mandir}/man1/zenmap.1*
  146. %{_mandir}/man1/nmapfe.1*
  147. %{_mandir}/man1/xnmap.1*
  148. %endif
  149. %changelog
  150. * Wed Oct 27 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.92-1
  151. - new upstream release.
  152. - built with openssl-3.0.0.
  153. * Thu Apr 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.80-1
  154. - new upstream release.
  155. * Sat Nov 17 2018 Toshiaki Ara <ara_t@384.jp> 7.70-1
  156. - update to 7.70
  157. - add Patches from Fedora rawhide
  158. * Sat Jul 02 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.12-2
  159. - rebuild with gcc-5.4.0
  160. * Thu Mar 31 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.12-1
  161. - new upstream release
  162. * Tue Mar 29 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.11-1
  163. - new upstream release
  164. * Thu Dec 17 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.01-1
  165. - new upstream release
  166. * Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.47-1
  167. - new upstream release
  168. * Mon Jan 07 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.25-1
  169. - new upstream release
  170. * Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.01-2
  171. - rebuild with pcre-8.31
  172. * Sun Oct 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 6.01-1
  173. - new upstream release
  174. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.51-2
  175. - new upstream release
  176. * Mon Feb 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.51-1
  177. - new upstream release
  178. * Sat Jan 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.50-1
  179. - new upstream release
  180. - fix %files to add nping
  181. * Fri Jun 11 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.21-1
  182. - new upstream release
  183. - add BuildRequires: openssl-devel, lua-devel
  184. - fix %files to add ncat and ndiff
  185. * Fri Apr 24 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.76-1
  186. - new upstream release
  187. - spec in UTF-8
  188. - added BuildRequires: libpcap-devel instead of libpcap
  189. - removed BuildRequires: desktop-file-utils
  190. * Sat Nov 01 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.60-4
  191. - rebuilt with libpcap 1.0.0
  192. * Sun Jul 20 2008 Shu KONNO <owa@bg.wakwak.com> 4.60-3
  193. - rebuilt with python-2.5.2
  194. * Mon Apr 28 2008 NAKAMURA Kenta <kenta@vinelinux.org> 4.60-2
  195. - updated python sitelib files path
  196. * Sat Apr 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.60-1vl5
  197. - new upstream release
  198. * Tue May 15 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 4.20-0vl1
  199. - new upstream release
  200. - rebuild with new environment/toolchain
  201. * Sat Jun 17 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.10-0vl1
  202. - new upstream release
  203. - added BuildRequires: desktop-file-utils
  204. * Sat Feb 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.01-0vl1
  205. - new upstream release
  206. * Sun Sep 18 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.93-0vl2
  207. - rebuild for VineSeed Plus
  208. * Sun Sep 18 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.93-0vl1
  209. - new upstream release
  210. * Fri Feb 18 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.81-0vl1
  211. - new upstream release
  212. * Sun Oct 24 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.75-0vl1
  213. - new upstream release
  214. - added Japanese summary to nmap-frontend
  215. * Thu Sep 23 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.70-0vl1
  216. - new upstream release
  217. * Sat Mar 27 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.50-0vl2
  218. - rebuild with new openssl
  219. * Tue Mar 16 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.50-0vl1
  220. - new upstream release
  221. * Fri Oct 17 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.48-0vl1
  222. - new upstream release
  223. * Thu Sep 18 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.45-0vl1
  224. - new upstream release
  225. * Sun Jul 20 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.30-0vl1
  226. - new upstream release
  227. * Tue May 20 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.27-0vl2
  228. - merged Vine Plus specfile and VineSeed Plus specfile (sorry...)
  229. * Sat May 3 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.27-0vl1
  230. - new upstream release
  231. - rebuild with new toolchains
  232. * Sun Sep 22 2002 Masaru Sato <masachan@mediaship.ne.jp> 3.00-0vl1
  233. - new upstream release
  234. - delete Version Tag from nmap-frontend package
  235. - fix BuildRoot
  236. * Sun May 26 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 2.54BETA34-0vl1
  237. - new upstream release
  238. - 2.54BETA is developpment release, but it is more stable than 2.53.
  239. * Fri Mar 08 2002 Toru Sagami <sagami@vinelinux.org> 2.53-1vl2
  240. - unfortunately increase release: 1vl2 from 0vl2
  241. ( 2.53-1vl1 is found in VinePlus/2.1, also breaking our packaging rule)
  242. - patch to build on current glibc22 system
  243. * Thu Sep 06 2001 Toru Sagami <sagami@vinelinux.org>
  244. - 2.53-0vl2: use better macros
  245. * Thu Sep 21 2000 Yoshihiro Kajiki <kajiki@ylug.org>
  246. - rebuild for VineSeed based on the original site's srpm
  247. - add Japanese summary and description
  248. * Thu Dec 30 1999 Fyodor <fyodor@insecure.org>
  249. - Updated description
  250. - Eliminated source1 (nmapfe.desktop) directive and simply packaged it with Nmap
  251. - Fixed nmap distribution URL (source0)
  252. - Added this .rpm to base Nmap distribution
  253. * Mon Dec 13 1999 Tim Powers <timp@redhat.com>
  254. - based on origional spec file from
  255. http://www.insecure.org/nmap/index.html#download
  256. - general cleanups, removed lots of commenrts since it made the spec hard to
  257. read
  258. - changed group to Applications/System
  259. - quiet setup
  260. - no need to create dirs in the install section, "make
  261. prefix=$RPM_BUILD_ROOT&{prefix} install" does this.
  262. - using defined %{prefix}, %{version} etc. for easier/quicker maint.
  263. - added docs
  264. - gzip man pages
  265. - strip after files have been installed into buildroot
  266. - created separate package for the frontend so that Gtk+ isn't needed for the
  267. CLI nmap
  268. - not using -f in files section anymore, no need for it since there aren't that
  269. many files/dirs
  270. - added desktop entry for gnome
  271. * Sun Jan 10 1999 Fyodor <fyodor@dhp.com>
  272. - Merged in spec file sent in by Ian Macdonald <ianmacd@xs4all.nl>
  273. * Tue Dec 29 1998 Fyodor <fyodor@dhp.com>
  274. - Made some changes, and merged in another .spec file sent in
  275. by Oren Tirosh <oren@hishome.net>
  276. * Mon Dec 21 1998 Riku Meskanen <mesrik@cc.jyu.fi>
  277. - initial build for RH 5.x