File yast2-core.spec of Package yast2-core.import5028

# spec file for package yast2-core
# Copyright (c) 2011 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

# norootforbuild

Name:           yast2-core
Version:        2.20.1
Release:        0.<RELEASE2>

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

Prefix:         /usr

Group:          System/YaST
License:        GPL v2 or later
# obviously
BuildRequires:  boost-devel gcc-c++
# we have a parser
BuildRequires:  bison flex
# needed for all yast packages
BuildRequires:  yast2-devtools
# testsuite
BuildRequires:  dejagnu
# autodocs
BuildRequires:  doxygen
# docbook docs
BuildRequires:  docbook-xsl-stylesheets libxslt
# catalog: convert URIs to local filenames
BuildRequires:  sgml-skel
# logging
# renamed:
BuildRequires:  libblocxx-devel
# libycp includes crypto built-ins
BuildRequires:  libxcrypt-devel

Summary:        YaST2 - Core Libraries
Requires:       perl = %{perl_version}
Provides:       liby2util = 2.16.1
Obsoletes:      liby2util < 2.16.1

This package contains the scanner, parser, and interpreter runtime
library for the YCP scripting language used in YaST2.

%package devel

Requires:       yast2-core = %version
Group:          Development/Libraries
Summary:        YaST2 - Core Libraries
Provides:       liby2util-devel = 2.16.1
Obsoletes:      liby2util-devel < 2.16.1
Requires:       libxcrypt-devel hwinfo-devel
Requires:       glibc-devel libstdc++-devel pcre-devel libblocxx-devel sysfsutils
# required for libscr
# for FlexLexer.h; I think that this dependency could be made
# private but it seems not worth the effort
Requires:       flex

%description devel
This package contains include and documentation files for developing
applications using the YaST2 YCP interpreter.

%setup -n yast2-core-2.20.1


%ifarch %arm
# disable autodoc building on ARM architecture
sed -i -e 's/autodocs//'
sed -i -e 's/autodocs//'
sed -i SUBDIRS -e 's/autodocs//'

export SUSE_ASNEEDED=0 # disable --as-needed until this package is fixed

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


%{?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

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
    %suse_update_desktop_file -d ycc_${d%.desktop} ${d%.desktop}

mkdir -p "$RPM_BUILD_ROOT"/var/log/YaST2

rm -rf "$RPM_BUILD_ROOT"

# bnc#485992, since oS 11.2
if test -f /etc/modprobe.d/$C; then
     mv -f /etc/modprobe.d/$C /etc/modprobe.d/50-$C.conf

%postun -p /sbin/ldconfig


%dir %{_libdir}/YaST2
%if "%_lib" == "lib64"
%dir /usr/lib/YaST2
%dir /usr/share/YaST2

%dir %attr(0700,root,root) /var/log/YaST2
%dir %{prefix}/lib/YaST2/bin
%dir %{_libdir}/YaST2/plugin
%dir /usr/share/YaST2/scrconf
%dir %{prefix}/lib/YaST2/servers
%dir %{prefix}/lib/YaST2/servers_non_y2

# perl part (stdio agents)
# *: regular build compresses them, debug does not
%dir %{perl_vendorlib}/YaST

%if 0%{?suse_version} == 0 || 0%{?suse_version} <= 1130
#  .packlist

%files devel
%doc %{prefix}/share/doc/packages/yast2-core
%doc %{_datadir}/doc/yastdoc
openSUSE Build Service is sponsored by