From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0Ez9CLFZa2CkNwAAgWs5BA (envelope-from ) for ; Mon, 05 Apr 2021 20:40:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AFn0ArFZa2DMPgAA1q6Kng (envelope-from ) for ; Mon, 05 Apr 2021 18:40:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D6E702789B for ; Mon, 5 Apr 2021 20:40:47 +0200 (CEST) Received: from localhost ([::1]:52134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTU9X-0003kd-20 for larch@yhetil.org; Mon, 05 Apr 2021 14:40:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTU7q-00039m-Hn for guix-patches@gnu.org; Mon, 05 Apr 2021 14:39:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55241) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTU7q-0002Qp-4m for guix-patches@gnu.org; Mon, 05 Apr 2021 14:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lTU7q-0001hi-0E for guix-patches@gnu.org; Mon, 05 Apr 2021 14:39:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47604] [PATCH] gnu: Add crm114. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Apr 2021 18:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47604 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47604@debbugs.gnu.org Cc: Arun Isaac X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16176478856474 (code B ref -1); Mon, 05 Apr 2021 18:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Apr 2021 18:38:05 +0000 Received: from localhost ([127.0.0.1]:38554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTU6p-0001g0-0C for submit@debbugs.gnu.org; Mon, 05 Apr 2021 14:38:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:51770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTU6n-0001fs-38 for submit@debbugs.gnu.org; Mon, 05 Apr 2021 14:37:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTU6m-0002uW-Ry for guix-patches@gnu.org; Mon, 05 Apr 2021 14:37:56 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:54482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTU6i-0001uM-TI for guix-patches@gnu.org; Mon, 05 Apr 2021 14:37:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QoVSCi5WE7s+xYyBqzOCqbgtBb9kQiZXLTJNRb9GbRM=; b=Kg3RRoGTpb/P1Qw3n0YPzaONkM oePsdveSKcYg3P8pzyPpCTSmbC4dav4alDE70ldDeFaOhNMxAtXCLHy6Uiu/mWaYFcqitjv1oYVLP SRCErrg5E9SHfvI0qDfjgnrZVsey97+pEciY0eqtH0LPlHyGOm9vL0yVVMFylujUYf4bAL6waE4Lx UPCD4kEePV4AKP5cVfTLosBzGBbu2ciNhZxD2amc8m/PQALf0NT0PdKs/QQUsiCc7/P2WwxEbOGF4 XQsHhIJVTi/9wMuFoteVfVVknC9Z1VbHGYzTeCwVzZwmKaBD8vwRmkK1ckFPg8tzVvGFv5ZViEFff sVsehFww==; Received: from [192.168.2.1] (helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lTU0G-0018qs-7v; Tue, 06 Apr 2021 00:01:12 +0530 From: Arun Isaac Date: Tue, 6 Apr 2021 00:07:40 +0530 Message-Id: <20210405183740.9181-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@systemreboot.net; helo=mugam.systemreboot.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617648048; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=QoVSCi5WE7s+xYyBqzOCqbgtBb9kQiZXLTJNRb9GbRM=; b=m/2xY8v5SlJaH7pyTcMB2A9/OMw35Pdvb0YkhcOoeohNXFYpH4ZLHMIYU5kEwmWZBqA65X /FeQVfTKk2n3OyXtgqp99rYapLhyUMtGih4BKs48lxpLWd/QILT8Z6AuBJsOZS/Lw4wqXz kYa4s0p3/3UzGFCaIJtCSYaDvj0SMMAESqCap872c8Or3kom8udbBhlHYGxGFvUqu+dhj9 lddbqWm4bHgm7qDq/uW17nqNTrASh/k92m0uj2tvDiHl50pYadWtQbk8qJqT53P6KF1MW9 gQf/1r+4usnb2yXMLX093BN/epjU5si8ofFn2jy1TsdT5xSSNHwJpUX5fMU3fA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617648048; a=rsa-sha256; cv=none; b=II3ZhON8loewYoiZTdHY3+US/Ypd+wtbfoDz+KZGofg3YnqUiPl3nMcnRnVwPTnuoyyT9p lCfEF+dk3VpkfIFis0/nZ1Ojxb/xAR92hdcpT3Fz7Z1MV9FknUG7Nq/rtcaDif93Ltcnqf ZLF803Ngoz0PREWysiiPGXOV+kOnE1oXefRhMiihkqO6m7/kpoEo4mEqbT6oQDeVg8YW5S lVrRwPtl4qpM9QJwEmmPQ3TD/+xUbsHrwH1z8BmrA6Ch8IXHCC8Pzlywoc6tFnrctd6/3Y v/65tYRKIJ1L4b9OJluxus/jKTPTpaZoZ33J7LGkE2OQG3cNxXjpKWb0MnKrNA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=Kg3RRoGT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=Kg3RRoGT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: D6E702789B X-Spam-Score: -0.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7uebvRvr7Jzx * gnu/packages/mail.scm (crm114): New variable. --- gnu/packages/mail.scm | 82 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 489053544b..dfc45983df 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2016, 2017 Troy Sankey ;;; Copyright © 2016, 2017, 2018 Nikita ;;; Copyright © 2016 Clément Lassieur -;;; Copyright © 2016, 2017, 2018, 2019, 2020 Arun Isaac +;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Arun Isaac ;;; Copyright © 2016 John Darrington ;;; Copyright © 2016, 2018 Marius Bakke ;;; Copyright © 2017 Thomas Danckaert @@ -129,6 +129,7 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages ragel) + #:use-module (gnu packages regex) #:use-module (gnu packages rdf) #:use-module (gnu packages readline) #:use-module (gnu packages ruby) @@ -4296,3 +4297,82 @@ black lists. Each message is analysed by Rspamd and given a spam score.") (home-page "https://www.rspamd.com/") (license license:asl2.0))) + +(define-public crm114 + (package + (name "crm114") + (version "20100106") + (source + (origin + (method url-fetch) + (uri (string-append "http://crm114.sourceforge.net/tarballs/crm114-" + version "-BlameMichelson.src.tar.gz")) + (sha256 + (base32 + "0awcjc5j2mclkkpbjyijj9mv8xjz3haljvaj0fyc4fm4xir68qpv")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnu-build-system) + ((guix build emacs-build-system) #:prefix emacs:) + (guix build utils) + (ice-9 string-fun)) + #:imported-modules (,@%gnu-build-system-modules + (guix build emacs-build-system) + (guix build emacs-utils)) + #:make-flags (list (string-append "prefix=" %output) + "LDFLAGS=") ; disable static linking + ;; Test suite is not fully automated. It requires a human to read the + ;; results and determine if the tests have passed. + #:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'fix-build + (lambda _ + ;; Inline functions can only be used from the same compilation + ;; unit. This causes the build to fail. + (substitute* "crm_svm_matrix.c" + (("^inline ") "")))) + (add-before 'install 'pre-install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Install maillib.crm library. + (install-file "maillib.crm" (string-append out "/share/crm")) + ;; Set absolute store paths. + (substitute* "mailreaver.crm" + (("insert maillib.crm") + (string-append "insert " out "/share/crm/maillib.crm")) + (("\\\\/bin\\\\/ls") + (string-replace-substring (which "ls") "/" "\\/")) + ((":\\*:trainer_invoke_command:") + (string-append out "/bin/mailtrainer.crm"))) + ;; Install mail related crm scripts. + (for-each (lambda (file) + (install-file file (string-append out "/bin"))) + (list "mailfilter.crm" "mailreaver.crm" "mailtrainer.crm")) + ;; Create emacs site-lisp directory so that the install phase + ;; can install crm-mode. + (mkdir-p (string-append out "/share/emacs/site-lisp"))))) + ;; Run phases from the emacs build system. + (add-after 'install 'make-autoloads + (assoc-ref emacs:%standard-phases 'make-autoloads)) + (add-after 'make-autoloads 'enable-autoloads-compilation + (assoc-ref emacs:%standard-phases 'enable-autoloads-compilation)) + (add-after 'enable-autoloads-compilation 'emacs-build + (assoc-ref emacs:%standard-phases 'build)) + (add-after 'emacs-build 'validate-compiled-autoloads + (assoc-ref emacs:%standard-phases 'validate-compiled-autoloads))))) + (inputs + `(("tre" ,tre))) + (native-inputs + `(("emacs" ,emacs-minimal))) + (home-page "http://crm114.sourceforge.net/") + (synopsis "Controllable regex mutilator") + (description "CRM114 is a system to examine incoming e-mail, system log +streams, data files or other data streams, and to sort, filter, or alter the +incoming files or data streams according to the user's wildest desires. +Criteria for categorization of data can be via a host of methods, including +regexes, approximate regexes, a Hidden Markov Model, Orthogonal Sparse +Bigrams, WINNOW, Correllation, KNN/Hyperspace, or Bit Entropy (or by other +means--it's all programmable).") + (license license:gpl3))) -- 2.31.0