Supply service & busconfig ACLs from the repo.

This change required as a part of privilege separation work:
  https://github.com/openbmc/openbmc/issues/3383

This change required by the following openbmc meta change:
  https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/42672

Signed-off-by: Anton D. Kachalov <gmouse@google.com>
Change-Id: Iad476fc32f9df6fe5ceb51e8eea2c798dcc51252
diff --git a/Makefile.am b/Makefile.am
index 7c7271e..1dbd594 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,5 +22,28 @@
                                  -DBOOST_SYSTEM_NO_DEPRECATED \
                                  -DBOOST_ERROR_CODE_HEADER_ONLY
 
+certmgrenvdir=$(datadir)/phosphor-certificate-manager
+dbuspolicy_DATA = phosphor-nslcd-cert-config.conf
+certmgrenv_DATA = nslcd
+SYSTEM_UNIT_ALIASES = \
+	../phosphor-certificate-manager@.service multi-user.target.wants/phosphor-certificate-manager@nslcd.service
+
 SUBDIRS = . phosphor-ldap-mapper phosphor-ldap-config test
 
+install-aliases-hook:
+	set -- $(SYSTEM_UNIT_ALIASES) && \
+	  dir=$(systemdsystemunitdir) && $(install-aliases)
+
+define install-aliases
+  while [ -n "$$1" ]; do \
+	$(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
+	rm -f $(DESTDIR)$$dir/$$2 && \
+	$(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
+	shift 2 || exit $$?; \
+  done
+endef
+
+INSTALL_DATA_HOOKS = \
+	install-aliases-hook
+
+install-data-hook: $(INSTALL_DATA_HOOKS)