side affect of using "CONFIGURE_STYLE= gnu dest" is that ETCSCREENRC is

hard coded to ${DESTDIR}/etc/screenrc in the resulting screen binary thus
the system wide /etc/screenrc does not work as expected.
--
Reported by: Luke Bakken <luke_bakken@yahoo.com>
This commit is contained in:
brad 2000-08-24 22:46:43 +00:00
parent e5caed9d66
commit b4ae0e5cb1
3 changed files with 104 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.25 2000/08/23 17:55:20 brad Exp $
# $OpenBSD: Makefile,v 1.26 2000/08/24 22:46:43 brad Exp $
VERSION= 3.9.5
DISTNAME= screen-${VERSION}
@ -18,10 +18,9 @@ PERMIT_DISTFILES_FTP= Yes
SUBST_VARS= VERSION
CONFIGURE_STYLE= gnu dest
CONFIGURE_STYLE= gnu
post-install:
@cd ${PREFIX}/bin && ln -sf screen-${VERSION} screen
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/screen
${INSTALL_DATA} ${WRKSRC}/etc/etcscreenrc \
${PREFIX}/share/examples/screen/screenrc-sample

View File

@ -1,6 +1,15 @@
--- Makefile.in.orig Wed Sep 1 18:50:31 1999
+++ Makefile.in Mon Dec 27 23:34:35 1999
@@ -21,8 +21,8 @@
+++ Makefile.in Thu Aug 24 18:37:40 2000
@@ -7,6 +7,8 @@
srcdir = @srcdir@
VPATH = @srcdir@
+DESTDIR =
+
# Where to install screen.
prefix = @prefix@
@@ -21,8 +23,8 @@
ETCSCREENRC = `sed < config.h -n -e '/define ETCSCREENRC/s/^.*"\([^"]*\)"/\1/p'`
CC = @CC@
@ -11,7 +20,7 @@
LIBS = @LIBS@
CPP_DEPEND=$(CC) -MM
@@ -62,7 +62,7 @@
@@ -62,7 +64,7 @@
kmapdef.o acls.o braille.o braille_tsi.o logfile.o layer.o \
sched.o teln.o nethack.o
@ -20,3 +29,66 @@
screen: $(OFILES)
$(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
@@ -71,18 +73,18 @@
$(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<
install_bin: .version screen
- -if [ -f $(bindir)/$(SCREEN) ] && [ ! -f $(bindir)/$(SCREEN).old ]; \
- then mv $(bindir)/$(SCREEN) $(bindir)/$(SCREEN).old; fi
- $(INSTALL_PROGRAM) screen $(bindir)/$(SCREEN)
- -chown root $(bindir)/$(SCREEN) && chmod 4755 $(bindir)/$(SCREEN)
+ -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
+ then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
+ $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
+ -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
# This doesn't work if $(bindir)/screen is a symlink
- -if [ -f $(bindir)/screen ] && [ ! -f $(bindir)/screen.old ]; then mv $(bindir)/screen $(bindir)/screen.old; fi
- rm -f $(bindir)/screen
- ln -s $(SCREEN) $(bindir)/screen
+ -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTIDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi
+ rm -f $(DESTIDIR)$(bindir)/screen
+ cd $(DESTDIR)$(bindir) && ln -fs $(SCREEN) screen
###############################################################################
install: installdirs install_bin
- cd doc ; $(MAKE) install
+ cd doc ; $(MAKE) $(AM_MAKEFLAGS) install
-if [ -d /usr/lib/terminfo ]; then \
PATH="$PATH:/usr/5bin" tic ${srcdir}/terminfo/screeninfo.src; \
chmod 644 /usr/lib/terminfo/s/screen*; \
@@ -94,15 +96,15 @@
installdirs:
# Path leading to ETCSCREENRC and Socketdirectory not checked.
- $(srcdir)/etc/mkinstalldirs $(bindir)
- cd doc ; $(MAKE) installdirs
+ $(srcdir)/etc/mkinstalldirs $(DESTDIR)$(bindir)
+ cd doc ; $(MAKE) $(AM_MAKEFLAGS) installdirs
uninstall: .version
- rm -f $(bindir)/$(SCREEN)
- rm -f $(bindir)/screen
- -mv $(bindir)/screen.old $(bindir)/screen
- rm -f $(ETCSCREENRC)
- cd doc; $(MAKE) uninstall
+ rm -f $(DESTDIR)$(bindir)/$(SCREEN)
+ rm -f $(DESTDIR)$(bindir)/screen
+ -mv $(DESTDIR)$(bindir)/screen.old $(DESTDIR)$(bindir)/screen
+ rm -f $(DESTDIR)$(ETCSCREENRC)
+ cd doc; $(MAKE) $(AM_MAKEFLAGS) uninstall
shadow:
mkdir shadow;
@@ -127,10 +129,10 @@
CC="$(CC) $(CFLAGS)" srcdir=${srcdir} sh $(srcdir)/osdef.sh
docs:
- cd doc; $(MAKE) dvi screen.info
+ cd doc; $(MAKE) $(AM_MAKEFLAGS) dvi screen.info
dvi info screen.info:
- -cd doc; $(MAKE) $@
+ -cd doc; $(MAKE) $(AM_MAKEFLAGS) $@
mostlyclean:
rm -f $(OFILES) screen config.cache osdef0.c osdef1.sed osdef2.sed

View File

@ -1,6 +1,14 @@
--- doc/Makefile.in.orig Wed Sep 1 18:50:32 1999
+++ doc/Makefile.in Thu Dec 9 16:05:41 1999
@@ -9,7 +9,7 @@
+++ doc/Makefile.in Thu Aug 24 18:08:30 2000
@@ -3,13 +3,15 @@
srcdir = @srcdir@
VPATH = @srcdir@
+DESTDIR =
+
prefix = @prefix@
mandir = @mandir@
infodir = @infodir@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@ -9,7 +17,7 @@
TEXI2DVI = texi2dvi
SHELL = /bin/sh
@@ -20,6 +20,7 @@
@@ -20,25 +22,23 @@
$(TEXI2DVI) $(srcdir)/screen.texinfo
info screen.info: screen.texinfo
@ -17,13 +25,27 @@
$(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info
install: installdirs
@@ -28,9 +29,6 @@
- $(INSTALL_DATA) $(srcdir)/screen.1 $(mandir)/man1/screen.1
+ $(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1
-$(MAKE) screen.info
-if test -f screen.info; then d=.; else d=$(srcdir); fi; \
if test -f $$d/screen.info; then \
for f in $$d/screen.info*; do $(INSTALL_DATA) $$f $(infodir);done; \
- for f in $$d/screen.info*; do $(INSTALL_DATA) $$f $(infodir);done; \
- if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
- install-info --info-dir=$(infodir) $$d/screen.info; \
- else true; fi; \
+ for f in $$d/screen.info*; do $(INSTALL_DATA) $$f $(DESTDIR)$(infodir);done; \
fi
uninstall:
- rm -f $(mandir)/man1/screen.1
- rm -f $(infodir)/screen.info*
+ rm -f $(DESTDIR)$(mandir)/man1/screen.1
+ rm -f $(DESTDIR)$(infodir)/screen.info*
installdirs:
- $(srcdir)/../etc/mkinstalldirs $(mandir)/man1 $(infodir)
+ $(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(infodir)
mostlyclean:
-rm -f *.cp *.cps *.fn *.fns *.ky *.kys *.pg *.tp *.vr