diff options
author | Philip Knirsch <pknirsch@hamburg.stuttgart.redhat.com> | 2009-02-23 18:03:35 +0100 |
---|---|---|
committer | Philip Knirsch <pknirsch@hamburg.stuttgart.redhat.com> | 2009-02-23 18:03:35 +0100 |
commit | 80093be74fbed8d4459938e19ff00920a41a9712 (patch) | |
tree | c73b82af32e34b7a74bdfd4ca96c4ff3f6cd2465 /Makefile | |
parent | c02f25afb09ff1f38484a8b69c4dcc85ed2378c7 (diff) | |
download | tuned-80093be74fbed8d4459938e19ff00920a41a9712.tar.gz tuned-80093be74fbed8d4459938e19ff00920a41a9712.tar.xz tuned-80093be74fbed8d4459938e19ff00920a41a9712.zip |
- Real first complete version with initscript, config file and
proper Makefile and packaging.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 63 |
1 files changed, 47 insertions, 16 deletions
@@ -1,21 +1,32 @@ -NAME=tuned -VERSION=$(shell awk '/^Version:/ {print $$2}' tuned.spec) -RELEASE=$(shell awk '/^Release:/ {print $$2}' tuned.spec) -VERSIONED_NAME=$(NAME)-$(VERSION) +NAME = tuned +VERSION = $(shell awk '/^Version:/ {print $$2}' tuned.spec) +RELEASE = $(shell awk '/^Release:/ {print $$2}' tuned.spec) +VERSIONED_NAME = $(NAME)-$(VERSION) -DESTDIR=/ -MANDIR=/usr/share/man/ +DESTDIR = / +MANDIR = /usr/share/man/ GITTAG = r$(subst .,-,$(VERSION)) DIRS = doc contrib tuningplugins monitorplugins -FILES = tuned -DOCS = AUTHORS ChangeLog COPYING INSTALL NEWS README tuned.spec +FILES = tuned tuned.spec Makefile tuned.py tuned.initscript tuned.conf +FILES_doc = doc/README.txt doc/TIPS.txt +FILES_contrib = contrib/diskdevstat contrib/netdevstat +FILES_tuningplugins = tuningplugins/disk.py tuningplugins/net.py tuningplugins/__init__.py +FILES_monitorplugins = monitorplugins/disk.py monitorplugins/net.py monitorplugins/__init__.py +DOCS = AUTHORS ChangeLog COPYING INSTALL NEWS README archive: rm -rf $(VERSIONED_NAME) mkdir -p $(VERSIONED_NAME) cp $(FILES) $(VERSIONED_NAME)/ cp $(DOCS) $(VERSIONED_NAME)/ + for dir in $(DIRS); do \ + mkdir -p $(VERSIONED_NAME)/$$dir; \ + done; + cp $(FILES_doc) $(VERSIONED_NAME)/doc + cp $(FILES_contrib) $(VERSIONED_NAME)/contrib + cp $(FILES_tuningplugins) $(VERSIONED_NAME)/tuningplugins + cp $(FILES_monitorplugins) $(VERSIONED_NAME)/monitorplugins tar cjf $(VERSIONED_NAME).tar.bz2 $(VERSIONED_NAME) ln -fs $(VERSIONED_NAME).tar.bz2 latest-archive @@ -28,25 +39,45 @@ srpm: archive mkdir rpm-build-dir rpmbuild --define "_sourcedir `pwd`/rpm-build-dir" --define "_srcrpmdir `pwd`/rpm-build-dir" \ --define "_specdir `pwd`/rpm-build-dir" --nodeps -ts $(VERSIONED_NAME).tar.bz2 - rm -rf rpm-build-dir build: - # Make Magicfilter + # Nothing to build install: mkdir -p $(DESTDIR) # Install the binaries - mkdir -p $(DESTDIR)/usr/bin/ + mkdir -p $(DESTDIR)/usr/sbin/ + install -m 0755 tuned $(DESTDIR)/usr/sbin/ + + # Install the plugins and classes + mkdir -p $(DESTDIR)/usr/share/$(NAME)/ + mkdir -p $(DESTDIR)/usr/share/$(NAME)/tuningplugins + mkdir -p $(DESTDIR)/usr/share/$(NAME)/monitorplugins + install -m 0644 tuned.py $(DESTDIR)/usr/share/$(NAME)/ + for file in $(FILES_tuningplugins); do \ + install -m 0644 $$file $(DESTDIR)/usr/share/$(NAME)/tuningplugins; \ + done + for file in $(FILES_monitorplugins); do \ + install -m 0644 $$file $(DESTDIR)/usr/share/$(NAME)/monitorplugins; \ + done + + # Install contrib systemtap scripts + for file in $(FILES_contrib); do \ + install -m 0755 $$file $(DESTDIR)/usr/sbin/; \ + done + + # Install config file + mkdir -p $(DESTDIR)/etc + install -m 0644 tuned.conf $(DESTDIR)/etc - mkdir -p $(DESTDIR)/etc/alchemist/namespace/printconf - install -m 0644 adl_files/rpm.adl adl_files/local.adl $(DESTDIR)/etc/alchemist/namespace/printconf/ + # Install initscript + mkdir -p $(DESTDIR)/etc/rc.d/init.d + install -m 0755 tuned.initscript $(DESTDIR)/etc/rc.d/init.d/tuned - # drop in some basics - install -m 0644 printcap.local $(DESTDIR)/etc/ clean: - rm -rf *.pyc monitorplugins/*.pyc tuningplugins/*.pyc + rm -rf *.pyc monitorplugins/*.pyc tuningplugins/*.pyc $(VERSIONED_NAME) rpm-build-dir .PHONY: clean archive srpm tag |