File yast2-country.spec of Package yast2-country

#
# spec file for package yast2-country
#
# 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-country
Version:        3.0.2
Release:        0

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


Group:  System/YaST
License:        GPL-2.0
#policy files for YaPI dbus interface
Source1:        org.opensuse.yast.modules.yapi.time.policy
Source2:        org.opensuse.yast.modules.yapi.language.policy
BuildRequires:	perl-XML-Writer update-desktop-files yast2-devtools yast2-testsuite yast2 yast2-perl-bindings
BuildRequires:  polkit-devel
Requires:	yast2-trans-stats yast2-perl-bindings timezone
# XVersion.ycp
# Wizard::SetDesktopTitleAndIcon
Requires:	yast2 >= 2.21.22
# Pkg::SetPackageLocale, Pkg::GetTextLocale
Requires:       yast2-pkg-bindings >= 2.15.3
# IconPath support for MultiSelectionBox
Requires:	yast2-core >= 2.16.28
# new API of ntp-client_proposal.ycp
Conflicts:	yast2-ntp-client < 2.18.0
# wrapper_storage.ycp
Requires:       yast2-packager >= 2.23.3

Requires:	yast2-country-data

Provides:	yast2-config-environment
Provides:	yast2-config-keyboard
Provides:	yast2-config-language
Provides:	yast2-config-timezone
Obsoletes:	yast2-config-environment
Obsoletes:	yast2-config-keyboard
Obsoletes:	yast2-config-language
Obsoletes:	yast2-config-timezone
Provides:	yast2-db-country yast2-db-keyboard yast2-db-timezone
Obsoletes:	yast2-db-country yast2-db-keyboard yast2-db-timezone
Provides:	yast2-trans-inst-keyboard
Obsoletes:	yast2-trans-inst-keyboard
Provides:	yast2-trans-inst-language
Obsoletes:	yast2-trans-inst-language
Provides:	yast2-trans-inst-timezone
Obsoletes:	yast2-trans-inst-timezone
Provides:	yast2-trans-inst-environment
Obsoletes:	yast2-trans-inst-environment
Provides:	y2d_inst-keyboard
Obsoletes:	y2d_inst-keyboard
Provides:	y2d_inst-timezone
Obsoletes:	y2d_inst-timezone
Provides:	y2t_inst-language
Obsoletes:	y2t_inst-language
Provides:	y2t_inst-environment
Obsoletes:	y2t_inst-environment

Requires:       yast2-ruby-bindings >= 1.0.0

Summary:	YaST2 - Country Settings (Language, Keyboard, and Timezone)

%description
Country specific data and configuration modules (language, keyboard,
timezone) for yast2.

%prep
%setup -n yast2-country-%{version}

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


# Policies
mkdir -p $RPM_BUILD_ROOT/usr/share/polkit-1/actions
install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/usr/share/polkit-1/actions/
install -m 0644 %SOURCE2 $RPM_BUILD_ROOT/usr/share/polkit-1/actions/

%clean
rm -rf "$RPM_BUILD_ROOT"

# common
%files
%defattr(-,root,root)
%doc %{_prefix}/share/doc/packages/yast2-country
%doc COPYING
/usr/share/YaST2/modules/Console.rb
/usr/share/YaST2/modules/Keyboard.rb
/usr/share/YaST2/modules/Timezone.rb
%dir /usr/share/YaST2/modules/YaPI
/usr/share/YaST2/modules/YaPI/TIME.pm
/usr/share/YaST2/modules/YaPI/LANGUAGE.pm
/usr/share/YaST2/clients/*.rb
/usr/share/YaST2/data/*.ycp
/usr/share/YaST2/include/keyboard/
/usr/share/YaST2/include/timezone/
/usr/share/YaST2/scrconf/*.scr
/usr/share/YaST2/schema/autoyast/rnc/*.rnc
%{_prefix}/share/applications/YaST2/yast-language.desktop
%{_prefix}/share/applications/YaST2/timezone.desktop
%{_prefix}/share/applications/YaST2/keyboard.desktop
%dir /usr/share/polkit-1
%dir /usr/share/polkit-1/actions
%attr(644,root,root) %config /usr/share/polkit-1/actions/org.opensuse.yast.modules.yapi.*.policy

%package data
Requires:       yast2-ruby-bindings >= 1.0.0

Summary:	YaST2 - Data files for Country settings
Group:          System/YaST

%description data
Data files for yast2-country together with the most often used API
functions (Language module)

%files data
%defattr(-,root,root)
%dir /usr/share/YaST2/data/languages
/usr/share/YaST2/data/languages/*.ycp
/usr/share/YaST2/modules/Language.rb
openSUSE Build Service is sponsored by