summaryrefslogtreecommitdiff
path: root/debian/patches/fix_makefile
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/fix_makefile')
-rw-r--r--debian/patches/fix_makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/debian/patches/fix_makefile b/debian/patches/fix_makefile
new file mode 100644
index 0000000..872015b
--- /dev/null
+++ b/debian/patches/fix_makefile
@@ -0,0 +1,25 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,3 +1,9 @@
++PREFIX = /usr/local
++LIBDIR = $(PREFIX)/lib
++INCLUDEDIR = $(PREFIX)/include
++MAKE_DIR = install -d
++INSTALL_DATA = install -m 0644
++
+ CC=gcc
+ CFLAGS=-O2 -Wall -g -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC
+ all: reference
+@@ -26,7 +32,8 @@
+ valgrind ./reference
+
+ install: library
+- install -m 0644 libscrypt.a $(DESTDIR)/usr/local/lib
+- install -m 0644 libscrypt.so.0 $(DESTDIR)/usr/local/lib
+- ln -s -f $(DESTDIR)/usr/local/lib/libscrypt.so.0 $(DESTDIR)/usr/local/lib/libscrypt.so
+- install -m 0644 libscrypt.h $(DESTDIR)/usr/local/include
++ $(MAKE_DIR) $(DESTDIR) $(DESTDIR)$(PREFIX) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)
++ $(INSTALL_DATA) libscrypt.a $(DESTDIR)$(LIBDIR)
++ $(INSTALL_DATA) libscrypt.so.0 $(DESTDIR)$(LIBDIR)
++ ln -s -f libscrypt.so.0 $(DESTDIR)$(LIBDIR)/libscrypt.so
++ $(INSTALL_DATA) libscrypt.h $(DESTDIR)$(INCLUDEDIR)