CMake: Update package target names.

Rename the rpm-package target to wireshark_rpm and the appimage target
to wireshark_appimage.
This commit is contained in:
Gerald Combs 2022-06-08 09:29:59 -07:00 committed by A Wireshark GitLab Utility
parent c253dda269
commit de1a4c3774
5 changed files with 34 additions and 25 deletions

View File

@ -243,7 +243,7 @@ Fedora RPM Package:
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
- cmake3 -GNinja ..
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
- ninja rpm-package
- ninja wireshark_rpm
# Fedora RPM Test:
# extends: .test-rpm
# image: fedora
@ -259,7 +259,7 @@ openSUSE 15.3 RPM Package:
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
- cmake -GNinja ..
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
- ninja rpm-package
- ninja wireshark_rpm
openSUSE 15.3 RPM Test:
extends: .test-rpm
image: registry.gitlab.com/wireshark/wireshark-containers/opensuse-15.3-dev
@ -275,7 +275,7 @@ Rocky Linux 8 RPM Package:
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
- cmake -GNinja ..
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
- ninja-build rpm-package
- ninja-build wireshark_rpm
Rocky Linux 8 RPM Test:
extends: .test-rpm
image: registry.gitlab.com/wireshark/wireshark-containers/rockylinux-8-dev

View File

@ -3546,7 +3546,7 @@ if(RPMBUILD_EXECUTABLE)
COMMAND cp ${CMAKE_BINARY_DIR}/wireshark*tar* ${CMAKE_BINARY_DIR}/packaging/rpm/SOURCES/
DEPENDS dist
)
add_custom_target(rpm-package
add_custom_target(wireshark_rpm
COMMAND ${RPMBUILD_EXECUTABLE}
--define "_topdir ${CMAKE_BINARY_DIR}/packaging/rpm"
--define "_prefix ${CMAKE_INSTALL_PREFIX}"
@ -3564,20 +3564,20 @@ if(LINUXDEPLOYQT_EXECUTABLE AND APPIMAGETOOL_EXECUTABLE)
# CMAKE_INSTALL_PREFIX=/usr. I (gcc) also had to set
# CMAKE_INSTALL_LIBDIR=/usr/lib.
if (CMAKE_BUILD_TYPE STREQUAL "Release" AND CMAKE_INSTALL_PREFIX STREQUAL "/usr" AND CMAKE_INSTALL_LIBDIR STREQUAL "/usr/lib" )
add_custom_target(appimage-prerequisites)
add_dependencies(appimage-prerequisites ${PROGLIST})
add_custom_target(wireshark_appimage_prerequisites)
add_dependencies(wireshark_appimage_prerequisites ${PROGLIST})
else()
add_custom_target(appimage-prerequisites
add_custom_target(wireshark_appimage_prerequisites
COMMAND echo "CMAKE_BUILD_TYPE isn't Release or CMAKE_INSTALL_PREFIX isn't /usr or CMAKE_INSTALL_LIBDIR isn't /usr/lib."
COMMAND false
)
endif()
set (_ai_appdir "${CMAKE_BINARY_DIR}/packaging/appimage/appdir")
add_custom_target(appimage-appdir
add_custom_target(wireshark_appimage_appdir
COMMAND ${CMAKE_COMMAND} -E make_directory "${_ai_appdir}"
COMMAND env DESTDIR=${_ai_appdir}
${CMAKE_COMMAND} --build . --target install
DEPENDS appimage-prerequisites
DEPENDS wireshark_appimage_prerequisites
)
set(_exe_args)
foreach(_prog ${PROGLIST})
@ -3589,7 +3589,7 @@ if(LINUXDEPLOYQT_EXECUTABLE AND APPIMAGETOOL_EXECUTABLE)
# When that's fixed we will no longer need appimagetool. Until
# then, we need to prep and package in two steps:
# https://github.com/probonopd/linuxdeployqt/wiki/Custom-wrapper-script-instead-of-AppRun
add_custom_target(appimage-prep
add_custom_target(wireshark_appimage_prep
COMMAND ${LINUXDEPLOYQT_EXECUTABLE}
"${_ai_appdir}/usr/share/applications/org.wireshark.Wireshark.desktop"
${_exe_args}
@ -3597,12 +3597,12 @@ if(LINUXDEPLOYQT_EXECUTABLE AND APPIMAGETOOL_EXECUTABLE)
COMMAND install
"${CMAKE_SOURCE_DIR}/packaging/appimage/AppRun"
"${_ai_appdir}/AppRun"
DEPENDS appimage-appdir
DEPENDS wireshark_appimage_appdir
)
add_custom_target(appimage
add_custom_target(wireshark_appimage
COMMAND env VERSION=${PROJECT_VERSION} ${APPIMAGETOOL_EXECUTABLE} appdir
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/packaging/appimage"
DEPENDS appimage-prep
DEPENDS wireshark_appimage_prep
)
endif()

View File

@ -179,11 +179,11 @@ README.windows for those instructions.
11./a. Run 'make install'. If you're running a system that supports
the RPM packaging systems you can run
make rpm-package
make wireshark_rpm
or
ninja rpm-package
ninja wireshark_rpm
to make an installable package for your system. The installation path
defaults to /usr/local, so you'll probably want to pass

View File

@ -156,15 +156,24 @@ the file _docbook/README.adoc_ in the Wireshark sources.
==== Optional: Create an installable or source code package
To create a source code tarball, build the `dist` target.
You can create packages using the following build targets and commands:
To create an installable package after successfully building Wireshark:
Source code tarball::
Build the `dist` target.
* To build a Debian package, build the `deb-package` target;
* To build an RPM package, build the `rpm-package` target;
* To build an https://appimage.org[AppImage] package, build the
`appimage` target;
* To build a macOS dmg package containing an application bundle, build the `wireshark_dmg` or `logwolf_dmg` targets.
deb (Debian) package::
Create a symlink in the top-level source directory to _packaging/debian_, then run `dpkg-buildpackage`.
RPM package::
Build the `wireshark_rpm` target.
https://appimage.org[AppImage] package::
Build the `wireshark_appimage` target.
macOS .dmg package containing an application bundle::
Build the `wireshark_dmg` or `logwolf_dmg` targets.
Installable packages typically require building Wireshark first.
==== Troubleshooting during the build and install on Unix

View File

@ -940,7 +940,7 @@ to build the Debian Package.
==== Red Hat: .rpm Packages
You can build an RPM package using the `rpm-package` target. If you
You can build an RPM package using the `wireshark_rpm` target. If you
are building from a git checkout, the package version is derived from
the current git HEAD. If you are building from source extracted from a
tarball created with `git archive` (such as those downloaded from
@ -972,9 +972,9 @@ In your build directory, type:
[source,sh]
----
ninja rpm-package
ninja wireshark_rpm
# ...or, if you're using GNU make...
make rpm-package
make wireshark_rpm
----
to build the binary and source RPMs. When it is finished there will be a