## Todo

See this post: https://atomicules.co.uk/2019/01/17/Building-Spotifyd-on-NetBSD.html

## Done

1. Need to somewhat manually create patches. mkpatches doesn't pick up changes
from vendor directory. E.g, do `pkgdiff` in the directory and then edit patch
to reference correct location like:

		../vendor/daemonize-0.2.3/src/ffi.rs

2. Figure out why it can't find OpenSSL. Building _normally_ works fine, so
something to do with pkgsrc. Maybe need to set a variable somewhere.

		error: failed to run custom build command for `openssl-sys v0.9.39`
		process didn't exit successfully: `/usr/pkgsrc/wip/spotifyd/work/spotifyd-0.2.3/target/release/build/openssl-sys-db8d42dae8a7dcaf/build-script-main` (exit code: 101)
		--- stdout
		cargo:rerun-if-env-changed=X86_64_UNKNOWN_NETBSD_OPENSSL_LIB_DIR
		cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
		cargo:rerun-if-env-changed=X86_64_UNKNOWN_NETBSD_OPENSSL_INCLUDE_DIR
		cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
		cargo:rerun-if-env-changed=X86_64_UNKNOWN_NETBSD_OPENSSL_DIR
		cargo:rerun-if-env-changed=OPENSSL_DIR
		run pkg_config fail: "Failed to run `\"\" \"--libs\" \"--cflags\" \"openssl\"`: No such file or directory (os error 2)"

		--- stderr
		thread 'main' panicked at '

		Could not find directory of OpenSSL installation, and this `-sys` crate cannot
		proceed without this knowledge. If OpenSSL is installed and this crate had
		trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
		compilation process.

		Make sure you also have the development packages of openssl installed.
		For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

		If you're in a situation where you think the directory *should* be found
		automatically, please open a bug at https://github.com/sfackler/rust-openssl
		and include information about your system as well as this message.

		    $HOST = x86_64-unknown-netbsd
		    $TARGET = x86_64-unknown-netbsd
		    openssl-sys = 0.9.39

	Needed to set these:

		MAKE_ENV+= OPENSSL_INCLUDE_DIR=/usr/include/openssl
		MAKE_ENV+= OPENSSL_LIB_DIR=/usr/lib

	Actually though I probably need to copy what tealdeer does with openssl
