File libyui-gtk-pkg.spec of Package libyui-gtk-pkg

#
# spec file for package libyui-gtk-pkg (Version 2.42.2)
#
# 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/
#
# norootforbuild

Name:       libyui-gtk-pkg
Version:    2.42.2
Release:    0
License:    LGPL-2.1 or LGPL-3.0
Source:     libyui-gtk-pkg-%{version}.tar.bz2
Group:      System/Libraries

BuildRequires:  boost-devel
BuildRequires:  cmake >= 2.8
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRequires:  libyui-devel
BuildRequires:  gtk3-devel

%define libyui_gtk_devel_version libyui-gtk-devel >= 2.42.0
BuildRequires:  %{libyui_gtk_devel_version}
%define libzypp_devel_version           libzypp-devel >= 11.4.0
BuildRequires:  %{libzypp_devel_version}

URL:        http://github.com/libyui/
Summary:    Libyui - Gtk Package Selector

%description
This package contains the Gtk package selector
component for libYUI.


%package -n libyui-gtk-pkg4

Group:      System/Libraries

Requires:   libyui4
Provides:   libyui-gtk = %{version}
Provides:   yast2-gtk-pkg = %{version}
Obsoletes:  yast2-gtk-pkg < %{version}
Provides:   libyui_pkg

URL:        http://github.com/libyui/
Summary:    Libyui - Gtk Package Selector

%description -n libyui-gtk-pkg4
This package contains the Gtk package selector
component for libYUI.



%package devel

Group:      Development/Languages/C and C++

Requires:   libyui-gtk-pkg4 = %{version}
Requires:   glibc-devel
Requires:   libstdc++-devel
Requires:   boost-devel

URL:        http://github.com/libyui/
Summary:    Libyui-gtk-pkg header files

%description devel
This package contains the Gtk package selector
component for libYUI.


This can be used independently of YaST for generic (C++) applications.
This package has very few dependencies.


%prep
%setup -q -n libyui-gtk-pkg-%{version}


%build

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

mkdir build
cd build

%if %{?_with_debug:1}%{!?_with_debug:0}
cmake .. \
    -DPREFIX=%{_prefix} \
    -DDOC_DIR=%{_docdir} \
    -DLIB_DIR=%{_lib} \
    -DCMAKE_BUILD_TYPE=RELWITHDEBINFO \
    -DENABLE_WERROR=OFF 
%else
cmake .. \
    -DPREFIX=%{_prefix} \
    -DDOC_DIR=%{_docdir} \
    -DLIB_DIR=%{_lib} \
    -DCMAKE_BUILD_TYPE=RELEASE \
    -DENABLE_WERROR=OFF 
%endif

make %{?jobs:-j%jobs}


%install
cd build
make install DESTDIR="$RPM_BUILD_ROOT"
install -m0755 -d $RPM_BUILD_ROOT/%{_docdir}/libyui-gtk-pkg4/
install -m0755 -d $RPM_BUILD_ROOT/%{_libdir}/yui
install -m0644 ../COPYING* $RPM_BUILD_ROOT/%{_docdir}/libyui-gtk-pkg4/

%clean
rm -rf "$RPM_BUILD_ROOT"

%post -n libyui-gtk-pkg4 -p /sbin/ldconfig

%postun -n libyui-gtk-pkg4 -p /sbin/ldconfig

%files -n libyui-gtk-pkg4
%defattr(-,root,root)
%dir %{_libdir}/yui
%{_libdir}/yui/lib*.so.*
%doc %dir %{_docdir}/libyui-gtk-pkg4
%doc %{_docdir}/libyui-gtk-pkg4/COPYING*

%files devel
%defattr(-,root,root)
%dir %{_docdir}/libyui-gtk-pkg4
%{_libdir}/yui/lib*.so
%{_prefix}/include/yui
%{_libdir}/pkgconfig/libyui-gtk-pkg.pc
%{_libdir}/cmake/libyui-gtk-pkg

%changelog
openSUSE Build Service is sponsored by