summaryrefslogtreecommitdiffstats
path: root/contrib/debian/rules
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2016-11-23 15:49:10 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2016-11-23 15:49:10 +0000
commit87649cf32bd0e14d5a903fb85b01e9f41a253540 (patch)
treebbefda6dac074aeb87529592e8e5064f69cbe024 /contrib/debian/rules
parentImported Upstream version 1.3.0+dfsg (diff)
downloadnetdata-87649cf32bd0e14d5a903fb85b01e9f41a253540.tar.xz
netdata-87649cf32bd0e14d5a903fb85b01e9f41a253540.zip
New upstream version 1.4.0+dfsgupstream/1.4.0+dfsg
Diffstat (limited to 'contrib/debian/rules')
-rwxr-xr-xcontrib/debian/rules87
1 files changed, 0 insertions, 87 deletions
diff --git a/contrib/debian/rules b/contrib/debian/rules
deleted file mode 100755
index ec4ec4182..000000000
--- a/contrib/debian/rules
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/make -f
-
-# Find the arch we are building for, as this determines
-# the location of plugins in /usr/lib
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-TOP = $(CURDIR)/debian/netdata
-
-%:
- # For jessie and beyond
- #
- dh $@ --with autoreconf,systemd
-
- # For wheezy or other non-systemd distributions use the following. You
- # should also see contrib/README.md which gives details of updates to
- # make to debian/control.
- #
- #dh $@ --with autoreconf
-
-override_dh_auto_configure:
- dh_auto_configure -- --with-math --with-webdir=/var/lib/netdata/www
-
-debian/%.postinst: debian/%.postinst.in
- sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $< > $@
-
-override_dh_install: debian/netdata.postinst
- dh_install
-
- # Remove unneeded .keep files
- #
- find "$(TOP)" -name .keep -exec rm '{}' ';'
-
- # Move files that local user shouldn't be editing to /usr/share/netdata
- #
- mkdir -p "$(TOP)/usr/share/netdata"
- for D in $$(find "$(TOP)/var/lib/netdata/www/" -maxdepth 1 -type d -printf '%f '); do \
- echo Relocating $$D; \
- mv "$(TOP)/var/lib/netdata/www/$$D" "$(TOP)/usr/share/netdata/$$D"; \
- ln -s "/usr/share/netdata/$$D" "$(TOP)/var/lib/netdata/www/$$D"; \
- done
-
- # Update postinst to set correct group for www files on installation.
- # Should probably be dpkg-statoverride really, but that gets *really*
- # messy. We also set all web files in /var as conffiles so an upgrade
- # doesn't splat them.
- #
- for D in $$(find "$(TOP)/var/lib/netdata/www/" -maxdepth 1 -type f -printf '%f '); do \
- echo Updating postinst for $$D; \
- sed -i "s/^#PERMS#/chgrp netdata \/var\/lib\/netdata\/www\/$$D\n#PERMS#/g" \
- $(CURDIR)/debian/netdata.postinst; \
- echo "/var/lib/netdata/www/$$D" >> $(CURDIR)/debian/netdata.conffiles; \
- done
- sed -i "/^#PERMS#/d" $(CURDIR)/debian/netdata.postinst
-
-override_dh_installdocs:
- dh_installdocs
-
- # Docs should not be under /usr/lib
- #
- mv $(TOP)/usr/lib/$(DEB_HOST_MULTIARCH)/netdata/plugins.d/README.md \
- $(TOP)/usr/share/doc/netdata/README.plugins.md
- mv $(TOP)/usr/lib/$(DEB_HOST_MULTIARCH)/netdata/charts.d/README.md \
- $(TOP)/usr/share/doc/netdata/README.charts.md
-
- # This doc is currently empty, so no point installing it.
- #
- rm $(TOP)/usr/lib/$(DEB_HOST_MULTIARCH)/netdata/node.d/README.md
-
-override_dh_fixperms:
- dh_fixperms
-
- # apps.plugin should only be runnable by the netdata user. It will be
- # given extra capabilities in the postinst script.
- #
- chmod 0754 $(TOP)/usr/lib/$(DEB_HOST_MULTIARCH)/netdata/plugins.d/apps.plugin
-
-override_dh_installlogrotate:
- cp system/netdata.logrotate debian/netdata.logrotate
- dh_installlogrotate
-
-override_dh_clean:
- dh_clean
-
- # Tidy up copied/generated files
- #
- -[ -r $(CURDIR)/debian/netdata.logrotate ] && rm $(CURDIR)/debian/netdata.logrotate
- -[ -r $(CURDIR)/debian/netdata.postinst ] && rm $(CURDIR)/debian/netdata.postinst
- -[ -r $(CURDIR)/debian/netdata.conffiles ] && rm $(CURDIR)/debian/netdata.conffiles