lvm2/device-mapper.spec

148 lines
4.5 KiB
RPMSpec

#
# spec file for package device-mapper
#
# Copyright (c) 2012 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
# bug437293
%ifarch ppc64
Obsoletes: device-mapper-64bit
%endif
#
Version: 1.02.63
Release: 0
Summary: Device Mapper Tools
License: GPL-2.0+ ; LGPL-2.1+
Group: System/Base
Source: LVM2.2.02.84.tgz
Source1: boot.device-mapper
Source2: mkinitrd-devmapper-setup.sh
Source3: mkinitrd-devmapper-boot.sh
Source4: baselibs.conf
#Patches for device mapper
Patch60: k_dev_t.dif
Patch61: device-mapper-dmsetup-export.patch
Patch62: device-mapper-gcc-warning.diff
Patch65: device-mapper-dmsetup-deps-export.patch
Patch66: device-mapper-type_punning.diff
Patch67: udev-rules_update.diff
#Patch68: device-mapper-pkgconfig.patch
Patch70: sleep-try-open-count.diff
Patch71: blkid-builtin.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libselinux-devel
BuildRequires: libudev-devel
PreReq: %insserv_prereq %fillup_prereq
%description
Programs, libraries, and man pages for configuring and using the device
mapper.
%package devel
Summary: Development package for the device mapper
Group: System/Base
Requires: %name = %version
%description devel
Files needed for software development using the device mapper
%prep
%setup -n LVM2.2.02.84
%patch60 -p1
%patch61 -p1
%patch62 -p1
#%patch63 -p1
%patch65 -p1
%patch66 -p0
%patch67 -p1
#%patch68 -p0
%patch70 -p1
#%patch80 -p0
%patch71 -p1
%build
CFLAGS="$RPM_OPT_FLAGS" \
%configure --bindir=/bin --libdir=/%_lib --with-usrlibdir=%_libdir \
--sbindir=/sbin --enable-dmeventd \
--with-udevdir=/lib/udev/rules.d \
--enable-selinux --enable-cmdlib \
--with-dmeventd-path=/sbin/dmeventd \
--with-device-uid=0 --with-device-gid=6 --with-device-mode=0640 \
--enable-udev_sync --enable-udev_rules --enable-compat \
--enable-pkgconfig --enable-realtime
export SUSE_ASNEEDED=0
make -j1 # symlinks are generated in parallel! %{?_smp_mflags}
%install
#%makeinstall
make install_device-mapper DESTDIR=$RPM_BUILD_ROOT
#make libdir=$RPM_BUILD_ROOT/%_libdir install_static_lib
mkdir -p $RPM_BUILD_ROOT/%_libdir
#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
%{insserv_cleanup}
%postun
%{run_ldconfig}
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
%{insserv_cleanup}
%files
%defattr(-,root,root)
%doc INSTALL COPYING COPYING.LIB README VERSION_DM WHATS_NEW_DM
%config /etc/init.d/boot.device-mapper
/%_lib/libdevmapper.so.1.02
/%_lib/libdevmapper-event.so.1.02
%dir /lib/udev/rules.d
%dir /lib/udev
/lib/udev/rules.d/10-dm.rules
#/lib/udev/rules.d/12-dm-permissions.rules
/lib/udev/rules.d/13-dm-disk.rules
/lib/udev/rules.d/95-dm-notify.rules
/sbin/dmsetup
/sbin/dmeventd
#/sbin/devmap_mknod.sh
%{_mandir}/man8/dmsetup.8.gz
%{_mandir}/man8/dmeventd.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
/%_libdir/pkgconfig/*.pc
#%attr(644, root, root) %_libdir/libdevmapper.a
/usr/include/libdevmapper.h
/usr/include/libdevmapper-event.h
%changelog