New comment by abenson on void-packages repository https://github.com/void-linux/void-packages/pull/37554#issuecomment-1157814389 Comment: Moving everything to a patch cleans up the template quite a bit. Place [use-system-libraries.txt](https://github.com/void-linux/void-packages/files/8920339/use-system-libraries.txt) at `srcpkgs/libdpp/patches/use-system-libraries.patch` and then you can clean up the rest the template as follows: `post_extract()` can be simplified to ``` post_extract() { rm -r include/dpp/fmt rm -r include/dpp/nlohmann } ``` `do_clean()` should be ``` post_install() { vmkdir usr/lib/cmake/dpp mv ${DESTDIR}/usr/lib/*.cmake ${DESTDIR}/usr/lib/cmake/dpp rm -r "${DESTDIR}/usr/lib/dpp-${version%.*}" rm -r "${DESTDIR}/usr/include/dpp-${version%.*}" } ``` and `libdpp-devel_package()` should be ``` libdpp-devel_package() { depends="${makedepends} ${sourcepkg}>=${version}-${revision}" short_desc+=" - development files" pkg_install() { vmove usr/lib/pkgconfig vmove usr/lib/cmake/dpp vmove usr/include vmove "usr/lib/*.so" } } ```