Swith to building with CMake to avoid huge patching of the stock Makefile. Reorganize Makefile for consistency between packages. Add patch to fix deprecated OpenSSL functions. Signed-off-by: Rosen Penev <rosenp@gmail.com>