pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

auto-admin: Clean up and fix platform-specific conditionals



Module Name:	pkgsrc-wip
Committed By:	Jason W. Bacon <bacon4000%gmail.com@localhost>
Pushed By:	outpaddling
Date:		Wed Sep 6 08:47:16 2017 -0500
Changeset:	ca41ee1ca95b6e75d9074deee5000771ddee8bb8

Modified Files:
	auto-admin/DESCR
	auto-admin/Makefile

Log Message:
auto-admin: Clean up and fix platform-specific conditionals

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ca41ee1ca95b6e75d9074deee5000771ddee8bb8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 auto-admin/DESCR    |  4 ++++
 auto-admin/Makefile | 27 ++++++++-------------------
 2 files changed, 12 insertions(+), 19 deletions(-)

diffs:
diff --git a/auto-admin/DESCR b/auto-admin/DESCR
index e69de29bb2..5a55259b08 100644
--- a/auto-admin/DESCR
+++ b/auto-admin/DESCR
@@ -0,0 +1,4 @@
+Auto-admin is a set of tools for automating common systems management tasks
+from the command line.  It is meant as a library of scripts to be used by
+more specific automated systems management scripts.  It is also intended to
+serve as a compatibility layer to ease management of multiple POSIX platforms.
diff --git a/auto-admin/Makefile b/auto-admin/Makefile
index 13268f2263..e9ca2add97 100644
--- a/auto-admin/Makefile
+++ b/auto-admin/Makefile
@@ -28,24 +28,13 @@ INSTALLATION_DIRS=	sbin
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/Common/Scripts/* \
 		${DESTDIR}${PREFIX}/sbin
-#	ls ${WRKSRC}/${OPSYS}/Scripts
-# This does not work
-#.if exists(${WRKSRC}/${OPSYS}/Scripts)
-# This does not work
-#.if exists(/usr/pkgsrc/wip/auto-admin/work/auto-admin-0.4.0)
-# This works
-# .if exists(/usr/pkgsrc/wip/auto-admin/work)
-# This works after mkdir /etc/auto-admin-0.4.0
-# .if exists(/etc/auto-admin-0.4.0)
-# Temporary hack
-.if ${OPSYS} == NetBSD
-	@${ECHO} "Installing ${WRKSRC}/${OPSYS}/Scripts/*"
-	${INSTALL_SCRIPT} ${WRKSRC}/${OPSYS}/Scripts/* \
-		${DESTDIR}${PREFIX}/sbin
-.endif
-.if exists(/etc/redhat-release)
-	${INSTALL_SCRIPT} ${WRKSRC}/CentOS/Scripts/* \
-		${DESTDIR}${PREFIX}/sbin
-.endif
+	if ${TEST} -e ${WRKSRC}/${OPSYS}/Scripts; then \
+	    ${INSTALL_SCRIPT} ${WRKSRC}/${OPSYS}/Scripts/* \
+		${DESTDIR}${PREFIX}/sbin; \
+	fi
+	if ${TEST} -e /etc/redhat-release; then \
+	    ${INSTALL_SCRIPT} ${WRKSRC}/CentOS/Scripts/* \
+		${DESTDIR}${PREFIX}/sbin; \
+	fi
 
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index