summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Seligmann <mithrandi@mithrandi.net>2014-12-14 05:55:32 +0200
committerTristan Seligmann <mithrandi@mithrandi.net>2014-12-14 05:55:32 +0200
commit5eaeaf5a6d989d89c76c1a135698c69f1ed16f43 (patch)
tree382745e06393b19303e95ee297a0d4c3e473741e
parentb52519aa74464e561c2fa883c39685a85547d88a (diff)
Commit Debian 3.0 (quilt) metadata
-rw-r--r--.pc/.dpkg-source-unapply0
-rw-r--r--.pc/.quilt_patches1
-rw-r--r--.pc/.quilt_series1
-rw-r--r--.pc/.version1
-rw-r--r--.pc/applied-patches1
-rw-r--r--.pc/fix-makefile/Makefile50
6 files changed, 54 insertions, 0 deletions
diff --git a/.pc/.dpkg-source-unapply b/.pc/.dpkg-source-unapply
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.pc/.dpkg-source-unapply
diff --git a/.pc/.quilt_patches b/.pc/.quilt_patches
new file mode 100644
index 0000000..6857a8d
--- /dev/null
+++ b/.pc/.quilt_patches
@@ -0,0 +1 @@
+debian/patches
diff --git a/.pc/.quilt_series b/.pc/.quilt_series
new file mode 100644
index 0000000..c206706
--- /dev/null
+++ b/.pc/.quilt_series
@@ -0,0 +1 @@
+series
diff --git a/.pc/.version b/.pc/.version
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/.pc/.version
@@ -0,0 +1 @@
+2
diff --git a/.pc/applied-patches b/.pc/applied-patches
new file mode 100644
index 0000000..4f20ff2
--- /dev/null
+++ b/.pc/applied-patches
@@ -0,0 +1 @@
+fix-makefile
diff --git a/.pc/fix-makefile/Makefile b/.pc/fix-makefile/Makefile
new file mode 100644
index 0000000..05eeea6
--- /dev/null
+++ b/.pc/fix-makefile/Makefile
@@ -0,0 +1,50 @@
+PREFIX ?= /usr/local
+LIBDIR ?= $(PREFIX)/lib
+INCLUDEDIR ?= $(PREFIX)/include
+MAKE_DIR ?= install -d
+INSTALL_DATA ?= install
+
+CC?=gcc
+CFLAGS?=-O2 -Wall -g -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC
+LDFLAGS?=-Wl,-z,now -Wl,-z,relro -Wl,-soname,libscrypt.so.0 -Wl,--version-script=libscrypt.version
+CFLAGS_EXTRA?=-Wl,-rpath=.
+
+all: reference
+
+OBJS= crypto_scrypt-nosse.o sha256.o crypto-mcf.o b64.o crypto-scrypt-saltgen.o crypto_scrypt-check.o crypto_scrypt-hash.o slowequals.o
+
+libscrypt.so.0: $(OBJS)
+ $(CC) $(LDFLAGS) -shared -o libscrypt.so.0 $(OBJS) -lm -lc
+ ar rcs libscrypt.a $(OBJS)
+
+reference: libscrypt.so.0 main.o b64.o crypto_scrypt-hexconvert.o
+ ln -s -f libscrypt.so.0 libscrypt.so
+ $(CC) -Wall -o reference main.o b64.o crypto_scrypt-hexconvert.o $(CFLAGS_EXTRA) -L. -lscrypt
+
+clean:
+ rm -f *.o reference libscrypt.so* libscrypt.a endian.h
+
+check: all
+ ./reference
+
+devtest:
+ splint crypto_scrypt-hexconvert.c
+ splint crypto-mcf.c crypto_scrypt-check.c crypto_scrypt-hash.c -unrecog
+ splint crypto-scrypt-saltgen.c +posixlib -compdef
+ valgrind ./reference
+
+install: libscrypt.so.0
+ $(MAKE_DIR) $(DESTDIR) $(DESTDIR)$(PREFIX) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL_DATA) -pm 0755 libscrypt.so.0 $(DESTDIR)$(LIBDIR)
+ cd $(DESTDIR)$(LIBDIR) && ln -s -f libscrypt.so.0 $(DESTDIR)$(LIBDIR)/libscrypt.so
+ $(INSTALL_DATA) -pm 0644 libscrypt.h $(DESTDIR)$(INCLUDEDIR)
+
+install-osx: libscrypt.so.0
+ $(MAKE_DIR) $(DESTDIR) $(DESTDIR)$(PREFIX) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL_DATA) -pm 0755 libscrypt.so.0 $(DESTDIR)$(LIBDIR)/libscrypt.0.dylib
+ cd $(DESTDIR)$(LIBDIR) && install_name_tool -id $(DESTDIR)$(LIBDIR)/libscrypt.0.dylib $(DESTDIR)$(LIBDIR)/libscrypt.0.dylib
+ cd $(DESTDIR)$(LIBDIR) && ln -s -f libscrypt.0.dylib $(DESTDIR)$(LIBDIR)/libscrypt.dylib
+ $(INSTALL_DATA) -pm 0644 libscrypt.h $(DESTDIR)$(INCLUDEDIR)
+
+install-static: libscrypt.a
+ $(INSTALL_DATA) -pm 0644 libscrypt.a $(DESTDIR)$(LIBDIR)