Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())')
  6. APTCONFDIR = $(SYSCONFDIR)/apt
  7. YUMCONFDIR = $(SYSCONFDIR)/yum.conf.d
  8. QUBESLIBDIR = $(LIBDIR)/qubes
  9. QUBESSTATEDIR = $(STATEDIR)/qubes
  10. DIST ?= fc18
  11. .PHONY: install install-apt install-dnf install-rpm install-yum
  12. install:
  13. install -d $(DESTDIR)$(QUBESLIBDIR)
  14. install -t $(DESTDIR)$(QUBESLIBDIR) \
  15. qubes-download-dom0-updates.sh \
  16. upgrades-installed-check \
  17. upgrades-status-notify
  18. install -d -m 2775 $(DESTDIR)$(QUBESSTATEDIR)/dom0-updates
  19. install-apt:
  20. install -d $(DESTDIR)$(APTCONFDIR)/sources.list.d
  21. sed -e "s/@DIST@/`lsb_release -cs`/" apt-qubes-r4.list.in \
  22. > $(DESTDIR)$(APTCONFDIR)/sources.list.d/qubes-r4.list
  23. install -D -m 0644 apt-qubes-archive-keyring.gpg \
  24. $(DESTDIR)$(APTCONFDIR)/trusted.gpg.d/qubes-archive-keyring.gpg
  25. install -D -m 0644 apt-conf-00notify-hook \
  26. $(DESTDIR)$(APTCONFDIR)/apt.conf.d/00notify-hook
  27. install -D -m 0644 apt-conf-70no-unattended \
  28. $(DESTDIR)$(APTCONFDIR)/apt.conf.d/70no-unattended
  29. install -D -m 0644 apt-conf-10no-cache \
  30. $(DESTDIR)$(APTCONFDIR)/apt.conf.d/10no-cache
  31. install-dnf: install-rpm
  32. install -D -m 0644 dnf-qubes-hooks.py \
  33. $(DESTDIR)$(PYTHON2_SITELIB)/dnf-plugins/qubes-hooks.py
  34. install -D -m 0644 dnf-qubes-hooks.py \
  35. $(DESTDIR)$(PYTHON3_SITELIB)/dnf-plugins/qubes-hooks.py
  36. install -D -m 0644 dnf-qubes-hooks.conf $(DESTDIR)$(SYSCONFDIR)/dnf/plugins/qubes-hooks.conf
  37. install-yum: install-rpm
  38. install -d $(DESTDIR)$(LIBDIR)/yum-plugins
  39. install -D -m 0644 yum-qubes-hooks.py \
  40. $(DESTDIR)$(LIBDIR)/yum-plugins/yum-qubes-hooks.py
  41. install -D -m 0644 yum-qubes-hooks.conf \
  42. $(DESTDIR)$(SYSCONFDIR)/yum/pluginconf.d/yum-qubes-hooks.conf
  43. install-rpm:
  44. install -d $(DESTDIR)$(SYSCONFDIR)/yum.repos.d
  45. DIST='$(DIST)'; sed -e "s/@DIST@/$${DIST%%[0-9]*}/g" yum-qubes-r4.repo.in \
  46. > $(DESTDIR)$(SYSCONFDIR)/yum.repos.d/qubes-r4.repo
  47. install -d $(DESTDIR)$(SYSCONFDIR)/pki/rpm-gpg
  48. install -t $(DESTDIR)$(SYSCONFDIR)/pki/rpm-gpg -m 0644 RPM-GPG-KEY-qubes*
  49. install -d $(DESTDIR)$(YUMCONFDIR)
  50. > $(DESTDIR)$(YUMCONFDIR)/qubes-proxy.conf