From f44566597eade4da19d487f6b1596da233ea234d Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sun, 2 Dec 2012 10:48:41 -0800 Subject: [PATCH] lang_package now accepts arguments -n to specify package name -f to specify lang file name (without .lang) --- packaging/rpm-tizen_macros | 49 ++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/packaging/rpm-tizen_macros b/packaging/rpm-tizen_macros index e5891fc2..f67af70 100644 --- a/packaging/rpm-tizen_macros +++ b/packaging/rpm-tizen_macros @@ -92,17 +92,6 @@ %cflags_profile_feedback -fprofile-use -# Template for lang sub-package. -%lang_package(n:) \ -%package %{-n:-n %{-n*}-}lang \ -Summary: Languages for package %{name} \ -Group: System/Localization \ -Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \ -Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \ -Supplements: packageand(bundle-lang-other:%{-n:%{-n*}}%{!-n:%{name}}) \ -BuildArch: noarch \ -%description %{-n:-n %{-n*}-}lang \ -Provides translations to the package %{name} @@ -205,32 +194,32 @@ Provides translations to the package %{name} && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\ [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS") +# Template for lang sub-package. +%lang_package(n:) \ +%package %{-n:-n %{-n*}-}lang \ +Summary: Languages for package %{name} \ +Group: System/Localization \ +Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \ +Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \ +Supplements: packageand(bundle-lang-other:%{-n:%{-n*}}%{!-n:%{name}}) \ +BuildArch: noarch \ +%description %{-n:-n %{-n*}-}lang \ +Provides translations to the package %{name} -%lang_package \ -%package locale \ +%lang_package(n:f:) \ +%package %{-n:-n %{-n*}-}locale \ Summary: Translations and Locale for package %{name}\ -Group: Translations\ -AutoReqProv: 0\ -%description locale\ +Group: System/Localization\ +Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \ +Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \ +BuildArch: noarch \ +%description %{-n:-n %{-n*}-}locale\ This package provides translations for package %{name}.\ -%files locale -f %{name}.lang\ +%files %{-n:-n %{-n*}-}locale -f %{-f:%{-f*}.lang} %{!-f:%{name}.lang}\ %defattr(-,root,root,-)\ %{nil} -%docs_package \ -%package docs \ -Summary: Documentation for package %{name}\ -Group: Documentation\ -AutoReqProv: 0\ -%description docs\ -This package provides documentation for package %{name}.\ -%files docs -f documentation.list\ -%defattr(-,root,root,-)\ -%{nil} - - - # Bad hack to set $LANG to C during all RPM builds %prep \ %%prep\ -- 2.7.4