# # spec file for package device-mapper (Version 1.02.27) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: device-mapper License: GPL v2 or later; LGPL v2.1 or later Group: System/Base AutoReqProv: on # bug437293 %ifarch ppc64 Obsoletes: device-mapper-64bit %endif # Version: 1.02.27 Release: 8. Summary: Device Mapper Tools Source: device-mapper.%{version}.tar.bz2 Source1: boot.device-mapper Source2: mkinitrd-setup.sh Source3: mkinitrd-boot.sh Patch: k_dev_t.dif Patch1: %{name}-dmsetup-export.patch Patch2: %{name}-gcc-warnings.patch Patch3: %{name}-static.patch Patch4: %{name}-nochown.patch Patch5: wait_udev.diff Patch6: bug-479104_device-mapper-dmsetup-deps-export.patch Patch7: mirror-resize.diff Patch8: bug-550363_hash.c.diff Patch9: bug557775-wait-before-deactivate.diff Patch10: add_ulog_support.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libselinux-devel PreReq: %insserv_prereq %fillup_prereq %description Programs, libraries, and man pages for configuring and using the device mapper. Authors: -------- Joe Thornber %package devel License: GPL v2 or later; LGPL v2.1 or later Summary: Development package for the device mapper Group: System/Base Requires: %name = %version %description devel Files needed for software development using the device mapper Authors: -------- Joe Thornber %prep %setup -n device-mapper.%{version} %patch %patch1 -p1 %patch2 -p1 %patch3 %patch4 %patch5 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %build CFLAGS="$RPM_OPT_FLAGS" \ %configure --bindir=/bin --libdir=/%_lib --sbindir=/sbin --enable-dmeventd \ --enable-selinux \ --with-dmeventd-path=/sbin/dmeventd \ --with-device-uid=0 --with-device-gid=6 --with-device-mode=0640 make %{?jobs:-j %jobs} %install %makeinstall make libdir=$RPM_BUILD_ROOT/%_libdir install_static_lib ln -s /%_lib/libdevmapper.so.1.02 $RPM_BUILD_ROOT/%_libdir/libdevmapper.so ln -s /%_lib/libdevmapper-event.so.1.02 $RPM_BUILD_ROOT/%_libdir/libdevmapper-event.so rm $RPM_BUILD_ROOT/%_lib/libdevmapper.so rm $RPM_BUILD_ROOT/%_lib/libdevmapper-event.so install -m 744 scripts/devmap_mknod.sh $RPM_BUILD_ROOT/sbin/ mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m 744 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d install -d $RPM_BUILD_ROOT/lib/mkinitrd/scripts install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-dm.sh install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-dm.sh %post %{run_ldconfig} [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup %{fillup_and_insserv -y boot.device-mapper} %postun %{run_ldconfig} [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup %{insserv_cleanup} %files %defattr(-,root,root) %doc INSTALL COPYING COPYING.LIB INTRO README %config /etc/init.d/boot.device-mapper /%_lib/libdevmapper.so.1.02 /%_lib/libdevmapper-event.so.1.02 /sbin/dmsetup /sbin/dmeventd /sbin/devmap_mknod.sh %{_mandir}/man8/dmsetup.8.gz %dir /lib/mkinitrd %dir /lib/mkinitrd/scripts /lib/mkinitrd/scripts/setup-dm.sh /lib/mkinitrd/scripts/boot-dm.sh %files devel %defattr(-,root,root) /%_libdir/libdevmapper.so /%_libdir/libdevmapper-event.so %attr(644, root, root) %_libdir/libdevmapper.a /usr/include/libdevmapper.h /usr/include/libdevmapper-event.h %changelog