Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
1.9 KiB

  1. diff --git a/.gitignore b/.gitignore
  2. index 8632252..b33bda3 100644
  3. --- a/.gitignore
  4. +++ b/.gitignore
  5. @@ -9,3 +9,8 @@ lib
  6. *.swp
  7. *.swo
  8. tmux-*.log
  9. +native-src/zxcvbn/*.o
  10. +native-src/zxcvbn/*.so
  11. +native-src/zxcvbn/_frequency_lists.?pp
  12. +native-src/zxcvbn/adjacency_graphs.?pp
  13. +
  14. diff --git a/native-src/zxcvbn/Makefile b/native-src/zxcvbn/Makefile
  15. new file mode 100644
  16. index 0000000..279c802
  17. --- /dev/null
  18. +++ b/native-src/zxcvbn/Makefile
  19. @@ -0,0 +1,70 @@
  20. +CXX = g++
  21. +CXXFLAGS = -c -std=c++14 -Wall -Wextra -fPIC
  22. +CPPFLAGS = -I..
  23. +
  24. +ifeq ($(DEBUG),yes)
  25. + CXXFLAGS += -g -O0
  26. +else
  27. + CXXFLAGS += -O2
  28. + CPPFLAGS += -DNDEBUG
  29. +endif
  30. +
  31. +PREFIX = /usr/local
  32. +LIBDIR = $(PREFIX)/lib
  33. +INCLUDEDIR = $(PREFIX)/include
  34. +
  35. +LIBRARY = libzxcvbncpp.so
  36. +
  37. +SCRIPTS_DIR = ../../data-scripts
  38. +DATA_DIR = ../../data
  39. +
  40. +OBJS = _frequency_lists.o \
  41. + adjacency_graphs.o \
  42. + feedback.o \
  43. + frequency_lists.o \
  44. + matching.o \
  45. + scoring.o \
  46. + time_estimates.o \
  47. + util.o \
  48. + zxcvbn.o
  49. +
  50. +HEADERS = _frequency_lists.hpp \
  51. + adjacency_graphs.hpp \
  52. + common.hpp \
  53. + feedback.hpp \
  54. + frequency_lists.hpp \
  55. + frequency_lists_common.hpp \
  56. + matching.hpp \
  57. + optional.hpp \
  58. + scoring.hpp \
  59. + time_estimates.hpp \
  60. + util.hpp \
  61. + zxcvbn.h
  62. +
  63. +$(LIBRARY): $(OBJS)
  64. + $(CXX) -shared -Wl,-soname,$(LIBRARY) -o $(LIBRARY) $(OBJS)
  65. +
  66. +_frequency_lists.cpp:
  67. + $(SCRIPTS_DIR)/build_frequency_lists.py $(DATA_DIR) $@
  68. +
  69. +_frequency_lists.hpp:
  70. + $(SCRIPTS_DIR)/build_frequency_lists.py $(DATA_DIR) $@
  71. +
  72. +adjacency_graphs.cpp:
  73. + $(SCRIPTS_DIR)/build_keyboard_adjacency_graphs.py $@
  74. +
  75. +adjacency_graphs.hpp:
  76. + $(SCRIPTS_DIR)/build_keyboard_adjacency_graphs.py $@
  77. +
  78. +%.o: %.cpp $(HEADERS)
  79. + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $<
  80. +
  81. +install: $(LIBRARY)
  82. + install -s -m 755 -D $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY)
  83. + mkdir -p $(DESTDIR)$(INCLUDEDIR)/zxcvbn
  84. + install -m 644 $(HEADERS) $(DESTDIR)$(INCLUDEDIR)/zxcvbn
  85. +
  86. +clean:
  87. + rm -f $(OBJS)
  88. +
  89. +.PHONY: clean