Fix #1217 spec file fails to build due to duplicate files and unused files

Allow a successful build of the rpm SPEC file. The patch removes duplicate entries, unused file use during compilation and adds check_ldaps