🔒 Repository is read-only – file editing is disabled.

recipes/gui/wireshark/PAGBUILD.yaml main

60 linii Raw ← Powrót
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
pkgname: wireshark
pkgver: '4.7.2'
pkgrel: '1'
pkgdesc: Network Sniffer with nice GUI
url: 'https://www.wireshark.org'
arch: x86_64
depends:
- shared-mime-info
- hicolor-icon-theme
makedepends:
- cmake
- c-ares
- ninja
- shared-mime-info
- gtk3
- libpcap
- pcre
- hicolor-icon-theme
- qt6-tools
- qt6-multimedia
- qt6-svg
- qt6-5compat
source:
- 'https://www.wireshark.org/download/src/all-versions/wireshark-${pkgver}.tar.xz'
sha256sums:
- f94df4731d9fcb86240950fde44b3db52ffdd04e918b558e613891d0b578dadc
hooks:
  post-install: "name=wireshark\nversion=4.7.2\nrelease=1\n#!/bin/sh\n#\n# Add your users to the wireshark group and allow\
    \ them to capture network data\n# as non-root users.\n#\n\n# ugly hack to test for support for capabilities\nINFO=\"\\\
    033[1;36m\"\nNORMAL=\"\\033[0;39m\"\nif ! (getent group wireshark > /dev/null); then\n    printf \"${INFO}Creating wireshark\
    \ group${NORMAL}\\n\"\n    groupadd -g 62 wireshark\nfi\nif ! setfattr -n user.xattr_test usr/bin/dumpcap 2> /dev/null;\
    \ then\n  echo capabilities not supported on this system\n  echo capturing with wireshark will require root privileges\n\
    \  exit 0\nfi\n\nsetfattr -x user.xattr_test usr/bin/dumpcap \n\nchgrp wireshark usr/bin/dumpcap\nchmod 754 usr/bin/dumpcap\n\
    usr/bin/setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' usr/bin/dumpcap\n"
build: |
  getent group wireshark ||groupadd -g 62 wireshark
  cd ${pkgname}-${pkgver}

  mkdir build
  cd    build
  cmake  -DCMAKE_INSTALL_PREFIX=/usr \
         -DCMAKE_BUILD_TYPE=Release \
         -DMAKE_INSTALL_DOCDIR=/usr/share/doc/${pkgname} \
         -G Ninja ..

  ninja
  DESTDIR=${PKGDIR} ninja install

  install -v -m755 -d ${PKGDIR}/usr/share/doc/${pkgname}
  install -v -m644    ../README.linux ../doc/README.* ../doc/randpkt.txt \
                      ${PKGDIR}/usr/share/doc/${pkgname}

  pushd ${PKGDIR}/usr/share/doc/${pkgname}
     for FILENAME in ../../wireshark/*.html; do
         ln -s -v -f $FILENAME .
     done
  popd
  unset FILENAME
package: |
  true