aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2023-05-25 07:06:14 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2023-05-25 07:08:18 +0000
commit842f5b3996e5a9a5e666b4fc28ff75a973b97edd (patch)
treef234e87b7ed9aaf71ef6d39ce9882a0762fac400
parentc4dc6d046e3a89460b1d3f3ca4cbb3148649e113 (diff)
downloadports-842f5b3996e5a9a5e666b4fc28ff75a973b97edd.tar.gz
ports-842f5b3996e5a9a5e666b4fc28ff75a973b97edd.zip
net/nepenthes: modernize
Remove all usage of pkg-install and pkg-deinstall which can be done via keywords. This makes this port ROOTDIR friendly
-rw-r--r--net/nepenthes/Makefile9
-rw-r--r--net/nepenthes/pkg-deinstall46
-rw-r--r--net/nepenthes/pkg-install46
-rw-r--r--net/nepenthes/pkg-plist11
4 files changed, 18 insertions, 94 deletions
diff --git a/net/nepenthes/Makefile b/net/nepenthes/Makefile
index 083ab5f9a09e..796364d8734b 100644
--- a/net/nepenthes/Makefile
+++ b/net/nepenthes/Makefile
@@ -44,7 +44,14 @@ post-patch:
s|-R/usr/local/lib||' ${WRKSRC}/configure
post-install:
- @${MKDIR} ${STAGEDIR}${DATADIR}/signatures
+ @${MKDIR} ${STAGEDIR}${DATADIR}/signatures \
+ ${STAGEDIR}/var/binaries \
+ ${STAGEDIR}/var/hexdumps \
+ ${STAGEDIR}/var/log/pcap \
+ ${STAGEDIR}/var/spool/nepenthes/gotek \
+ ${STAGEDIR}/var/spool/nepenthes/submitpostgres \
+ ${STAGEDIR}/var/cache/nepenthes/pcap \
+ ${STAGEDIR}/var/cache/nepenthes/signatures
(cd ${WRKSRC}/modules/shellcode-signatures && ${INSTALL_DATA} \
shellcode-signatures.sc ${STAGEDIR}${DATADIR}/signatures)
diff --git a/net/nepenthes/pkg-deinstall b/net/nepenthes/pkg-deinstall
deleted file mode 100644
index 671f2981d6f0..000000000000
--- a/net/nepenthes/pkg-deinstall
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "DEINSTALL" ]; then
- exit 0
-fi
-
-if cmp -s ${PKG_PREFIX}/share/nepenthes/signatures/shellcode-signatures.sc \
- /var/cache/nepenthes/signatures/shellcode-signatures.sc; then
- rm -f /var/cache/nepenthes/signatures/shellcode-signatures.sc
-fi
-
-if [ -d /var/spool/nepenthes/submitpostgres ]; then
- rmdir /var/spool/nepenthes/submitpostgres 2>/dev/null || true
-fi
-
-if [ -d /var/spool/nepenthes/gotek ]; then
- rmdir /var/spool/nepenthes/gotek 2>/dev/null || true
-fi
-
-if [ -d /var/spool/nepenthes ]; then
- rmdir /var/spool/nepenthes 2>/dev/null || true
-fi
-
-if [ -d /var/log/pcap ]; then
- rmdir /var/log/pcap 2>/dev/null || true
-fi
-
-if [ -d /var/hexdumps ]; then
- rmdir /var/hexdumps 2>/dev/null || true
-fi
-
-if [ -d /var/cache/nepenthes/signatures ]; then
- rmdir /var/cache/nepenthes/signatures 2>/dev/null || true
-fi
-
-if [ -d /var/cache/nepenthes/pcap ]; then
- rmdir /var/cache/nepenthes/pcap 2>/dev/null || true
-fi
-
-if [ -d /var/cache/nepenthes ]; then
- rmdir /var/cache/nepenthes 2>/dev/null || true
-fi
-
-if [ -d /var/binaries ]; then
- rmdir /var/binaries 2>/dev/null || true
-fi
diff --git a/net/nepenthes/pkg-install b/net/nepenthes/pkg-install
deleted file mode 100644
index c62009d06b67..000000000000
--- a/net/nepenthes/pkg-install
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "POST-INSTALL" ]; then
- exit 0
-fi
-
-if [ ! -d /var/binaries ]; then
- install -d /var/binaries
-fi
-
-if [ ! -d /var/cache/nepenthes ]; then
- install -d /var/cache/nepenthes
-fi
-
-if [ ! -d /var/cache/nepenthes/pcap ]; then
- install -d /var/cache/nepenthes/pcap
-fi
-
-if [ ! -d /var/cache/nepenthes/signatures ]; then
- install -d /var/cache/nepenthes/signatures
-fi
-
-if [ ! -d /var/hexdumps ]; then
- install -d /var/hexdumps
-fi
-
-if [ ! -d /var/log/pcap ]; then
- install -d /var/log/pcap
-fi
-
-if [ ! -d /var/binaries ]; then
- install -d /var/spool/nepenthes
-fi
-
-if [ ! -d /var/binaries ]; then
- install -d /var/spool/nepenthes/gotek
-fi
-
-if [ ! -d /var/binaries ]; then
- install -d /var/spool/nepenthes/submitpostgres
-fi
-
-if [ ! -f /var/cache/nepenthes/signatures/shellcode-signatures.sc ]; then
- install -c ${PKG_PREFIX}/share/nepenthes/signatures/shellcode-signatures.sc \
- /var/cache/nepenthes/signatures
-fi
diff --git a/net/nepenthes/pkg-plist b/net/nepenthes/pkg-plist
index 243f93b5a1c1..98f1afd47d38 100644
--- a/net/nepenthes/pkg-plist
+++ b/net/nepenthes/pkg-plist
@@ -163,4 +163,13 @@ man/man8/nepenthes.8.gz
%%DATADIR%%/README
%%DATADIR%%/README.VFS
%%DATADIR%%/logo-shaded.svg
-%%DATADIR%%/signatures/shellcode-signatures.sc
+@sample %%DATADIR%%/signatures/shellcode-signatures.sc /var/cache/nepenthes/signatures/shellcode-signatures.sc
+@dir /var/binaries
+@dir /var/cache/nepenthes/
+@dir /var/cache/nepenthes/pcap
+@dir /var/cache/nepenthes/signatures
+@dir /var/hexdumps
+@dir /var/log/pcap
+@dir /var/spool/nepenthes/
+@dir /var/spool/nepenthes/gotek
+@dir /var/spool/nepenthes/submitpostgres