1
0

Accepting request 155509 from home:rmilasan:branches:Base:System

- Make installation of systemd unit and udev files more flexible.
  add: multipath-tools-make-flexible-install-of-systemd-and-udev-files.patch

OBS-URL: https://build.opensuse.org/request/show/155509
OBS-URL: https://build.opensuse.org/package/show/Base:System/multipath-tools?expand=0&rev=43
This commit is contained in:
Robert Milasan 2013-02-15 12:31:32 +00:00 committed by Git OBS Bridge
parent 242e73895f
commit d42cda7529
3 changed files with 48 additions and 6 deletions

View File

@ -0,0 +1,29 @@
Index: multipath-tools-0.4.9/Makefile.inc
===================================================================
--- multipath-tools-0.4.9.orig/Makefile.inc
+++ multipath-tools-0.4.9/Makefile.inc
@@ -21,10 +21,14 @@ ifndef LIB
endif
endif
+ifndef SYSDPATH
+ SYSDPATH=lib
+endif
+
prefix =
exec_prefix = $(prefix)
bindir = $(exec_prefix)/sbin
-libudevdir = ${prefix}/lib/udev
+libudevdir = ${prefix}/$(SYSDPATH)/udev
multipathdir = $(TOPDIR)/libmultipath
mandir = $(prefix)/usr/share/man/man8
man5dir = $(prefix)/usr/share/man/man5
@@ -32,7 +36,7 @@ man3dir = $(prefix)/usr/share/man/m
rcdir = $(prefix)/etc/init.d
syslibdir = $(prefix)/$(LIB)
libdir = $(prefix)/$(LIB)/multipath
-unitdir = $(prefix)/lib/systemd/system
+unitdir = $(prefix)/$(SYSDPATH)/systemd/system
mpathpersistdir = $(TOPDIR)/libmpathpersist
GZIP = /bin/gzip -9 -c

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 15 12:15:09 UTC 2013 - rmilasan@suse.com
- Make installation of systemd unit and udev files more flexible.
add: multipath-tools-make-flexible-install-of-systemd-and-udev-files.patch
-------------------------------------------------------------------
Fri Feb 1 10:29:11 CET 2013 - hare@suse.de

View File

@ -36,6 +36,12 @@ Group: System/Base
Source: multipath-tools-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch0: %{name}-%{version}-opensuse-12.3.diff.bz2
Patch1: multipath-tools-make-flexible-install-of-systemd-and-udev-files.patch
%if %suse_version > 1220
%define _sysdir usr/lib
%else
%define _sysdir lib
%endif
%description
This package provides the tools to manage multipathed devices by
@ -90,12 +96,13 @@ Authors:
%prep
%setup -q -n multipath-tools-%{version}
%patch0 -p1
%patch1 -p1
%build
make CC="%__cc" OPTFLAGS="$RPM_OPT_FLAGS" LIB=%_lib
make CC="%__cc" OPTFLAGS="$RPM_OPT_FLAGS" LIB=%{_lib} SYSDPATH=%{_sysdir}
%install
make DESTDIR=$RPM_BUILD_ROOT LIB=%_lib install
make DESTDIR=$RPM_BUILD_ROOT LIB=%{_lib} SYSDPATH=%{_sysdir} install
# Compability with older versions
mv $RPM_BUILD_ROOT/etc/udev/rules.d/kpartx.rules $RPM_BUILD_ROOT/etc/udev/rules.d/70-kpartx.rules
mkdir -p $RPM_BUILD_ROOT/var/cache/multipath/
@ -159,8 +166,8 @@ fi
/lib/mkinitrd/scripts/setup-multipath.sh
/lib/mkinitrd/scripts/boot-multipathd.sh
/lib/mkinitrd/scripts/boot-killmultipathd.sh
%dir /lib/systemd/system
/lib/systemd/system/multipathd.service
%dir /%{_sysdir}/systemd/system
/%{_sysdir}/systemd/system/multipathd.service
%{_mandir}/man8/multipath.8*
%{_mandir}/man5/multipath.conf.5*
%{_mandir}/man8/multipathd.8*
@ -177,8 +184,8 @@ fi
%dir /etc/udev/rules.d
%config /etc/udev/rules.d/70-kpartx.rules
/sbin/kpartx
%dir /lib/udev
/lib/udev/kpartx_id
%dir /%{_sysdir}/udev
/%{_sysdir}/udev/kpartx_id
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/boot-kpartx.sh