diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2016-09-24 17:55:06 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-09-24 17:55:06 -0700 |
commit | fe89c98a267ad8bfa336da81985023785fe33128 (patch) | |
tree | f86e229ab6045889462e812e45b6d6f7bc5f7083 /debian | |
parent | 8121e7ad8ef64088f79c5b2f9266b672c10342e8 (diff) | |
download | zxcvbn-c-fe89c98a267ad8bfa336da81985023785fe33128.tar.gz |
add SONAME symlink, too
Diffstat (limited to 'debian')
-rw-r--r-- | debian/libzxcvbn0.lintian-overrides | 2 | ||||
-rw-r--r-- | debian/patches/targets-to-build-shlib.patch | 17 | ||||
-rw-r--r-- | debian/patches/targets-to-build-static-lib.patch | 14 |
3 files changed, 17 insertions, 16 deletions
diff --git a/debian/libzxcvbn0.lintian-overrides b/debian/libzxcvbn0.lintian-overrides index 508d42c..3e4566c 100644 --- a/debian/libzxcvbn0.lintian-overrides +++ b/debian/libzxcvbn0.lintian-overrides @@ -1,4 +1,4 @@ # binary data; not actually a spelling error -spelling-error-in-binary usr/lib/i386-linux-gnu/libzxcvbn.so.0 DonT Don't +spelling-error-in-binary usr/lib/i386-linux-gnu/libzxcvbn.so.0.0.0 DonT Don't # not available no-upstream-changelog diff --git a/debian/patches/targets-to-build-shlib.patch b/debian/patches/targets-to-build-shlib.patch index 1792d93..69c6bb1 100644 --- a/debian/patches/targets-to-build-shlib.patch +++ b/debian/patches/targets-to-build-shlib.patch @@ -7,14 +7,14 @@ This patch adds targets to build a shared library, instead. Forwarded: https://github.com/tsyrogit/zxcvbn-c/pull/8 --- - makefile | 23 ++++++++++++++++++++--- - 1 file changed, 20 insertions(+), 3 deletions(-) + makefile | 24 +++++++++++++++++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile -index ca5c352..7165ce2 100644 +index ca5c352..d74b139 100644 --- a/makefile +++ b/makefile -@@ -1,9 +1,24 @@ +@@ -1,9 +1,25 @@ CFLAGS ?= -O2 -Wall -Wextra -Wdeclaration-after-statement CPPFLAGS ?= -O2 -Wall -Wextra @@ -23,7 +23,7 @@ index ca5c352..7165ce2 100644 +CPPFLAGS += -I. + +# library metadata -+TARGET_LIB = libzxcvbn.so.0 ++TARGET_LIB = libzxcvbn.so.0.0.0 +SONAME = libzxcvbn.so.0 + WORDS = words-10k-pass.txt words-english.txt words-female.txt words-male.txt words-surname.txt @@ -37,10 +37,11 @@ index ca5c352..7165ce2 100644 + +$(TARGET_LIB): zxcvbn-inline.o + gcc $(CFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-soname,$(SONAME) -o $@ $^ -lm ++ if [ ! -e $(SONAME) ]; then ln -s $(TARGET_LIB) $(SONAME); fi test-file: test.c zxcvbn-file.o gcc $(CFLAGS) -DUSE_DICT_FILE -o test-file test.c zxcvbn-file.o -lm -@@ -42,11 +57,13 @@ zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h +@@ -42,11 +58,13 @@ zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h if [ ! -e zxcvbn.cpp ]; then ln -s zxcvbn.c zxcvbn.cpp; fi g++ $(CPPFLAGS) -DUSE_DICT_FILE -c -o zxcvbn-c++file.o zxcvbn.cpp @@ -55,10 +56,10 @@ index ca5c352..7165ce2 100644 @echo Testing C++ build, dictionary from file ./test-c++file -t testcases.txt @echo Testing C++ build, dictionary in executable -@@ -58,4 +75,4 @@ clean: +@@ -58,4 +76,4 @@ clean: rm -f test-inline zxcvbn-inline.o test-c++inline zxcvbn-c++inline.o rm -f dict-*.h zxcvbn.dict zxcvbn.cpp test.cpp rm -f dictgen - \ No newline at end of file -+ rm -f ${TARGET_LIB} libzxcvbn.so test-shlib ++ rm -f ${TARGET_LIB} ${SONAME} libzxcvbn.so test-shlib diff --git a/debian/patches/targets-to-build-static-lib.patch b/debian/patches/targets-to-build-static-lib.patch index e4ec3c9..35da165 100644 --- a/debian/patches/targets-to-build-static-lib.patch +++ b/debian/patches/targets-to-build-static-lib.patch @@ -11,7 +11,7 @@ Forwarded: https://github.com/tsyrogit/zxcvbn-c/pull/8 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile -index 7165ce2..f0bc552 100644 +index d74b139..b44b6e6 100644 --- a/makefile +++ b/makefile @@ -11,7 +11,7 @@ SONAME = libzxcvbn.so.0 @@ -23,9 +23,9 @@ index 7165ce2..f0bc552 100644 test-shlib: test.c $(TARGET_LIB) if [ ! -e libzxcvbn.so ]; then ln -s $(TARGET_LIB) libzxcvbn.so; fi -@@ -20,6 +20,12 @@ test-shlib: test.c $(TARGET_LIB) - $(TARGET_LIB): zxcvbn-inline.o +@@ -21,6 +21,12 @@ $(TARGET_LIB): zxcvbn-inline.o gcc $(CFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-soname,$(SONAME) -o $@ $^ -lm + if [ ! -e $(SONAME) ]; then ln -s $(TARGET_LIB) $(SONAME); fi +test-statlib: test.c libzxcvbn.a + gcc $(CFLAGS) $(LDFLAGS) -o $@ $^ -lm @@ -36,7 +36,7 @@ index 7165ce2..f0bc552 100644 test-file: test.c zxcvbn-file.o gcc $(CFLAGS) -DUSE_DICT_FILE -o test-file test.c zxcvbn-file.o -lm -@@ -57,13 +63,15 @@ zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h +@@ -58,13 +64,15 @@ zxcvbn-c++file.o: zxcvbn.c dict-crc.h zxcvbn.h if [ ! -e zxcvbn.cpp ]; then ln -s zxcvbn.c zxcvbn.cpp; fi g++ $(CPPFLAGS) -DUSE_DICT_FILE -c -o zxcvbn-c++file.o zxcvbn.cpp @@ -53,9 +53,9 @@ index 7165ce2..f0bc552 100644 @echo Testing C++ build, dictionary from file ./test-c++file -t testcases.txt @echo Testing C++ build, dictionary in executable -@@ -75,4 +83,4 @@ clean: +@@ -76,4 +84,4 @@ clean: rm -f test-inline zxcvbn-inline.o test-c++inline zxcvbn-c++inline.o rm -f dict-*.h zxcvbn.dict zxcvbn.cpp test.cpp rm -f dictgen -- rm -f ${TARGET_LIB} libzxcvbn.so test-shlib -+ rm -f ${TARGET_LIB} libzxcvbn.so test-shlib libzxcvbn.a test-statlib +- rm -f ${TARGET_LIB} ${SONAME} libzxcvbn.so test-shlib ++ rm -f ${TARGET_LIB} ${SONAME} libzxcvbn.so test-shlib libzxcvbn.a test-statlib |