pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/exmh Rather than use a separate install script, m...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8796a61e445c
branches:  trunk
changeset: 519991:8796a61e445c
user:      dsainty <dsainty%pkgsrc.org@localhost>
date:      Fri Oct 13 14:41:39 2006 +0000

description:
Rather than use a separate install script, move the installation code into the
Makefile (like usual).  As part of this, we can now use the various INSTALL_*
definitions instead of the hard-coded ones in the script.

The only functional change is that all the files are now installed with Pkgsrc
default ownership, instead of hard-coded "bin:bin".  However, this does mean
that non-root installation can now work, which is a good thing.

diffstat:

 mail/exmh/Makefile      |  24 +++++++++++++++++++++---
 mail/exmh/files/install |  39 ---------------------------------------
 2 files changed, 21 insertions(+), 42 deletions(-)

diffs (80 lines):

diff -r 73acddd3b3c2 -r 8796a61e445c mail/exmh/Makefile
--- a/mail/exmh/Makefile        Fri Oct 13 13:58:11 2006 +0000
+++ b/mail/exmh/Makefile        Fri Oct 13 14:41:39 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.41 2006/03/04 21:30:00 jlam Exp $
+# $NetBSD: Makefile,v 1.42 2006/10/13 14:41:39 dsainty Exp $
 
 DISTNAME=      exmh-2.6.3
 PKGREVISION=   1
@@ -36,7 +36,25 @@
                FILESDIR=${FILESDIR} ${SH} ${FILESDIR}/build
 
 do-install:
-       @cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} \
-               WRKSRC=${WRKSRC} ${SH} ${FILESDIR}/install
+       ${INSTALL_MAN} ${WRKSRC}/exmh.l ${PREFIX}/man/man1/exmh.1
+       for binfile in exmh-async exmh-bg exmh ftp.expect; do \
+               ${INSTALL_PROGRAM} ${WRKSRC}/$$binfile ${PREFIX}/bin; \
+       done
+       vers=`sed -ne 's/^set vers \(.*\)/\1/p' ${WRKSRC}/exmh.install`; \
+       ${INSTALL_DATA_DIR} ${PREFIX}/lib/exmh-$${vers}; \
+       ${INSTALL_DATA_DIR} ${PREFIX}/lib/exmh-$${vers}/html; \
+       for libfile in \
+                       ${WRKSRC}/lib/PgpDecryptExpect \
+                       ${WRKSRC}/lib/*.tcl ${WRKSRC}/lib/*.bitmap \
+                       ${WRKSRC}/lib/*.ppm ${WRKSRC}/lib/help.* \
+                       ${WRKSRC}/lib/tclIndex ${WRKSRC}/lib/app-defaults \
+                       ${WRKSRC}/lib/app-defaults-* ${WRKSRC}/lib/*.mask \
+                       ${WRKSRC}/lib/*.exp ${WRKSRC}/lib/mime.types \
+                       ${WRKSRC}/lib/*.au ${WRKSRC}/lib/*.gif; do \
+               ${INSTALL_DATA} $$libfile ${PREFIX}/lib/exmh-$${vers}; \
+       done; \
+       for hfile in ${WRKSRC}/lib/html/*; do \
+               ${INSTALL_DATA} $$hfile ${PREFIX}/lib/exmh-$${vers}/html; \
+       done
 
 .include "../../mk/bsd.pkg.mk"
diff -r 73acddd3b3c2 -r 8796a61e445c mail/exmh/files/install
--- a/mail/exmh/files/install   Fri Oct 13 13:58:11 2006 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#! /bin/sh
-#
-# $NetBSD: install,v 1.1 2001/10/26 11:46:55 agc Exp $
-# FreeBSD Id: install,v 1.2 1996/12/31 21:27:03 peter Exp
-#
-
-VERSION="`sed -ne 's/^set vers \(.*\)/\1/p' ${WRKSRC}/exmh.install`"
-
-# Rename while installing..
-for i in exmh
-do
-       echo "install -c -o bin -g bin -m 444 $i.l ${PREFIX}/man/man1/$i.1"
-       install -c -o bin -g bin -m 444 $i.l ${PREFIX}/man/man1/$i.1
-done
-
-BINS="exmh-async exmh-bg exmh ftp.expect"
-
-echo "install -c -o bin -g bin -m 755 ${BINS} ${PREFIX}/bin"
-install -c -o bin -g bin -m 755 ${BINS} ${PREFIX}/bin
-
-if [ ! -d ${PREFIX}/lib/exmh-${VERSION} ]
-then
-       echo "mkdir ${PREFIX}/lib/exmh-${VERSION}"
-       mkdir ${PREFIX}/lib/exmh-${VERSION}
-fi
-
-LIBFILES='lib/PgpDecryptExpect lib/*.tcl lib/*.bitmap lib/*.ppm lib/help.* lib/tclIndex lib/app-defaults lib/app-defaults-* lib/*.mask lib/*.exp lib/mime.types lib/*.au lib/*.gif'
-
-echo "install -c -o bin -g bin -m 444 ${LIBFILES} ${PREFIX}/lib/exmh-${VERSION}"
-install -c -o bin -g bin -m 444 ${LIBFILES} ${PREFIX}/lib/exmh-${VERSION}
-
-if [ ! -d ${PREFIX}/lib/exmh-${VERSION}/html ]
-then
-       echo "mkdir ${PREFIX}/lib/exmh-${VERSION}/html"
-       mkdir ${PREFIX}/lib/exmh-${VERSION}/html
-fi
-
-echo "install -c -o bin -g bin -m 444 lib/html/* ${PREFIX}/lib/exmh-${VERSION}/html"
-install -c -o bin -g bin -m 444 lib/html/* ${PREFIX}/lib/exmh-${VERSION}/html



Home | Main Index | Thread Index | Old Index