Skip to content

Commit

Permalink
mail/queue-repair: fix patch and refactor
Browse files Browse the repository at this point in the history
 - remove stray shebang, (q)nofiles changes from patch file
   (I ran makepatch, which picked up REINPLACE_CMD changes)
 - replace homegrown REINPLACE_CMD with USES=shebangfix
 - set NO_ARCH=yes, NO_BUILD=yes
 - express options-dependent commands in more declarative manner

Fixes:		809ff8b
Reported by:	danfe
Approved by:	portmgr (build fix, infrastructure blanket)
MFH:		2023Q2
  • Loading branch information
clausecker committed May 9, 2023
1 parent 9ee6f73 commit 60abf2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 28 deletions.
24 changes: 11 additions & 13 deletions mail/queue-repair/Makefile
@@ -1,6 +1,6 @@
PORTNAME= queue-repair
PORTVERSION= 0.9.0
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= mail python
MASTER_SITES= http://pyropus.ca/software/${PORTNAME}/

Expand All @@ -10,33 +10,31 @@ WWW= http://pyropus.ca/software/queue-repair/

LICENSE= GPLv2

USES= python
USES= python shebangfix
SHEBANG_FILES= queue_repair.py

NO_ARCH= yes
NO_BUILD= yes

OPTIONS_DEFINE= DOCS QMAIL_PORT
OPTIONS_DEFAULT= QMAIL_PORT
QMAIL_PORT_DESC= Depend on qmail port

QMAIL_PORT_USES= qmail:run

.include <bsd.port.options.mk>

PLIST_FILES= bin/queue-repair
PORTDOCS= BLURB CHANGELOG TODO

do-build:
${REINPLACE_CMD} -e 's,^#!/usr/bin/python,#!${PYTHON_CMD},' \
${WRKSRC}/queue_repair.py
.if ${PORT_OPTIONS:MQMAIL_PORT}
do-configure-QMAIL_PORT-on:
${REINPLACE_CMD} -e 's,nofiles,qnofiles,' ${WRKSRC}/queue_repair.py
.endif

do-install:
${INSTALL_SCRIPT} ${WRKSRC}/queue_repair.py ${STAGEDIR}${PREFIX}/bin/queue-repair
.if ${PORT_OPTIONS:MDOCS}

do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
. for f in ${PORTDOCS}
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
. endfor
.endif
.endfor

.include <bsd.port.mk>
15 changes: 0 additions & 15 deletions mail/queue-repair/files/patch-queue__repair.py
Expand Up @@ -2,21 +2,6 @@

--- queue_repair.py.orig 2003-10-22 15:54:13 UTC
+++ queue_repair.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/local/bin/python3.9
'''queue_repair.py - qmail tools in Python.
Copyright (C) 2001 Charles Cazabon <pqt @ discworld.dyndns.org>
@@ -58,7 +58,7 @@ users = {
groups = {
'qmail' : None,
- 'nofiles' : None,
+ 'qnofiles' : None,
}
dirs = {
@@ -66,24 +66,24 @@ dirs = {
# key: pathname - all paths are relative to conf-qmail
# data: (user, group, mode, split)
Expand Down

0 comments on commit 60abf2a

Please sign in to comment.