From 14638901127c2e3115b1ec72e27412006a614e66 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 19 Nov 2013 17:20:45 +0000 Subject: [PATCH] scstadmin: Use the "install_vendor" method when building an RPM git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5132 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/Makefile | 2 +- scstadmin/scstadmin.spec.in | 12 ++++++------ scstadmin/scstadmin.sysfs/Makefile | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scstadmin/Makefile b/scstadmin/Makefile index 85608693c..53821b3a8 100644 --- a/scstadmin/Makefile +++ b/scstadmin/Makefile @@ -68,7 +68,7 @@ DEFAULTDIR := $(shell if [ -f /etc/gentoo-release ]; then \ all: cd $(SCSTADMIN_DIR) && $(MAKE) $@ -install: +install install_vendor: @if [ -z "$(DESTDIR)" ] && rpm -q scstadmin >/dev/null 2>&1; then \ echo Error: the scstadmin RPM must be uninstalled first; false; fi @if ! perl -MExtUtils::MakeMaker -e '' >/dev/null 2>&1; then \ diff --git a/scstadmin/scstadmin.spec.in b/scstadmin/scstadmin.spec.in index aa0d14045..e1c57cf7f 100644 --- a/scstadmin/scstadmin.spec.in +++ b/scstadmin/scstadmin.spec.in @@ -25,8 +25,8 @@ Authors: -------- Mark R. Buechler, Bart Van Assche and others -%define scstadmin_perl_installsiteman3dir \ - %(perl -V:installsiteman3dir | sed "s|.*='||;s|'.*||") +%define scstadmin_perl_installvendorman3dir \ + %(perl -V:installvendorman3dir | sed "s|.*='||;s|'.*||") %define scstadmin_perl_process_packlist \ set -x;\ if test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT%perl_vendorarch/auto; then \ @@ -49,7 +49,7 @@ export PREFIX=%{_prefix} DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} %install export PREFIX=%{_prefix} DESTDIR=%{buildroot} MANDIR=%{buildroot}%{_mandir} -%{make} install +%{make} install_vendor %scstadmin_perl_process_packlist rm -rf %{buildroot}/var/adm/perl-modules/scst @@ -68,10 +68,10 @@ rm -f /usr/local/man/man5/scst.conf.5* %config(noreplace) /etc/default/scst /etc/init.d/scst %{_sbindir}/scstadmin -%{perl_sitelib}/SCST -%{perl_sitearch}/auto/SCST-SCST +%{perl_vendorlib}/SCST +%{perl_vendorarch}/auto/SCST-SCST %{_mandir}/man1/scstadmin.1* -%{scstadmin_perl_installsiteman3dir}/SCST::SCST.3pm* +%{scstadmin_perl_installvendorman3dir}/SCST::SCST.3pm* %{_mandir}/man5/scst.5* %{_mandir}/man5/scst.conf.5* diff --git a/scstadmin/scstadmin.sysfs/Makefile b/scstadmin/scstadmin.sysfs/Makefile index 6c3f6532d..d6e9ee34c 100644 --- a/scstadmin/scstadmin.sysfs/Makefile +++ b/scstadmin/scstadmin.sysfs/Makefile @@ -9,8 +9,8 @@ SBINDIR := $(PREFIX)/sbin all: perl-module -install: all - $(MAKE) -C scst-$(MODULE_VERSION) install DESTDIR=$(DESTDIR) +install install_vendor: all + $(MAKE) -C scst-$(MODULE_VERSION) $@ DESTDIR=$(DESTDIR) install -d $(DESTDIR)$(SBINDIR) install -m 755 $(TOOL) $(DESTDIR)$(SBINDIR)