Makefile.am 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. SUBDIRS = src doc contrib
  2. EXTRA_DIST = version ChangeLog.old COPYING.BSD README.par README.par.old PKGBUILD
  3. # The sample configuration is handled in doc/Makefile.am
  4. install-data-hook:
  5. $(mkinstalldirs) "$(DESTDIR)$(cachedir)"
  6. test -f "$(DESTDIR)$(cachedir)/pdnsd.cache" || \
  7. touch "$(DESTDIR)$(cachedir)/pdnsd.cache"
  8. if test `whoami` = "root"; then \
  9. chown $(def_id) "$(DESTDIR)$(cachedir)/pdnsd.cache"; \
  10. chown $(def_id) "$(DESTDIR)$(cachedir)"; \
  11. fi
  12. chmod 0640 "$(DESTDIR)$(cachedir)/pdnsd.cache"
  13. chmod 0750 "$(DESTDIR)$(cachedir)"
  14. dist-hook: $(PACKAGE).spec.in
  15. sed -e '/^%{!?distro: %define distro /c\
  16. %if 0%{!?distro:1}\
  17. %if "%{_vendor}" == "redhat"\
  18. %define distro RedHat\
  19. %else\
  20. %if "%{_vendor}" == "suse"\
  21. %define distro SuSE\
  22. %else\
  23. %if "%{_vendor}" == "SuSE"\
  24. %define distro SuSE\
  25. %endif\
  26. %endif\
  27. %endif\
  28. %endif' \
  29. -e 's:[@]PACKAGE[@]:$(PACKAGE):g' \
  30. -e 's:[@]VERSION[@]:$(VERSION):g' \
  31. -e 's:[@]fullversion[@]:$(fullversion):g' \
  32. -e 's:[@]packagerelease[@]:$(packagerelease):g' \
  33. -e 's:[@]cachedir[@]:/var/cache/$(PACKAGE):g' \
  34. -e 's:[@]def_id[@]:$(PACKAGE):g' \
  35. $(PACKAGE).spec.in > $(distdir)/$(PACKAGE).spec