nixpkgs/pkgs/tools/misc/rig/rig_1.11-1.diff

40 lines
1004 B
Diff
Raw Normal View History

2018-12-03 07:37:32 +03:00
--- rig-1.11.orig/Makefile
+++ rig-1.11/Makefile
@@ -1,20 +1,21 @@
-PREFIX=/usr/local
+PREFIX=${out}
BINDIR=${PREFIX}/bin
MANDIR=${PREFIX}/man
DATADIR=${PREFIX}/share/rig
+CXX=g++
all: rig rig.6
rig: rig.cc
- g++ -g rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
+ ${CXX} -O2 -g rig.cc -o rig -Wall -DDATADIR="\"$(DATADIR)\""
rig.6: rig.6.in
sed s@DATADIR@"$(DATADIR)"@g < rig.6.in > rig.6
install: rig rig.6
- install -g 0 -m 755 -o 0 -s rig $(BINDIR)
- install -g 0 -m 644 -o 0 rig.6 $(MANDIR)/man6/rig.6
- install -g 0 -m 755 -o 0 -d $(DATADIR)
- install -g 0 -m 644 -o 0 data/*.idx $(DATADIR)
+ install -m 755 -d $(DESTDIR)$(DATADIR)
+ install -m 755 -d $(DESTDIR)$(BINDIR)
+ install -m 755 rig $(DESTDIR)$(BINDIR)/rig
+ install -m 644 data/*.idx $(DESTDIR)$(DATADIR)
clean:
rm -rf *~ *.rej *.orig *.o rig rig.6
--- rig-1.11.orig/rig.cc
+++ rig-1.11/rig.cc
@@ -26,6 +26,7 @@
#include <time.h>
#include <errno.h>
#include <assert.h>
+#include <string.h>
using namespace std;