]> git.ipfire.org Git - collecty.git/blobdiff - Makefile
Fix installation.
[collecty.git] / Makefile
index bf005bc4680eae0960d660a934d3b5524f64ea48..2e1b01813416ae9fb340582d90f35c269ad01a49 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,40 @@
+###############################################################################
+#                                                                             #
+# collecty - A system statistics collection daemon for IPFire                 #
+# Copyright (C) 2012 IPFire development team                                  #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
 
 NAME = collecty
+VERSION = 0.0.1
 
 DESTDIR =
-PYTHON_VER := $(shell python --version 2>&1 | awk '{ print $$NF }')
-PYTHON_DIR = $(DESTDIR)/usr/lib/python$(PYTHON_VER)/site-packages/$(NAME)/
+PYTHON_VER := $(shell python -c "import platform; print '.'.join(platform.python_version_tuple()[:2])")
+PYTHON_DIR = $(DESTDIR)/usr/lib/python$(PYTHON_VER)/site-packages/
 
 all:
 
+dist:
+       git archive --format=tar --prefix=$(NAME)-$(VERSION)/ HEAD | gzip -9 \
+               > $(NAME)-$(VERSION).tar.gz
+
 install:
        -mkdir -pv $(PYTHON_DIR)
        cp -rvf collecty $(PYTHON_DIR)
-       install -v -m 755 colletyd $(DESTDIR)/usr/sbin
+       install -v -m 755 collectyd $(DESTDIR)/usr/sbin
 
        -mkdir -pv $(DESTDIR)/var/rrd