if(HAVE_LIBPYTHON)
set(HAVE_PYTHON 1)
- set(PYTHON_DIR "${CMAKE_INSTALL_PREFIX}/lib/wireshark/python/${VERSION}")
+ set(PYTHON_DIR "${CMAKE_INSTALL_PREFIX}/lib/wireshark/python/${CPACK_PACKAGE_VERSION}")
endif()
if(HAVE_LIBLUA)
set(HAVE_LUA_H 1)
set(INSTALL_FILES
${CMAKE_BINARY_DIR}/AUTHORS-SHORT
COPYING
-# capinfos.html
+ ${CMAKE_BINARY_DIR}/capinfos.html
cfilters
colorfilters
-# console.lua
dfilters
-# dtd_gen.lua
-# dumpcap.html
-# editcap.html
-# idl2wrs.html
-# init.lua
-# ipmap.html
+ ${CMAKE_BINARY_DIR}/dumpcap.html
+ ${CMAKE_BINARY_DIR}/editcap.html
+ ${CMAKE_BINARY_DIR}/idl2wrs.html
+ ipmap.html
manuf
-# mergecap.html
-# rawshark.html
+ ${CMAKE_BINARY_DIR}/mergecap.html
+ ${CMAKE_BINARY_DIR}/rawshark.html
services
smi_modules
-# text2pcap.html
-# tshark.html
-# wireshark-filter.html
-# wireshark.html
-# ws.css
+ ${CMAKE_BINARY_DIR}/text2pcap.html
+ ${CMAKE_BINARY_DIR}/tshark.html
+ ${CMAKE_BINARY_DIR}/wireshark-filter.html
+ ${CMAKE_BINARY_DIR}/wireshark.html
+ docbook/ws.css
)
set(LIBEPAN_LIBS
${CMAKE_SOURCE_DIR}/AUTHORS
)
+ADD_CUSTOM_COMMAND(
+ OUTPUT AUTHORS-SHORT-FORMAT
+ wireshark.pod
+ COMMAND ${PERL}
+ ${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
+ ${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl
+ < AUTHORS-SHORT
+ > AUTHORS-SHORT-FORMAT
+ COMMAND cat
+ ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
+ AUTHORS-SHORT-FORMAT
+ > wireshark.pod
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
+ ${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl
+ AUTHORS-SHORT
+ ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
+)
+
+ADD_CUSTOM_COMMAND(
+ OUTPUT wireshark-filter.pod
+ COMMAND tshark
+ -G fields |
+ ${PERL}
+ ${CMAKE_SOURCE_DIR}/doc/dfilter2pod.pl
+ ${CMAKE_SOURCE_DIR}/doc/wireshark-filter.pod.template
+ > wireshark-filter.pod
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/doc/dfilter2pod.pl
+ ${CMAKE_SOURCE_DIR}/doc/wireshark-filter.pod.template
+ tshark
+)
+
+find_package(POD)
+
+pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/capinfos 1 )
+pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/dumpcap 1 )
+pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/editcap 1 )
+pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/idl2wrs 1 )
+pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/mergecap 1 )
+pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/rawshark 1 )
+pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/text2pcap 1 )
+pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/tshark 1 )
+pod2manhtml( wireshark 1 )
+pod2manhtml( wireshark-filter 4 )
+
add_custom_target(
auxiliary ALL
DEPENDS
AUTHORS-SHORT
- # todo: Add manpages and onlinedocs and generate them
+ capinfos.html
+ dumpcap.html
+ editcap.html
+ idl2wrs.html
+ mergecap.html
+ rawshark.html
+ text2pcap.html
+ tshark.html
+ wireshark.html
+ wireshark-filter.html
+)
+
+set(MAN1_FILES
+ ${CMAKE_BINARY_DIR}/capinfos.1
+ ${CMAKE_BINARY_DIR}/dumpcap.1
+ ${CMAKE_BINARY_DIR}/editcap.1
+ ${CMAKE_BINARY_DIR}/idl2wrs.1
+ ${CMAKE_BINARY_DIR}/mergecap.1
+ ${CMAKE_BINARY_DIR}/rawshark.1
+ ${CMAKE_BINARY_DIR}/text2pcap.1
+ ${CMAKE_BINARY_DIR}/tshark.1
+ ${CMAKE_BINARY_DIR}/wireshark.1
+)
+
+set(MAN4_FILES
+ ${CMAKE_BINARY_DIR}/wireshark-filter.4
)
set(CLEAN_FILES
${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}
)
+install(
+ FILES
+ ${MAN1_FILES}
+ DESTINATION
+ ${CMAKE_INSTALL_MANDIR}/man1
+)
+
+install(
+ FILES
+ ${MAN4_FILES}
+ DESTINATION
+ ${CMAKE_INSTALL_MANDIR}/man4
+)
+
install(
DIRECTORY
${INSTALL_DIRS}
SET(CMAKE_INSTALL_SYSCONFDIR_DOC "read-only single-machine data [PREFIX/etc]")
SET(CMAKE_INSTALL_LOCALSTATEDIR_DOC "modifiable single-machine data [PREFIX/var]")
SET(CMAKE_INSTALL_LIBDIR_DOC "object code libraries [PREFIX/lib]")
-SET(CMAKE_INSTALL_MANDIR_DOC "man documentation [PREFIX/man]")
+SET(CMAKE_INSTALL_MANDIR_DOC "man documentation [PREFIX/share/man]")
#Special case for /etc and /var when prefix is /usr
IF(${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
CACHE PATH ${CMAKE_INSTALL_LOCALSTATEDIR_DOC})
SET(CMAKE_INSTALL_LIBDIR "lib"
CACHE PATH ${CMAKE_INSTALL_LIBDIR_DOC})
-SET(CMAKE_INSTALL_MANDIR "man"
+SET(CMAKE_INSTALL_MANDIR "share/man"
CACHE PATH ${CMAKE_INSTALL_MANDIR_DOC})
--- /dev/null
+#
+# $Id$
+#
+# - Find unix commands from cygwin
+# This module looks for some usual Unix commands.
+#
+
+INCLUDE(FindCygwin)
+
+FIND_PROGRAM(POD2MAN_EXECUTABLE
+ NAMES
+ pod2man
+ PATHS
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+
+MARK_AS_ADVANCED(POD2MAN_EXECUTABLE)
+
+# search pod2man
+MACRO(FIND_POD2MAN)
+ IF(NOT POD2MAN_EXECUTABLE)
+ FIND_PROGRAM(POD2MAN_EXECUTABLE pod2man)
+ IF (NOT POD2MAN_EXECUTABLE)
+ MESSAGE(FATAL_ERROR "pod2man not found - aborting")
+ ENDIF (NOT POD2MAN_EXECUTABLE)
+ ENDIF(NOT POD2MAN_EXECUTABLE)
+ENDMACRO(FIND_POD2MAN)
+
+FIND_PROGRAM(POD2HTML_EXECUTABLE
+ NAMES
+ pod2html
+ PATHS
+ ${CYGWIN_INSTALL_PATH}/bin
+ /bin
+ /usr/bin
+ /usr/local/bin
+ /sbin
+)
+
+MARK_AS_ADVANCED(POD2HTML_EXECUTABLE)
+
+# search pod2html
+MACRO(FIND_POD2HTML)
+ IF(NOT POD2HTML_EXECUTABLE)
+ FIND_PROGRAM(POD2HTML_EXECUTABLE pod2html)
+ IF (NOT POD2HTML_EXECUTABLE)
+ MESSAGE(FATAL_ERROR "pod2html not found - aborting")
+ ENDIF (NOT POD2HTML_EXECUTABLE)
+ ENDIF(NOT POD2HTML_EXECUTABLE)
+ENDMACRO(FIND_POD2HTML)
+
+# run pod2man and pod2html
+MACRO(pod2manhtml _sourcefile _manext)
+ GET_FILENAME_COMPONENT(_basefile ${_sourcefile} NAME)
+ set(_outman ${_basefile}.${_manext})
+ set(_outhtml ${_basefile}.html)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT
+ ${_outman}
+ ${_outhtml}
+ COMMAND
+ ${POD2MAN_EXECUTABLE}
+ --section=${_manext}
+ --center="The Wireshark Network Analyzer"
+ --release=${CPACK_PACKAGE_VERSION}
+ ${_sourcefile}.pod
+ > ${_outman}
+ COMMAND
+ ${POD2HTML_EXECUTABLE}
+ --title="${_basefile} - The Wireshark Network Analyzer ${CPACK_PACKAGE_VERSION}"
+ --css=${CMAKE_SOURCE_DIR}/docbook/ws.css
+ --noindex
+ ${_sourcefile}.pod
+ > ${_outhtml}
+ DEPENDS
+ ${_sourcefile}.pod
+ ${CMAKE_SOURCE_DIR}/docbook/ws.css
+
+ )
+ENDMACRO(pod2manhtml)
+