File yast2-core.spec of Package yast2-core
#
# spec file for package yast2-core
#
# 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-core
Version: 2.23.4
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: yast2-core-%{version}.tar.bz2
# obviously
BuildRequires: boost-devel
BuildRequires: gcc-c++
BuildRequires: libtool
# we have a parser
BuildRequires: bison
BuildRequires: flex
# needed for all yast packages
BuildRequires: yast2-devtools
# testsuite
BuildRequires: dejagnu
# autodocs
BuildRequires: doxygen
# docbook docs
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
# catalog: convert URIs to local filenames
BuildRequires: sgml-skel
Summary: YaST2 - Core Libraries
License: GPL-2.0+
Group: System/YaST
Requires: perl = %{perl_version}
Provides: liby2util = 2.16.1
Obsoletes: liby2util < 2.16.1
%description
This package contains the scanner, parser, and interpreter runtime
library for the YCP scripting language used in YaST2.
%package devel
Requires: yast2-core = %version
Summary: YaST2 - Core Libraries
Group: System/YaST
Provides: liby2util-devel = 2.16.1
Obsoletes: liby2util-devel < 2.16.1
Requires: glibc-devel
Requires: hwinfo-devel
Requires: libstdc++-devel
Requires: 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.
%package debugger
Requires: yast2-core = %version
Summary: YaST2 - Core Libraries
Group: Development/Libraries
%description debugger
YCP debugger client.
%prep
%setup -n yast2-core-%{version}
%build
%ifarch %arm
# disable autodoc building on ARM architecture
sed -i Makefile.am -e 's/autodocs//'
sed -i Makefile.in -e 's/autodocs//'
sed -i SUBDIRS -e 's/autodocs//'
%endif
export SUSE_ASNEEDED=0 # disable --as-needed until this package is fixed
%{_prefix}/bin/y2tool y2autoconf
%{_prefix}/bin/y2tool y2automake
autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG"
./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
mkdir -p "$RPM_BUILD_ROOT"/var/log/YaST2
%perl_process_packlist
%clean
rm -rf "$RPM_BUILD_ROOT"
%post
/sbin/ldconfig
# bnc#485992, since oS 11.2
C=blacklist
if test -f /etc/modprobe.d/$C; then
mv -f /etc/modprobe.d/$C /etc/modprobe.d/50-$C.conf
fi
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%dir %{_libdir}/YaST2
%if "%_lib" == "lib64"
%dir /usr/lib/YaST2
%endif
%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
/usr/bin/ycpc
%{_libdir}/lib*.so.*
%{_prefix}/lib/YaST2/bin/y2base
%{_prefix}/lib/YaST2/bin/startshell
%{_prefix}/lib/YaST2/bin/tty_wrapper
%{_prefix}/lib/YaST2/bin/md_autorun
%{_prefix}/lib/YaST2/bin/elf-arch
%{_libdir}/YaST2/plugin/lib*.so.*
/usr/share/YaST2/scrconf/*.scr
%{_prefix}/lib/YaST2/servers/scr
%{_prefix}/lib/YaST2/servers_non_y2/ag_*
# perl part (stdio agents)
# *: regular build compresses them, debug does not
%_mandir/man3/ycp.3pm*
%_mandir/man3/YaST::SCRAgent.3pm*
%{perl_vendorlib}/ycp.pm
%dir %{perl_vendorlib}/YaST
%{perl_vendorlib}/YaST/SCRAgent.pm
%if 0%{?suse_version} == 0 || 0%{?suse_version} <= 1130
# .packlist
%{perl_vendorarch}/auto/ycp
/var/adm/perl-modules/%name
%endif
%files devel
%defattr(-,root,root)
%{_prefix}/lib/YaST2/bin/ybcdump
%{_libdir}/lib*.so
%{_libdir}/lib*.la
%{_libdir}/YaST2/plugin/lib*.so
%{_libdir}/YaST2/plugin/lib*.la
%{_prefix}/include/YaST2
%{_libdir}/pkgconfig/yast2-core.pc
%doc %{_prefix}/share/doc/packages/yast2-core
%doc %{_datadir}/doc/yastdoc
/usr/share/YaST2/data/devtools/bin/generateYCPWrappers
%files debugger
%defattr(-,root,root)
%attr(0755,-,-) /usr/lib/YaST2/bin/ycp-debugger
%changelog