1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00
nixpkgs/pkgs/tools/misc/rig/rig_1.11-1.diff
2018-12-04 19:22:45 -05:00

40 lines
1,004 B
Diff

--- 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;