Makefile 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. LIBDIR ?= /usr/lib
  2. STATEDIR ?= /var/lib
  3. SYSCONFDIR ?= /etc
  4. PYTHON2_SITELIB = $(shell python2 -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()')
  5. PYTHON3_SITELIB = $(shell $(PYTHON) -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())')
  6. ifeq ($(shell rpm --eval %{centos_ver} 2>/dev/null),8)
  7. PLATEFORM_PYTHON3_SITELIB = $(shell /usr/libexec/platform-python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())')
  8. endif
  9. APTCONFDIR = $(SYSCONFDIR)/apt
  10. YUMCONFDIR = $(SYSCONFDIR)/yum.conf.d
  11. QUBESLIBDIR = $(LIBDIR)/qubes
  12. QUBESSTATEDIR = $(STATEDIR)/qubes
  13. DIST ?= fc18
  14. .PHONY: install install-apt install-dnf install-rpm install-yum
  15. install:
  16. install -d $(DESTDIR)$(QUBESLIBDIR)
  17. install -t $(DESTDIR)$(QUBESLIBDIR) \
  18. qubes-download-dom0-updates.sh \
  19. upgrades-installed-check \
  20. upgrades-status-notify
  21. install -d -m 2775 $(DESTDIR)$(QUBESSTATEDIR)/dom0-updates
  22. install-apt:
  23. install -d $(DESTDIR)$(APTCONFDIR)/sources.list.d
  24. sed -e "s/@DIST@/`lsb_release -cs`/" apt-qubes-r4.list.in \
  25. > $(DESTDIR)$(APTCONFDIR)/sources.list.d/qubes-r4.list
  26. install -D -m 0644 apt-qubes-archive-keyring.gpg \
  27. $(DESTDIR)$(APTCONFDIR)/trusted.gpg.d/qubes-archive-keyring.gpg
  28. install -D -m 0644 apt-conf-00notify-hook \
  29. $(DESTDIR)$(APTCONFDIR)/apt.conf.d/00notify-hook
  30. install -D -m 0644 apt-conf-70no-unattended \
  31. $(DESTDIR)$(APTCONFDIR)/apt.conf.d/70no-unattended
  32. install -D -m 0644 apt-conf-10no-cache \
  33. $(DESTDIR)$(APTCONFDIR)/apt.conf.d/10no-cache
  34. install-dnf: install-rpm
  35. install -D -m 0644 dnf-qubes-hooks.py \
  36. $(DESTDIR)$(PYTHON2_SITELIB)/dnf-plugins/qubes-hooks.py
  37. ifeq ($(shell rpm --eval %{centos_ver} 2>/dev/null),8)
  38. # we need to stick to related DNF python version
  39. # which is given by platform-python
  40. install -D -m 0644 dnf-qubes-hooks.py \
  41. $(DESTDIR)$(PLATEFORM_PYTHON3_SITELIB)/dnf-plugins/qubes-hooks.py
  42. else
  43. install -D -m 0644 dnf-qubes-hooks.py \
  44. $(DESTDIR)$(PYTHON3_SITELIB)/dnf-plugins/qubes-hooks.py
  45. endif
  46. install -D -m 0644 dnf-qubes-hooks.conf $(DESTDIR)$(SYSCONFDIR)/dnf/plugins/qubes-hooks.conf
  47. install-yum: install-rpm
  48. install -d $(DESTDIR)$(LIBDIR)/yum-plugins
  49. install -D -m 0644 yum-qubes-hooks.py \
  50. $(DESTDIR)$(LIBDIR)/yum-plugins/yum-qubes-hooks.py
  51. install -D -m 0644 yum-qubes-hooks.conf \
  52. $(DESTDIR)$(SYSCONFDIR)/yum/pluginconf.d/yum-qubes-hooks.conf
  53. install-rpm:
  54. install -d $(DESTDIR)$(SYSCONFDIR)/yum.repos.d
  55. DIST='$(DIST)'; sed -e "s/@DIST@/$${DIST%%[0-9]*}/g" yum-qubes-r4.repo.in \
  56. > $(DESTDIR)$(SYSCONFDIR)/yum.repos.d/qubes-r4.repo
  57. install -d $(DESTDIR)$(SYSCONFDIR)/pki/rpm-gpg
  58. install -t $(DESTDIR)$(SYSCONFDIR)/pki/rpm-gpg -m 0644 RPM-GPG-KEY-qubes*
  59. install -d $(DESTDIR)$(YUMCONFDIR)
  60. > $(DESTDIR)$(YUMCONFDIR)/qubes-proxy.conf