diff --git a/srcpkgs/zxcvbn-c-devel b/srcpkgs/zxcvbn-c-devel new file mode 120000 index 00000000000..7fb17dea9b5 --- /dev/null +++ b/srcpkgs/zxcvbn-c-devel @@ -0,0 +1 @@ +zxcvbn-c \ No newline at end of file diff --git a/srcpkgs/zxcvbn-c/patches/cross-run-dictgen.patch b/srcpkgs/zxcvbn-c/patches/cross-run-dictgen.patch new file mode 100644 index 00000000000..d28eb084deb --- /dev/null +++ b/srcpkgs/zxcvbn-c/patches/cross-run-dictgen.patch @@ -0,0 +1,15 @@ +--- a/makefile ++++ b/makefile +@@ -57,10 +57,10 @@ zxcvbn-inline.o: zxcvbn.c dict-src.h zxc + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o zxcvbn-inline.o zxcvbn.c + + dict-src.h: dictgen $(WORDS) +- ./dictgen -o dict-src.h $(WORDS) ++ $(VOID_QEMU) ./dictgen -o dict-src.h $(WORDS) + + dict-crc.h: dictgen $(WORDS) +- ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) ++ $(VOID_QEMU) ./dictgen -b -o zxcvbn.dict -h dict-crc.h $(WORDS) + + dictgen: dict-generate.cpp makefile + $(CXX) $(CPPFLAGS) -std=c++11 $(CXXFLAGS) \ diff --git a/srcpkgs/zxcvbn-c/template b/srcpkgs/zxcvbn-c/template new file mode 100644 index 00000000000..647705b2006 --- /dev/null +++ b/srcpkgs/zxcvbn-c/template @@ -0,0 +1,41 @@ +# Template file for 'zxcvbn-c' +pkgname=zxcvbn-c +version=2.5 +revision=1 +build_helper=qemu +short_desc="C/C++ version of the zxcvbn password strength estimator" +maintainer="Đoàn Trần Công Danh " +license="MIT" +homepage="https://github.com/tsyrogit/zxcvbn-c" +distfiles="http://dev-www.libreoffice.org/src/${pkgname}-${version}.tar.gz" +checksum=77d6c6ecb35952a8d8ce7f736b7a2bf466275c48210e309b73782d6b7e84dffd + +do_build() { + if [ "$CROSS_BUILD" ]; then + export VOID_QEMU=qemu-${XBPS_TARGET_QEMU_MACHINE}-static + fi + make ${makejobs} +} + +do_check() { + make test +} + +do_install() { + vmkdir usr/lib + vmkdir usr/share/zxcvbn + vcopy "libzxcvbn.so.*" usr/lib + vinstall zxcvbn.dict 0644 usr/share/zxcvbn +} + +zxcvbn-c-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vbin dictgen zxcvbn-dictgen + vmkdir usr/include + vinstall zxcvbn.h 0644 usr/include + vmkdir usr/lib + vinstall libzxcvbn.so 0644 usr/lib + } +}