summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2019-11-21 15:22:52 +0000
committerCy Schubert <cy@FreeBSD.org>2019-11-21 15:22:52 +0000
commit875be5ca5d4e7cf971273fe9b4947d7312562926 (patch)
tree483324e5744444daf849d2fb8aa9c71b949bec72
parentmultimedia/wlrobs: unbreak build (diff)
Rather than an option, automatically detect if the target system
has an amd rc script. Eventually when amd is removed from base packages will automatically include the rc script. Adjust the location of the amd binary in the supplied rc script. MFH: 2019Q4
-rw-r--r--sysutils/am-utils/Makefile9
-rw-r--r--sysutils/am-utils/files/amd.in2
2 files changed, 6 insertions, 5 deletions
diff --git a/sysutils/am-utils/Makefile b/sysutils/am-utils/Makefile
index 45226f9f8e0a..32a987a98731 100644
--- a/sysutils/am-utils/Makefile
+++ b/sysutils/am-utils/Makefile
@@ -3,7 +3,7 @@
PORTNAME= am-utils
PORTVERSION= 6.2
-PORTREVISION= 7
+PORTREVISION= 8
PORTEPOCH= 1
CATEGORIES= sysutils net
MASTER_SITES= ftp://ftp.am-utils.org/pub/am-utils/ \
@@ -16,10 +16,9 @@ COMMENT= Berkeley Automounter Suite of Utilities
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
-OPTIONS_DEFINE= OPENLDAP DOCS RC
+OPTIONS_DEFINE= OPENLDAP DOCS
OPTIONS_DEFAULT=OPENLDAP
OPENLDAP_DESC= OpenLDAP support
-RC_DESC= Use the rc script in this port
USES= autoreconf:build bison libtool makeinfo perl5
USE_LDCONFIG= yes
@@ -44,7 +43,9 @@ OPENLDAP_PORTDOCS= README.ldap ldap-id.txt ldap.schema
OPTIONS_SUB= yes
-RC_USE_RC_SUBR= amd
+.if !exists(/etc/rc.d/amd)
+USE_RC_SUBR= amd
+.endif
post-patch:
@${RM} ${WRKSRC}/doc/am-utils.info*
diff --git a/sysutils/am-utils/files/amd.in b/sysutils/am-utils/files/amd.in
index feeda57e833e..2bd41d17a6a7 100644
--- a/sysutils/am-utils/files/amd.in
+++ b/sysutils/am-utils/files/amd.in
@@ -14,7 +14,7 @@
name="amd"
desc="Automatically mount filesystems"
rcvar="amd_enable"
-command="/usr/sbin/${name}"
+command=%%PREFIX%%/sbin/${name}
start_precmd="amd_precmd"
command_args="&"
extra_commands="reload"