summaryrefslogtreecommitdiff
path: root/net/torrentutils/patches/patch-aa
blob: 14e99571bbced58a7e4cb5a1fbfea9cd4a16db31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$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