pkgsrc/net/torrentutils/patches/patch-aa
2011-03-27 23:05:22 +00:00

47 lines
1.6 KiB
Text

$NetBSD: patch-aa,v 1.4 2011/03/27 23:05:23 wiz Exp $
Fix installation path and mandir.
Fix unportable test(1) construct.
--- Makefile.orig 2003-10-12 14:13:16.000000000 +0200
+++ Makefile
@@ -1,9 +1,9 @@
# Root of installation tree
-PREFIX = /home/usel/tmp
+#PREFIX = /home/usel/tmp
# Path where the executables are installed
BINDIR = $(PREFIX)/bin
# Path where the manual pages are installed
-MANDIR = $(PREFIX)/share/man
+MANDIR = $(PREFIX)/man
# Path to Midnight Commander extfs
MCEXTFSDIR = $(PREFIX)/share/mc/extfs
@@ -41,22 +41,13 @@ torrentutils.spec: torrentutils.spec.in
cat $^ | sed "s,@VERSION@,$(VERSION),; \
s,@PACKAGE@,$(PACKAGE),; \
s,@AUTHORS@,$(AUTHORS)," > $@
- if [[ "$@" != *.spec ]]; then chmod a+x $@; fi
+ if [ "$@" != *.spec ]; then chmod a+x $@; fi
install: all
- install -d $(BINDIR) $(MANDIR)/man1
- install -m 755 torrenttool $(BINDIR)/torrenttool
- install -m 755 defrag $(BINDIR)
- rm -f tmp.torrenttool.$$
- install -m 644 torrenttool.1 $(MANDIR)/man1
- install -m 644 defrag.1 $(MANDIR)/man1
- install -d $(MCEXTFSDIR)
- install -m 755 torrentmcfs $(MCEXTFSDIR); \
- if [ -f $(MCEXTFSDIR)/extfs.ini ]; then \
- grep '^torrentmcfs$$' $(MCEXTFSDIR)/extfs.ini || echo 'torrentmcfs' >> $(MCEXTFSDIR)/extfs.ini; \
- else \
- echo "$(MCEXTFSDIR) does not exist. Not installing MC extfs support."; \
- fi
+ ${BSD_INSTALL_SCRIPT} torrenttool ${DESTDIR}$(BINDIR)/torrenttool
+ ${BSD_INSTALL_SCRIPT} defrag ${DESTDIR}$(BINDIR)
+ ${BSD_INSTALL_MAN} torrenttool.1 ${DESTDIR}$(MANDIR)/man1
+ ${BSD_INSTALL_MAN} defrag.1 ${DESTDIR}$(MANDIR)/man1
clean:
rm -f torrenttool torrentmcfs defrag torrentutils.spec