LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File yast2-core.spec of Package yast2-core.openSUSE_11.3 (Project home:lnussel:crypt_blowfish:maint)

#
# spec file for package yast2-core (Version 2.19.3)
#
# 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-core
Version:        2.19.3
Release:        1.<RELEASE1>

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        yast2-core-2.19.3.tar.bz2
Patch0:         yast2-core-2.19.3-CVE-2011-2483.diff

Prefix:         /usr

Group:          System/YaST
License:        GPLv2+
# 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: http://lists.opensuse.org/opensuse-packaging/2007-11/msg00076.html
BuildRequires:  libblocxx-devel
# libycp includes crypto built-ins
BuildRequires:  libxcrypt-devel

Summary:        YaST2 - Core Libraries
Requires:       perl = %{perl_version}
Requires:       libxcrypt-crypt_blowfish >= 1.2
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
License:        GPLv2+
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.

%prep
%setup -n yast2-core-2.19.3
%patch0 -p1

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

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

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
#  .packlist
%{perl_vendorarch}/auto/ycp
/var/adm/perl-modules/%name

%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

%changelog