From 45ba24c5efa372e2929abb3eca32c21a84313926 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Mon, 28 Oct 2024 13:04:57 +0800 Subject: [PATCH] adopt to cmake macro change --- wireshark.spec | 62 ++++++++++++++++---------------------------------- 1 file changed, 20 insertions(+), 42 deletions(-) diff --git a/wireshark.spec b/wireshark.spec index d65bd29..e927c9c 100644 --- a/wireshark.spec +++ b/wireshark.spec @@ -1,11 +1,10 @@ %undefine __cmake_in_source_build %global plugins_version 4.2 -%define _lto_cflags %{nil} Summary: Network traffic analyzer Name: wireshark Version: 4.2.8 -Release: 1 +Release: 2 Epoch: 1 License: BSD-1-Clause AND BSD-2-Clause AND BSD-3-Clause AND MIT AND GPL-2.0-or-later AND LGPL-2.0-or-later AND Zlib AND ISC AND (BSD-3-Clause OR GPL-2.0-only) AND (GPL-2.0-or-later AND Zlib) Url: http://www.wireshark.org/ @@ -64,7 +63,6 @@ BuildRequires: qt6-qtsvg-devel BuildRequires: speexdsp-devel BuildRequires: zlib-devel BuildRequires: asciidoctor -Buildrequires: git-core Buildrequires: cmake BuildRequires: systemd-devel BuildRequires: systemd @@ -84,25 +82,22 @@ transferred over HTTP or CIFS, or play back an RTP audio stream. %package devel Summary: Development headers and libraries for wireshark -Requires: %{name} = %{epoch}:%{version}-%{release} glibc-devel glib2-devel +Requires: %{name} = %{epoch}:%{version}-%{release} %description devel The wireshark-devel package contains the header files, developer documentation, and libraries required for development of wireshark scripts and plugins. -%package help -Summary: This package contains help documents -Requires: %{name} = %{epoch}:%{version}-%{release} - -%description help -Files for help with wireshark. +%package_help %prep -%autosetup -S git +%autosetup -p1 -n %{name}-%{version} %build -%cmake -G "Unix Makefiles" \ +%cmake \ + -S. -B%{_vpath_builddir} \ + -G "Unix Makefiles" \ -DDISABLE_WERROR=ON \ -DBUILD_wireshark=ON \ -DENABLE_LUA=OFF \ @@ -117,53 +112,32 @@ Files for help with wireshark. -DBUILD_sdjournal=ON \ %{nil} -%make_build +%cmake_build %install -%make_install +%cmake_install +%cmake_install --component Development -desktop-file-validate %{buildroot}%{_datadir}/applications/org.wireshark.Wireshark.desktop +#install devel files (inspired by debian/wireshark-dev.header-files) install -d -m 0755 %{buildroot}%{_includedir}/wireshark IDIR="%{buildroot}%{_includedir}/wireshark" -mkdir -p "${IDIR}/epan" -mkdir -p "${IDIR}/epan/crypt" -mkdir -p "${IDIR}/epan/ftypes" -mkdir -p "${IDIR}/epan/dfilter" -mkdir -p "${IDIR}/epan/dissectors" -mkdir -p "${IDIR}/wsutil/wmem" -mkdir -p "${IDIR}/wiretap" -mkdir -p "${IDIR}/wsutil" mkdir -p %{buildroot}%{_udevrulesdir} -install -m 644 config.h epan/register.h "${IDIR}/" -install -m 644 cfile.h file.h "${IDIR}/" -install -m 644 epan/*.h "${IDIR}/epan/" -install -m 644 epan/crypt/*.h "${IDIR}/epan/crypt" -install -m 644 epan/ftypes/*.h "${IDIR}/epan/ftypes" -install -m 644 epan/dfilter/*.h "${IDIR}/epan/dfilter" -install -m 644 epan/dissectors/*.h "${IDIR}/epan/dissectors" -install -m 644 wiretap/*.h "${IDIR}/wiretap" -install -m 644 wsutil/*.h "${IDIR}/wsutil" -install -m 644 wsutil/wmem/*.h "${IDIR}/wsutil/wmem" -install -m 644 include/*.h "${IDIR}/" -install -m 644 ws_version.h "${IDIR}/" -install -m 644 %{SOURCE2} %{buildroot}%{_udevrulesdir} -install -Dpm 644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}.conf -touch %{buildroot}%{_bindir}/%{name} -find %{buildroot} -type f -name "*.la" -delete +install -m 644 %{S:2} %{buildroot}%{_udevrulesdir} +install -Dpm 644 %{S:3} %{buildroot}%{_sysusersdir}/%{name}.conf + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/org.wireshark.Wireshark.desktop %pre getent group wireshark >/dev/null || groupadd -r wireshark exit 0 %post -%{?ldconfig} # skip triggering if udevd isn't even accessible, e.g. containers or # rpm-ostree-based systems if [ -S /run/udev/control ]; then /usr/bin/udevadm trigger --subsystem-match=usbmon fi -%ldconfig_postun - %files %{_datadir}/applications/org.wireshark.Wireshark.desktop %{_datadir}/metainfo/*.xml @@ -196,12 +170,16 @@ fi %{_includedir}/wireshark %{_libdir}/lib*.so %{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/cmake/%{name} %files help %doc AUTHORS INSTALL NEWS README* doc/README.* ChangeLog %{_mandir}/man?/* %changelog +* Mon Oct 28 2024 Funda Wang - 1:4.2.8-2 +- adopt to cmake macro change + * Thu Oct 10 2024 zhangxianting - 1:4.2.8-1 - Update to 4.2.8 * CVE-2024-9781: AppleTalk and RELOAD Framing dissector crashes. (issue#20114). -- Gitee