A new user interface for you! Read more...

File yast2-country.spec of Package yast2-country

#
# spec file for package yast2-country
#
# 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 http://bugs.opensuse.org/
#

# norootforbuild


Name:           yast2-country
Version:        2.21.5
Release:        0

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

Prefix:         /usr

Group:          System/YaST
License:        GPL v2 or later
#policy files for YaPI dbus interface
Source1:        org.opensuse.yast.modules.yapi.time.policy
Source2:        org.opensuse.yast.modules.yapi.language.policy
Patch0:         language_es_ES.ycp.patch
Patch1:         language_en_GB.ycp.patch
BuildRequires:  perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-perl-bindings yast2-testsuite
BuildRequires:  PolicyKit-devel
Requires:       yast2-trans-stats yast2-perl-bindings timezone yast2-packager
# 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

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

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}
%patch0
%patch1

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

# Policies
mkdir -p $RPM_BUILD_ROOT/usr/share/PolicyKit/policy
install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/usr/share/PolicyKit/policy/
install -m 0644 %SOURCE2 $RPM_BUILD_ROOT/usr/share/PolicyKit/policy/

%clean
rm -rf "$RPM_BUILD_ROOT"

# common

%files
%defattr(-,root,root)
%doc %{prefix}/share/doc/packages/yast2-country
/usr/share/YaST2/modules/Console.y*
/usr/share/YaST2/modules/Keyboard.y*
/usr/share/YaST2/modules/Timezone.y*
%dir /usr/share/YaST2/modules/YaPI
/usr/share/YaST2/modules/YaPI/TIME.pm
/usr/share/YaST2/modules/YaPI/LANGUAGE.pm
/usr/share/YaST2/clients/*.ycp
/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
%attr(644,root,root) %config /usr/share/PolicyKit/policy/org.opensuse.yast.modules.yapi.*.policy

%package data
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.y*

%changelog