summaryrefslogtreecommitdiff
path: root/astro/setiathome/Makefile
diff options
context:
space:
mode:
authorDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-08-24 13:39:27 +0000
committerDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-08-24 13:39:27 +0000
commitb663f63a5ff4618ceecd269ab073027eb61eec84 (patch)
tree1fb189ed40514eb347cb3933cf25c0ebcfc5cc3c /astro/setiathome/Makefile
parentFix MASTER_SITE not being found (diff)
Update Maintainer's Email
Add pkg-message Add rc.setiathome.conf Make messages go through syslog PACKAGE_BUILDING replaced by BATCH PKGMESSAGE and PKGDEINSTALL added PR: 29943 Submitted by: maintainer
Diffstat (limited to 'astro/setiathome/Makefile')
-rw-r--r--astro/setiathome/Makefile82
1 files changed, 49 insertions, 33 deletions
diff --git a/astro/setiathome/Makefile b/astro/setiathome/Makefile
index ee4526be2bfd..cf7c95b433dc 100644
--- a/astro/setiathome/Makefile
+++ b/astro/setiathome/Makefile
@@ -6,7 +6,7 @@
PORTNAME= setiathome
PORTVERSION= 3.03
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= astro
MASTER_SITES= ftp://ftp.cdrom.com/pub/setiathome/ \
ftp://alien.ssl.berkeley.edu/pub/ \
@@ -15,15 +15,14 @@ MASTER_SITES= ftp://ftp.cdrom.com/pub/setiathome/ \
DISTNAME= ${PORTNAME}-${PORTVERSION}.${PORT_HOST}
EXTRACT_SUFX= .tar
-MAINTAINER= clefevre@redirect.to
+MAINTAINER= clefevre@citeweb.net
.include <bsd.port.pre.mk>
-#
# Global variables
#
-.if !defined(PACKAGE_BUILDING) || empty(PACKAGE_BUILDING)
+.if !defined(BATCH)
IS_INTERACTIVE= yes
.endif
@@ -38,13 +37,17 @@ BROKEN= "currently supports only FreeBSD 2.2.6 and above"
EXTRACT_CMD= ${CAT}
EXTRACT_BEFORE_ARGS=
+
STRIP= # aout is already stripped
SCRIPTS_ENV+= PKG_PREFIX=${PREFIX}
-SCRIPTS_ENV+= PACKAGE_BUILDING=${PACKAGE_BUILDING}
+PLIST_SUB= X11PORTS=${X11PORTS}
MAN1= ${PORTNAME}.1
-#
+MSG_FILE= ${PKGDIR}/pkg-message
+PKGMESSAGE= ${WRKDIR}/pkg-message
+PKGDEINSTALL= ${PKGINSTALL}
+
# Local variables
#
@@ -55,11 +58,14 @@ PORT_OSREL= 2.2.8
PORT_OS= ${PORT_OSNAME}${PORT_OSREL}
PORT_HOST= ${PORT_CPU}-${PORT_VENDOR}-${PORT_OS}
-SBINSUBDIR?= sbin
-RCDSUBDIR= etc/rc.d
-MANSUBDIR= man
-PROG= ${PORTNAME}
-SCRIPT= ${PORTNAME}.sh
+SBIN_DIR= ${PREFIX}/sbin
+CONF_DIR= ${PREFIX}/etc
+RC_DIR= ${PREFIX}/etc/rc.d
+
+SAMP_SUFX= .sample
+
+BIN_FILE= setiathome
+RC_FILES= setiathome
# xsetiathome is currently broken at 4.2. should work at 2.x,
# don't know between 3.0 and 4.2 ? so, be conservative...
@@ -68,60 +74,70 @@ SCRIPT= ${PORTNAME}.sh
# Floating point exception (core dumped)
.if ${OSVERSION} < 300000
-XBINSUBDIR= bin
-XPROG+= x${PORTNAME}
MAN1+= x${PORTNAME}.1
+XBIN_DIR= ${PREFIX}/bin
+XBIN_FILE+= xsetiathome
+X11PORTS=
+.else
+X11PORTS= "@comment "
.endif
#
-# Post-configure
#
-post-configure:
- @${SED} -e 's.!!SUBDIR!!.${SBINSUBDIR}.g' ${FILESDIR}/${SCRIPT} > ${WRKSRC}/${SCRIPT}
+post-patch: patch-message
+
+patch-message:
+ @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE}
-#
# Install
#
-do-install: install-daemon install-program install-script install-man
+do-install: install-daemon install-program install-man
install-daemon:
- @${INSTALL_PROGRAM} ${WRKSRC}/${PROG} ${PREFIX}/${SBINSUBDIR}
+ @${INSTALL_PROGRAM} ${WRKSRC}/${BIN_FILE} ${SBIN_DIR}
install-program:
.if defined(XPROG)
- @${INSTALL_PROGRAM} ${WRKSRC}/${prog} ${PREFIX}/${XBINSUBDIR}
+ @${INSTALL_PROGRAM} ${WRKSRC}/${XBIN_FILE} ${XBIN_DIR}
.endif
-install-script:
- @${INSTALL_SCRIPT} ${WRKSRC}/${SCRIPT} ${PREFIX}/${RCDSUBDIR}
-
install-man:
.for mansect in 1
.for man in ${MAN${mansect}}
@${INSTALL_MAN} ${FILESDIR}/${man} \
- ${MAN${mansect}PREFIX}/${MANSUBDIR}/man${mansect}
+ ${MAN${mansect}PREFIX}/man/man${mansect}
.endfor
.endfor
-#
# Post-install
#
-post-install: update-plist configure-package
+post-install: install-startup-files configure-package display-message
-update-plist:
- @${GREP} -q ${SBINSUBDIR}/${PROG} ${TMPPLIST} || \
- ${ECHO} ${SBINSUBDIR}/${PROG} >> ${TMPPLIST}
-.if defined(XPROG)
- @${GREP} -q ${XBINSUBDIR}/${XPROG} ${TMPPLIST} || \
- ${ECHO} ${XBINSUBDIR}/${XPROG} >> ${TMPPLIST}
+install-startup-files:
+.for file in ${RC_FILES}
+.if exists(${FILESDIR}/rc.${file}.conf)
+ @${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf \
+ ${CONF_DIR}/rc.${file}.conf${SAMP_SUFX}
+.if !exists(${CONF_DIR}/rc.${file}.conf)
+ @${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf ${CONF_DIR}
+.endif
.endif
+.if exists(${FILESDIR}/${file}.sh)
+ @${INSTALL_SCRIPT} ${FILESDIR}/${file}.sh ${RC_DIR}
+.endif
+.endfor
configure-package:
-.if defined(IS_INTERACTIVE)
+.if !defined(BATCH)
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.endif
+display-message:
+.if !defined(BATCH)
+ @${CAT} ${PKGMESSAGE}
+.endif
+
.include <bsd.port.post.mk>