openbsd-ports/net/vtun/patches/patch-Makefile.in
2002-02-24 04:24:50 +00:00

60 lines
2.2 KiB
Plaintext

--- Makefile.in.orig Sat Feb 23 22:22:50 2002
+++ Makefile.in Sat Feb 23 22:26:52 2002
@@ -30,6 +30,8 @@ LEXFLAGS = -t
INSTALL = @INSTALL@
INSTALL_OWNER = -o root -g 0
+DESTDIR =
+
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -57,6 +59,8 @@ CONFIGURE_FILES = Makefile config.status
.c.o:
$(CC) $(CFLAGS) $(DEFS) -c $<
+all: vtund
+
vtund: $(OBJS)
$(CC) $(CFLAGS) -o vtund $(OBJS) $(LFD_OBJS) $(LDFLAGS)
@@ -77,24 +81,24 @@ distclean: clean
rm -f `cat vtun.drivers`
install_man:
- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(MAN_DIR)/man8
- $(INSTALL) -m 644 $(INSTALL_OWNER) vtund.8 $(MAN_DIR)/man8
- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(MAN_DIR)/man5
- $(INSTALL) -m 644 $(INSTALL_OWNER) vtund.conf.5 $(MAN_DIR)/man5
- rm -f $(MAN_DIR)/man8/vtun.8
- ln -s vtund.8 $(MAN_DIR)/man8/vtun.8
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(MAN_DIR)/man8
+ $(INSTALL) -m 644 $(INSTALL_OWNER) vtund.8 $(DESTDIR)$(MAN_DIR)/man8
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(MAN_DIR)/man5
+ $(INSTALL) -m 644 $(INSTALL_OWNER) vtund.conf.5 $(DESTDIR)$(MAN_DIR)/man5
+ rm -f $(DESTDIR)$(MAN_DIR)/man8/vtun.8
+ cd $(DESTDIR)$(MAN_DIR)/man8; ln -s vtund.8 vtun.8
install_config:
- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(ETC_DIR)
- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \
- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(ETC_DIR); \
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR)
+ if [ ! -f $(DESTDIR)$(ETC_DIR)/vtund.conf ]; then \
+ $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \
fi
install: vtund install_config install_man
- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(VAR_DIR)/run
- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(STAT_DIR)
- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(LOCK_DIR)
- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(SBIN_DIR)
- $(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(SBIN_DIR)
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(STAT_DIR)
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(LOCK_DIR)
+ $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(SBIN_DIR)
+ $(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(DESTDIR)$(SBIN_DIR)
# DO NOT DELETE THIS LINE -- make depend depends on it.