commit: e8bf352d60c5ea83d09a294fe217c905b176d5a2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Sun Mar 16 17:44:34 2014 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Sun Mar 16 18:00:02 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/python-updater.git;a=commit;h=e8bf352d
Add an install target to the Makefile --- Makefile | 27 ++++++++++++++++++++------- python-updater => python-updater.in | 0 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 30d33b8..a723c79 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,34 @@ # Makefile for python-updater MAN_INCLUDE=man.include VERSION=$(shell ./python-updater -V) -FILES=AUTHORS python-updater python-updater.1 +FILES=AUTHORS Makefile $(MAN_INCLUDE) python-updater.in python-updater.1 PKGDIR=python-updater-$(VERSION) TARBALL=$(PKGDIR).tar.bz2 +INSTALL ?= install +sbindir = $(EPREFIX)/usr/sbin +mandir = $(EPREFIX)/usr/share/man -all: python-updater.1 tarball +all: python-updater python-updater.1 -python-updater.1: python-updater $(MAN_INCLUDE) +python-updater: python-updater.in + sed -e "s:@GENTOO_PORTAGE_EPREFIX@:$(EPREFIX):g" $^ > $@ + chmod +x $@ + +python-updater.1: $(MAN_INCLUDE) help2man -L C -Ni $(MAN_INCLUDE) ./python-updater -o $@ sed -i -e 's/ in the manpage//' \ -e 's/\*[[:space:]]\([[:alpha:]]*\).*/\1 /' $@ -.PHONY: all clean tarball upload -clean: - rm -fr python-updater.1 *.bz2 $(PKGDIR) || true -tarball: $(FILES) +install: python-updater python-updater.1 + $(INSTALL) -d $(DESTDIR)$(sbindir) + $(INSTALL) -m0755 python-updater $(DESTDIR)$(sbindir) + $(INSTALL) -d $(DESTDIR)$(mandir)/man1 + $(INSTALL) -m0644 python-updater.1 $(DESTDIR)$(mandir)/man1 + +.PHONY: all clean tarball upload install +clean: python-updater + rm -fr python-updater python-updater.1 *.bz2 $(PKGDIR) || true +tarball: $(FILES) python-updater mkdir -p $(PKGDIR) cp $(FILES) $(PKGDIR) tar -cjf $(TARBALL) $(PKGDIR) diff --git a/python-updater b/python-updater.in old mode 100755 new mode 100644 similarity index 100% rename from python-updater rename to python-updater.in