You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-text/lv/files/lv-gentoo.patch

40 lines
1.2 KiB

--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -25,6 +25,7 @@
LDFLAGS=@LDFLAGS@
INSTALL=@INSTALL@
PERL= @PERL@
+DESTDIR=
OBJS= itable.o ctable.o uty.o istr.o stream.o file.o guess.o decode.o \
encode.o escape.o iso2022.o iso8859.o iso2cn.o iso2jp.o iso2kr.o \
@@ -64,18 +65,19 @@
#
install::
- $(INSTALL) -s -m 555 lv $(bindir)
- if test -f $(bindir)/lgrep; then \
- /bin/rm -f $(bindir)/lgrep; \
+ if test ! -d $(DESTDIR)$(bindir); then \
+ mkdir -p $(DESTDIR)$(bindir); \
fi
- (cd $(bindir); ln lv lgrep)
- if test ! -d $(lvlibdir); then \
- mkdir -p $(lvlibdir); \
+ $(INSTALL) -m 555 lv $(DESTDIR)$(bindir)
+ (cd $(DESTDIR)$(bindir); ln -s lv lgrep)
+ if test ! -d $(DESTDIR)$(lvlibdir); then \
+ mkdir -p $(DESTDIR)$(lvlibdir); \
fi
- $(INSTALL) -m 444 $(srcdir)/../lv.hlp $(lvlibdir)
- if test -d $(mandir) -a -d $(mandir)/man1; then \
- $(INSTALL) -m 444 $(srcdir)/../lv.1 $(mandir)/man1; \
+ $(INSTALL) -m 444 $(srcdir)/../lv.hlp $(DESTDIR)$(lvlibdir)
+ if test ! -d $(DESTDIR)$(mandir)/man1; then \
+ mkdir -p $(DESTDIR)$(mandir)/man1; \
fi
+ $(INSTALL) -m 444 $(srcdir)/../lv.1 $(DESTDIR)$(mandir)/man1; \
uninstall::
for i in $(bindir)/lv $(bindir)/lgrep $(lvlibdir)/lv.hlp $(mandir)/man1/lv.1; do \