unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Gankevich <igankevich@capybaramail.xyz>
To: 62880@debbugs.gnu.org
Cc: Ivan Gankevich <igankevich@capybaramail.xyz>
Subject: [bug#62880] [PATCH] gnu: Add sipp.
Date: Sun, 16 Apr 2023 11:47:27 +0200	[thread overview]
Message-ID: <20230416094725.30530-1-igankevich@capybaramail.xyz> (raw)

* gnu/packages/telephony.scm (sipp): New variable.
---

Hello.

I've packaged SIPp — a popular SIP benchmarking and load testing tool.

Best regards,
Ivan

 gnu/packages/telephony.scm | 62 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index c921507fd3..f717b100d7 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;; Copyright © 2021 Demis Balbach <db@minikn.xyz>
 ;;; Copyright © 2022 Thomas Albers Raviola <thomas@thomaslabs.org>
+;;; Copyright © 2023 Ivan Gankevich <igankevich@capybaramail.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -70,6 +71,7 @@ (define-module (gnu packages telephony)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linphone)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages netpbm)
@@ -1033,3 +1035,63 @@ (define-public xgoldmon
 @end itemize")
       (home-page "https://github.com/2b-as/xgoldmon")
       (license license:gpl2+))))
+
+(define-public sipp
+  (package
+    (name "sipp")
+    (version "3.7.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/SIPp/sipp")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256 (base32 "0vplccia9zdva1wwny2xgs0b6rzmq4abxvw8lyz61wfw7jjmvin0"))))
+    (build-system cmake-build-system)
+    (arguments
+      `(#:configure-flags
+        (list "-DUSE_GSL=1" "-DUSE_PCAP=1" "-DUSE_SSL=1" "-DUSE_SCTP=1")
+        #:phases
+        (modify-phases %standard-phases
+          ; Here we modify build instructions to use external gtest and gmock.
+          (add-before 'configure 'unbundle-gtest
+            (lambda _
+              (rmdir "gtest")
+              (symlink (assoc-ref %build-inputs "googletest") "gtest")
+              (substitute* "CMakeLists.txt"
+                ((".*gtest-all.*") "")
+                ((".*gmock-all.*") "")
+                (("target_compile_features\\(sipp_unittest" all)
+                 (string-append "target_link_libraries(sipp_unittest gtest gmock)\n"
+                                all)))))
+          ; Here we generate version.h without git.
+          (add-before 'configure 'fix-version
+            (lambda _
+              (copy-file "include/version.h.in" "include/version.h")
+              (substitute* "include/version.h" (("@VERSION@") ,version))
+              (substitute* "CMakeLists.txt" (("find_package\\(Git\\)") ""))))
+          (add-after 'build 'build-tests
+            (lambda* (#:key parallel-build? #:allow-other-keys)
+              (invoke "make"
+                      (string-append
+                        "-j" (if parallel-build?
+                               (number->string (parallel-job-count))
+                               "1"))
+                      "sipp_unittest")))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "./sipp_unittest")))))))
+    (inputs
+      (list ncurses/tinfo libpcap lksctp-tools openssl gsl))
+    (native-inputs
+      (list googletest pkg-config))
+    (synopsis "Performance testing tool for the SIP protocol")
+    (description "SIPp can be used to test many real SIP equipements like SIP proxies,
+B2BUAs, SIP media servers, SIP/x gateways, and SIP PBXes.
+It is also very useful to emulate thousands of user agents calling your SIP system.")
+    (home-page "https://sipp.readthedocs.io/")
+    (license (list license:gpl2+ ; sipp's main license
+                   license:bsd-3 ; send_packets.c, send_packets.h
+                   license:zlib)))) ; md5.c, md5.h
-- 
2.38.0





             reply	other threads:[~2023-04-16 12:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-16  9:47 Ivan Gankevich [this message]
2023-05-03 12:24 ` bug#62880: [PATCH] gnu: Add sipp Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230416094725.30530-1-igankevich@capybaramail.xyz \
    --to=igankevich@capybaramail.xyz \
    --cc=62880@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).