From 159fe7f2b2f9495c3cd405d1b8a45fd6a4ffb3f4 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Thu, 29 Dec 2011 15:30:07 +0100 Subject: [PATCH] Makefile: provide a 'dist-rpm-install' target Signed-off-by: Davide Madrisan --- ChangeLog | 4 ++++ Makefile | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 88aca0e..e216a9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,10 @@ Changes in version 1.8.2 * templates/kde4 - Davide Madrisan: Minor updates. + * Makefile - Davide Madrisan: + Provide a 'dist-rpm-install' target to install the rpm packages by a simple + 'make dist-rpm-install' command. + -------------------------------------------------------------------------------- Changes in version 1.8.1 - Christmas Release diff --git a/Makefile b/Makefile index cbc5b9e..6ce2797 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Makefile for autospec -# Copyright (C) 2004-2008 by Davide Madrisan +# Copyright (C) 2004-2008,2011 by Davide Madrisan # This program is free software; you can redistribute it and/or modify it under # the terms of version 2 of the GNU General Public License as published by the @@ -181,6 +181,13 @@ dist-rpm: dist $(PACKAGE).spec rpmbuild --clean -ba $$rpm_specdir/$(PACKAGE).spec) || exit 1 @echo "All done. Enjoy using $(PACKAGE)..." +dist-rpm-install: dist-rpm + @echo "Installing rpm packages..." + @rpm_pckdir=`rpm --eval=%{_rpmdir} 2>/dev/null`;\ + sudo rpm -hUv --force\ + $$rpm_pckdir/noarch/$(PACKAGE)-*${VERSION}-${RELEASE}.noarch.rpm\ + || exit 1 + clean: mostlyclean rm -f history/$(dist_archive)