confdir = $(sysconfdir)/mapi conf_DATA = mapi.conf # override the default conf install to check for mapi.conf overwrite install-confDATA: $(conf_DATA) @$(NORMAL_INSTALL) test -z "$(confdir)" || mkdir -p "$(DESTDIR)$(confdir)" @list='$(conf_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -e "$(DESTDIR)$(confdir)/$$p"; then \ echo -e "\nConfig file $$p already exists in $(DESTDIR)$(confdir) - not overwriting...\n"; \ else \ f=$(am__strip_dir) \ echo " $(confDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(confdir)/$$f'"; \ $(confDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(confdir)/$$f"; \ fi \ done # ssl stuff if SSL_IS_ENABLED install-data-local: echo Generating SSL keys openssl genrsa -out mapicommd_key.pem 1024 2> /dev/null openssl req -new -x509 -days 30000 -key mapicommd_key.pem -out mapicommd_cert.pem -config mapicommd_cert.cnf ${INSTALL} -m 600 mapicommd_key.pem $(DESTDIR)$(confdir)/mapicommd_key.pem ${INSTALL} -m 600 mapicommd_cert.pem $(DESTDIR)$(confdir)/mapicommd_cert.pem rm mapicommd_key.pem mapicommd_cert.pem uninstall-local: rm -f $(DESTDIR)$(confdir)/mapicommd_key.pem rm -f $(DESTDIR)$(confdir)/mapicommd_cert.pem endif