File yast2.spec of Package yast2

# spec file for package yast2
# 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
Version:        2.20.12
Release:        1

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

Prefix:         /usr

Group:          System/YaST
License:        GPLv2+
Source1:        yast2-rpmlintrc

BuildRequires:  perl-XML-Writer update-desktop-files yast2-devtools yast2-perl-bindings yast2-testsuite
# Needed already in build time
BuildRequires:  yast2-core >= 2.18.12 yast2-pkg-bindings >= 2.20.3 yast2-ycp-ui-bindings >= 2.18.4

# pre-requires for filling the sysconfig template (sysconfig.yast2)
PreReq:         %fillup_prereq

# float::tolstring builtin
Requires:       yast2-core >= 2.18.12
# Mod_UI
# new UI::OpenContextMenu
Requires:       yast2-ycp-ui-bindings >= 2.18.4

# changed StartPackage callback signature
Requires:       yast2-pkg-bindings >= 2.20.3
Requires:       yast2_ui yast2-branding
# For Cron Agent, Module
Requires:       perl-Config-Crontab
# for ag_tty (/bin/stty)
# for /usr/bin/md5sum
Requires:       coreutils sysconfig
Requires:       yast2-xml yast2-hardware-detection
# for
Requires:       yast2-perl-bindings
# for ag_anyxml
Requires:       perl-XML-Simple
# for GPG.ycp
Requires:       gpg2
# for Punycode.ycp (bnc#651893)
Requires:       bind-utils
# xdg-su in .desktops
Recommends:     xdg-utils

# moved cfg_security.scr
Conflicts:      yast2-security <= 2.13.2
# moved ag_netd, cfg_netd.scr, cfg_xinetd.scr
Conflicts:      yast2-inetd <= 2.13.4
Conflicts:      yast2-tune < 2.15.6
Obsoletes:      yast2-mail-aliases <= 2.14.0
Conflicts:      yast2-storage < 2.16.4
Conflicts:      yast2-network < 2.16.6
Conflicts:      yast2-sshd < 2.16.1

# moved ag_content agent 
Conflicts:      yast2-instserver <= 2.16.3

# InstError
Conflicts:      yast2-installation < 2.18.5

Conflicts:      yast2-update < 2.16.1
# Modules 'Slides' and 'SlideShow' moved from yast2-packager to yast2
Conflicts:      yast2-packager < 2.17.12
Conflicts:      yast2-mouse < 2.16.0
Conflicts:      autoyast2-installation < 2.16.2
# country_long.ycp and country.ycp moved to yast2
Conflicts:      yast2-country < 2.16.3
# DnsServerAPI moved to yast2.rpm (by mzugec)
Conflicts:      yast2-dns-server < 2.17.0

Provides:       yast2-lib-sequencer
Obsoletes:      yast2-lib-sequencer
Provides:       yast2-lib-wizard yast2-lib-wizard-devel yast2-trans-wizard
Obsoletes:      yast2-lib-wizard yast2-lib-wizard-devel yast2-trans-wizard
Provides:       yast2-trans-menu y2t_menu
Obsoletes:      yast2-trans-menu y2t_menu

# moved here from another packages
Provides:       yast2-installation:/usr/share/YaST2/modules/Installation.ycp
Provides:       yast2-installation:/usr/share/YaST2/modules/Product.ycp
Provides:       yast2-installation:/usr/share/YaST2/modules/Hotplug.ycp
Provides:       yast2-installation:/usr/share/YaST2/modules/HwStatus.ycp
Provides:       yast2-network:/usr/share/YaST2/modules/Internet.ycp
Provides:       yast2-packager:/usr/lib/YaST2/servers_non_y2/ag_anyxml
Provides:       yast2-dns-server:/usr/share/YaST2/modules/
Provides:       yast2-mail-aliases

Summary:        YaST2 - Main Package

This package contains scripts and data needed for SuSE Linux
installation with YaST2

%package devel-doc
License:        GPLv2+
Requires:       yast2 = %version
Group:          System/YaST
Provides:       yast2-lib-sequencer-devel
Obsoletes:      yast2-lib-sequencer-devel
Obsoletes:      yast2-devel
Provides:       yast2-devel
Requires:       yast2-core-devel

Summary:        YaST2 - Development Scripts and Documentation

%description devel-doc
This package contains scripts and data needed for a SUSE Linux
installation with YaST2.

%setup -n yast2-2.20.12

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

# removed explicit adding of translations to group desktop files, since it is covered by the general call (they are in a subdirectory) and it caused build fail

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"/usr/share/YaST2/clients
mkdir -p "$RPM_BUILD_ROOT"%{prefix}/share/applications/YaST2
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/images
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/locale
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/modules
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/scrconf
mkdir -p "$RPM_BUILD_ROOT"%{prefix}/lib/YaST2/bin
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/data
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/include
mkdir -p "$RPM_BUILD_ROOT"/var/lib/YaST2
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/schema/control/rnc
mkdir -p "$RPM_BUILD_ROOT"/usr/share/YaST2/schema/autoyast/rnc
mkdir -p "$RPM_BUILD_ROOT"/etc/YaST2

rm -rf "$RPM_BUILD_ROOT"

%{fillup_only -n yast2}


# basic directory structure

%dir /usr/share/YaST2/clients
%dir %{prefix}/share/applications/YaST2
%dir /usr/share/YaST2/images
%dir /usr/share/YaST2/locale
%dir /usr/share/YaST2/modules
%dir /usr/share/YaST2/scrconf
%dir %{prefix}/lib/YaST2/bin
%dir /usr/share/YaST2/data
%dir /usr/share/YaST2/include
%dir /var/lib/YaST2
%dir /usr/share/YaST2/schema
%dir /usr/share/YaST2/schema/control
%dir /usr/share/YaST2/schema/control/rnc
%dir /usr/share/YaST2/schema/autoyast
%dir /usr/share/YaST2/schema/autoyast/rnc
%dir /etc/YaST2

# yast2


# documentation (not included in devel subpackage)
%doc %dir %{prefix}/share/doc/packages/yast2
%doc %{prefix}/share/doc/packages/yast2/COPYING
%doc %{prefix}/share/doc/packages/yast2/README
%doc %{_mandir}/*/*


# wizard
%dir /usr/share/YaST2/include/wizard

%dir /usr/share/YaST2/include/packages

%dir /usr/share/YaST2/include/hwinfo

# documentation

%files devel-doc

%doc %{prefix}/share/doc/packages/yast2/autodocs
%doc %{prefix}/share/doc/packages/yast2/commandline
%doc %{prefix}/share/doc/packages/yast2/control
%doc %{prefix}/share/doc/packages/yast2/cron
%doc %{prefix}/share/doc/packages/yast2/cwm
%doc %{prefix}/share/doc/packages/yast2/desktop
%doc %{prefix}/share/doc/packages/yast2/gpg
%doc %{prefix}/share/doc/packages/yast2/log
%doc %{prefix}/share/doc/packages/yast2/network
%doc %{prefix}/share/doc/packages/yast2/packages
%doc %{prefix}/share/doc/packages/yast2/runlevel
%doc %{prefix}/share/doc/packages/yast2/sequencer
%doc %{prefix}/share/doc/packages/yast2/system
%doc %{prefix}/share/doc/packages/yast2/types
%doc %{prefix}/share/doc/packages/yast2/wizard
%doc %{prefix}/share/doc/packages/yast2/xml