1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

www/dmarcts-report-viewer: Add new port

A PHP viewer for DMARC records that have been parsed by John
Levine's rddmarc script or the dmarcts-report-parser.pl into
a MySQL or PostgreSQL database.

Reviewed by:	hrs (mentor)
Approved by:	hrs (mentor)
This commit is contained in:
Norikatsu Shigemura 2024-02-06 23:58:55 +09:00
parent 5d6cd5d24b
commit 0a8ad0114d
No known key found for this signature in database
GPG Key ID: 2D010D1315CC541F
10 changed files with 129 additions and 0 deletions

View File

@ -138,6 +138,7 @@
SUBDIR += devd
SUBDIR += dezoomify-rs
SUBDIR += dillo2
SUBDIR += dmarcts-report-viewer
SUBDIR += dojo
SUBDIR += dokuwiki
SUBDIR += dolibarr

View File

@ -0,0 +1,51 @@
PORTNAME= dmarcts-report-viewer
PORTVERSION= 2.0.0.20230615.${GH_TAGNAME}
CATEGORIES= www mail
PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= nork@FreeBSD.org
COMMENT= PHP viewer for DMARC records
WWW= https://www.techsneeze.com/dmarc-report/
LICENSE= BSD3CLAUSE GPLv3
LICENSE_COMB= multi
LICENSE_FILE_GPLv3= ${WRKSRC}/LICENSE
LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/highlight.js/LICENSE
USES= php
USE_PHP= dom pdo xml
USE_GITHUB= yes
GH_ACCOUNT= techsneeze
GH_TAGNAME= 4730985
NO_ARCH= yes
NO_BUILD= yes
PLIST_SUB= PORTNAME=${PORTNAME}
ETCDIR= ${PREFIX}/etc
OPTIONS_DEFINE= MYSQL PGSQL
OPTIONS_DEFAULT= MYSQL PGSQL
MYSQL_USE= PHP=pdo_mysql
PGSQL_USE= PHP=pdo_pgsql
post-patch:
cd ${PATCH_WRKSRC} && ${REINPLACE_CMD} \
-e 's|%%ETCDIR%%|${ETCDIR}|' \
-e 's|%%PORTNAME%%|${PORTNAME}|' \
dmarcts-report-viewer-common.php \
dmarcts-report-viewer-options.php \
dmarcts-report-viewer-report-data.php \
dmarcts-report-viewer-report-list.php \
dmarcts-report-viewer.php
pre-install:
@${MKDIR} ${STAGEDIR}${WWWDIR}/highlight.js/styles
do-install:
${INSTALL_DATA} /dev/null ${STAGEDIR}${WWWDIR}/index.html
cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR} \
"-name *\.js -o -name *\.css -o -name *\.png -o -name *\.php"
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-config.php.sample ${STAGEDIR}${ETCDIR}
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1704737908
SHA256 (dmarcts-report-viewer/techsneeze-dmarcts-report-viewer-2.0.0.20230615.4730985-4730985_GH0.tar.gz) = 55a6563f5fe06616a16a2415d432c7ca9546e96017ae63d0df0963697be14033
SIZE (dmarcts-report-viewer/techsneeze-dmarcts-report-viewer-2.0.0.20230615.4730985-4730985_GH0.tar.gz) = 82271

View File

@ -0,0 +1,11 @@
--- dmarcts-report-viewer-common.php.orig 2023-07-15 05:56:09 UTC
+++ dmarcts-report-viewer-common.php
@@ -251,7 +251,7 @@ function main() {
function main() {
- include "dmarcts-report-viewer-config.php";
+ include "%%ETCDIR%%/%%PORTNAME%%-config.php";
}
// This function sets variables for the DMARC Result portion (left half-circle) in the Report List

View File

@ -0,0 +1,11 @@
--- dmarcts-report-viewer-options.php.orig 2023-07-15 05:56:09 UTC
+++ dmarcts-report-viewer-options.php
@@ -255,7 +255,7 @@ function create_select($option_name, $option = array()
//####################################################################
// These files must exist, in the same folder as this script.
-include "dmarcts-report-viewer-config.php";
+include "%%ETCDIR%%/%%PORTNAME%%-config.php";
include "dmarcts-report-viewer-common.php";
// Get all configuration options

View File

@ -0,0 +1,11 @@
--- dmarcts-report-viewer-report-data.php.orig 2023-07-15 05:56:09 UTC
+++ dmarcts-report-viewer-report-data.php
@@ -257,7 +257,7 @@ function formatXML($raw_xml, $reportnumber) {
//####################################################################
// These files are expected to be in the same folder as this script, and must exist.
-include "dmarcts-report-viewer-config.php";
+include "%%ETCDIR%%/%%PORTNAME%%-config.php";
include "dmarcts-report-viewer-common.php";
// Get all configuration options

View File

@ -0,0 +1,11 @@
--- dmarcts-report-viewer-report-list.php.orig 2023-07-15 05:56:09 UTC
+++ dmarcts-report-viewer-report-list.php
@@ -105,7 +105,7 @@ function tmpl_reportList($reports, $sort) {
//####################################################################
// These files are expected to be in the same folder as this script, and must exist.
-include "dmarcts-report-viewer-config.php";
+include "%%ETCDIR%%/%%PORTNAME%%-config.php";
include "dmarcts-report-viewer-common.php";
// Get all configuration options

View File

@ -0,0 +1,11 @@
--- dmarcts-report-viewer.php.orig 2023-07-15 05:56:09 UTC
+++ dmarcts-report-viewer.php
@@ -224,7 +224,7 @@ function html ($domains = array(), $orgs = array(), $p
//####################################################################
// These files must exist, in the same folder as this script.
-include "dmarcts-report-viewer-config.php";
+include "%%ETCDIR%%/%%PORTNAME%%-config.php";
include "dmarcts-report-viewer-common.php";
// Get all configuration options

View File

@ -0,0 +1,2 @@
A PHP viewer for DMARC records that have been parsed by John Levine's rddmarc
script or the dmarcts-report-parser.pl into a MySQL or PostgreSQL database.

View File

@ -0,0 +1,17 @@
%%WWWDIR%%/default.css
%%WWWDIR%%/dusk2dawn.css
%%WWWDIR%%/%%PORTNAME%%.js
%%WWWDIR%%/%%PORTNAME%%-common.php
%%WWWDIR%%/%%PORTNAME%%-options.php
%%WWWDIR%%/%%PORTNAME%%-report-data.php
%%WWWDIR%%/%%PORTNAME%%-report-list.php
%%WWWDIR%%/%%PORTNAME%%.php
%%WWWDIR%%/html.png
%%WWWDIR%%/highlight.js/highlight.pack.js
%%WWWDIR%%/highlight.js/styles/default.css
%%WWWDIR%%/highlight.js/styles/dusk2dawn.css
%%WWWDIR%%/index.html
%%WWWDIR%%/menu_icon_default.css.png
%%WWWDIR%%/menu_icon_dusk2dawn.css.png
%%WWWDIR%%/xml.png
@sample %%ETCDIR%%/%%PORTNAME%%-config.php.sample