#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. #export DH_VERBOSE = 1 _k8s_name := kubernetes _bindir := /usr/bin _local_sbindir := /usr/local/sbin _curr_stage1 := /usr/local/kubernetes/current/stage1 _curr_stage2 := /usr/local/kubernetes/current/stage2 DEBIAN_DESTDIR := $(CURDIR)/debian/tmp stage_link = ln -v -sf ${1}${2}/${3} ${DEBIAN_DESTDIR}${2}/${3} %: dh $@ --builddirectory=contrib override_dh_auto_build: mkdir -pv contrib cp -rv init contrib override_dh_install: # Current staged directories install -v -m 755 -d ${DEBIAN_DESTDIR}${_curr_stage1} install -v -m 755 -d ${DEBIAN_DESTDIR}${_curr_stage2} # Symlink targets install -v -m 755 -d ${DEBIAN_DESTDIR}${_bindir} install -v -m 755 -d ${DEBIAN_DESTDIR}/etc/systemd/system/kubelet.service.d install -v -m 755 -d ${DEBIAN_DESTDIR}/usr/share/bash-completion/completions $(call stage_link,${_curr_stage1},${_bindir},kubeadm) $(call stage_link,${_curr_stage2},/etc/systemd/system/kubelet.service.d,kubeadm.conf) $(call stage_link,${_curr_stage2},/usr/share/bash-completion/completions,kubectl) $(call stage_link,${_curr_stage2},${_bindir},kubelet-cgroup-setup.sh) $(call stage_link,${_curr_stage2},${_bindir},kubelet) $(call stage_link,${_curr_stage2},${_bindir},kubectl) # install environment files install -v -d -m 0755 ${DEBIAN_DESTDIR}/etc/${_k8s_name} install -v -m 644 -t ${DEBIAN_DESTDIR}/etc/${_k8s_name} contrib/init/systemd/environ/config install -v -m 644 -t ${DEBIAN_DESTDIR}/etc/${_k8s_name} contrib/init/systemd/environ/kubelet install -v -m 644 -t ${DEBIAN_DESTDIR}/etc/${_k8s_name} contrib/init/systemd/environ/kubelet.kubeconfig install -v -m 644 -t ${DEBIAN_DESTDIR}/etc/${_k8s_name} contrib/init/systemd/environ/proxy install -v -m 644 -t ${DEBIAN_DESTDIR}/etc/${_k8s_name} debian/kubelet_override.yaml # install config files install -v -d -m 0755 ${DEBIAN_DESTDIR}/usr/lib/tmpfiles.d install -v -p -m 0644 -t ${DEBIAN_DESTDIR}/usr/lib/tmpfiles.d contrib/init/systemd/tmpfiles.d/kubernetes.conf mkdir -p ${DEBIAN_DESTDIR}/run install -v -d -m 0755 ${DEBIAN_DESTDIR}/run/${_k8s_name}/ # install service files install -v -d -m 0755 ${DEBIAN_DESTDIR}/usr/lib/systemd/system install -v -m 0644 -t ${DEBIAN_DESTDIR}/usr/lib/systemd/system contrib/init/systemd/kubelet.service # install the place the kubelet defaults to put volumes (/var/lib/kubelet) install -v -d ${DEBIAN_DESTDIR}/var/lib/kubelet # enable CPU and Memory accounting install -v -d -m 0755 ${DEBIAN_DESTDIR}/etc/systemd/system.conf.d install -v -p -m 0644 -t ${DEBIAN_DESTDIR}/etc/systemd/system.conf.d debian/kubernetes-accounting.conf # install scripts install -v -m 0700 -d ${DEBIAN_DESTDIR}${_local_sbindir} install -v -m 0700 -t ${DEBIAN_DESTDIR}${_local_sbindir} debian/sanitize_kubelet_reserved_cpus.sh install -v -m 0700 -t ${DEBIAN_DESTDIR}${_local_sbindir} debian/upgrade_k8s_config.sh dh_install override_dh_usrlocal: override_dh_auto_test: