File yast2-storage.spec of Package yast2-storage

#
# spec file for package yast2-storage (Version 2.19.15)
#
# 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/
#

# norootforbuild


Name:           yast2-storage
Version:        2.19.15
Release:        1

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

Prefix:         /usr

Group:          System/YaST
License:        GPLv2+
BuildRequires:  blocxx-devel boost-devel gcc-c++ libxcrypt-devel openssl-devel sablot swig
BuildRequires:  docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files
BuildRequires:  libstorage-devel >= 2.19.15 yast2 >= 2.19.4 yast2-core-devel >= 2.18.1 yast2-devtools
BuildRequires:  yast2-perl-bindings yast2-testsuite >= 2.19.0
Requires:       libstorage = %(echo `rpm -q --queryformat '%{VERSION}' libstorage`)
Requires:       yast2-perl-bindings perl = %{perl_version}
Requires:       yast2-core >= 2.18.3 yast2 >= 2.19.4 yast2-libyui >= 2.18.7
Requires:       yast2-dbus-client
%ifarch s390 s390x
Requires:       yast2-s390
%endif
PreReq:         %fillup_prereq
Provides:       y2a_fdsk yast2-config-disk
Obsoletes:      y2a_fdsk yast2-config-disk
Provides:       yast2-agent-fdisk yast2-agent-fdisk-devel
Obsoletes:      yast2-agent-fdisk 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

%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-2.19.15

%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
License:        GPLv2+
Requires:       libstorage-devel = %(echo `rpm -q --queryformat '%{VERSION}' libstorage-devel`)
Requires:       blocxx-devel libstdc++-devel yast2-storage = %version
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