File yast2-storage.spec of Package yast2-storage

#
# spec file for package yast2-storage
#
# 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:           yast2-storage
Version:        2.22.10
Release:        0

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        yast2-storage-%{version}.tar.bz2

BuildRequires:  boost-devel
BuildRequires:  docbook-xsl-stylesheets
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  libstorage-devel >= 2.22.10
BuildRequires:  libtool
BuildRequires:  libxslt
BuildRequires:  openssl-devel
BuildRequires:  perl-XML-Writer
BuildRequires:  sablot
BuildRequires:  sgml-skel
BuildRequires:  swig
BuildRequires:  update-desktop-files
BuildRequires:  yast2 >= 2.19.4
BuildRequires:  yast2-core-devel >= 2.23.1
BuildRequires:  yast2-devtools
BuildRequires:  yast2-perl-bindings
BuildRequires:  yast2-testsuite >= 2.19.0
Requires:       perl = %{perl_version}
Requires:       yast2 >= 2.19.4
Requires:       yast2-core >= 2.18.3
Requires:       yast2-dbus-client >= 2.22.0
Requires:       yast2-libyui >= 2.18.7
Requires:       yast2-perl-bindings
%ifarch s390 s390x
Requires:       yast2-s390
%endif
PreReq:         %fillup_prereq
Provides:       y2a_fdsk
Provides:       yast2-config-disk
Obsoletes:      y2a_fdsk
Obsoletes:      yast2-config-disk
Provides:       yast2-agent-fdisk
Provides:       yast2-agent-fdisk-devel
Obsoletes:      yast2-agent-fdisk
Obsoletes:      yast2-agent-fdisk-devel
Provides:       yast2-trans-inst-partitioning
Obsoletes:      yast2-trans-inst-partitioning
Provides:       y2t_inst-partitioning
Obsoletes:      y2t_inst-partitioning
Summary:        YaST2 - Storage Configuration
License:        GPL-2.0
Group:          System/YaST

%description
This package contains the files for YaST2 that handle access to disk
devices during installation and on an installed system.

%prep
%setup -n yast2-storage-%{version}

%build
%{_prefix}/bin/y2tool y2autoconf
%{_prefix}/bin/y2tool y2automake
autoreconf --force --install

export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"

%{?suse_update_config:%{suse_update_config -f}}
./configure --libdir=%{_libdir} --prefix=%{_prefix} --mandir=%{_mandir}
# V=1: verbose build in case we used AM_SILENT_RULES(yes)
# so that RPM_OPT_FLAGS check works
make %{?jobs:-j%jobs} V=1

%install
make install DESTDIR="$RPM_BUILD_ROOT"
[ -e "%{_prefix}/share/YaST2/data/devtools/NO_MAKE_CHECK" ] || Y2DIR="$RPM_BUILD_ROOT/usr/share/YaST2" make check DESTDIR="$RPM_BUILD_ROOT"
for f in `find $RPM_BUILD_ROOT/%{_prefix}/share/applications/YaST2/ -name "*.desktop"` ; do
    d=${f##*/}
    %suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop}
done

rm -f $RPM_BUILD_ROOT/%{_libdir}/YaST2/plugin/libpy2StorageCallbacks.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/YaST2/plugin/libpy2StorageCallbacks.so

%clean
rm -rf "$RPM_BUILD_ROOT"

%post
%{fillup_only -an storage}

%files
%defattr(-,root,root)

# storage
%dir /usr/share/YaST2/include/partitioning
/usr/share/YaST2/include/partitioning/*.ycp
/usr/share/YaST2/clients/inst_custom_part.ycp
/usr/share/YaST2/clients/inst_resize_ui.ycp
/usr/share/YaST2/clients/inst_resize_dialog.ycp
/usr/share/YaST2/clients/inst_disk.ycp
/usr/share/YaST2/clients/inst_target_part.ycp
/usr/share/YaST2/clients/inst_disk_proposal.ycp
/usr/share/YaST2/clients/inst_target_selection.ycp
/usr/share/YaST2/clients/inst_prepdisk.ycp
/usr/share/YaST2/clients/storage_finish.ycp
/usr/share/YaST2/clients/partitions_proposal.ycp
/usr/share/YaST2/clients/storage.ycp
/usr/share/YaST2/clients/disk.ycp
/usr/share/YaST2/clients/disk_worker.ycp
/usr/share/YaST2/clients/multipath-simple.ycp
/usr/share/YaST2/modules/*
/var/adm/fillup-templates/sysconfig.storage-yast2-storage

%dir /usr/share/YaST2/data
/usr/share/YaST2/data/*.ycp

%doc %dir %{_prefix}/share/doc/packages/yast2-storage
%doc %{_prefix}/share/doc/packages/yast2-storage/README*
%doc %{_prefix}/share/doc/packages/yast2-storage/COPY*

# agents-scr
/usr/share/YaST2/scrconf/*.scr

# libstorage ycp callbacks
%{_libdir}/YaST2/plugin/libpy2StorageCallbacks.so.*

# disk
%dir %{_prefix}/share/applications/YaST2
%{_prefix}/share/applications/YaST2/disk.desktop

# scripts
%{_prefix}/lib/YaST2/bin/check.boot

# perl bindings of libstorage
%{perl_vendorarch}/LibStorage.so

%package devel
Requires:       libstdc++-devel
Requires:       yast2-storage = %version
Requires:       libstorage-devel = %(echo `rpm -q --queryformat '%{VERSION}' libstorage-devel`)
Summary:        YaST2 - Storage Library Headers and Documentation
Group:          Development/Libraries/YaST

%description devel
This package contains the files for YaST2 that are needed of one wants
to develop a program using libstorage.

%files devel
%defattr(-,root,root)
%doc %{_prefix}/share/doc/packages/yast2-storage/autodocs
%doc %{_prefix}/share/doc/packages/yast2-storage/config.xml.description

%changelog
openSUSE Build Service is sponsored by