summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-01-27 14:07:08 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-01-31 15:42:44 -0500
commit35ce74118cd1776455cdda12840dd5951cc2354a (patch)
tree34a3be73a5036c67b472391f8c2e17f213e1503b
parentcab3cb6f587a43be1a861dd42345b1e89ff068d5 (diff)
downloadsssd-35ce74118cd1776455cdda12840dd5951cc2354a.tar.gz
sssd-35ce74118cd1776455cdda12840dd5951cc2354a.tar.bz2
sssd-35ce74118cd1776455cdda12840dd5951cc2354a.zip
Fix handling of translated man pages in spec file
If po4a is not available 'make rpms' will fail because the spec file expects that some translated man pages are present. This patch tries to detect which translated man pages are available and adds them to the corresponding file list.
-rw-r--r--contrib/sssd.spec.in19
1 files changed, 15 insertions, 4 deletions
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 48c0ddd5..b8d8c419 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -167,6 +167,20 @@ do
echo %{python_sitelib}/`basename $file` >> sssd.lang
done
+touch sssd_tools.lang
+for man in `find $RPM_BUILD_ROOT/%{_mandir}/??/man?/ -type f | sed -e "s#$RPM_BUILD_ROOT/%{_mandir}/##"`
+do
+ lang=`echo $man | cut -c 1-2`
+ case `basename $man` in
+ sss_*)
+ echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_tools.lang
+ ;;
+ *)
+ echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd.lang
+ ;;
+ esac
+done
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -200,9 +214,6 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitearch}/pysss.so
%{python_sitelib}/*.py*
-%lang(cs) %{_mandir}/cs/man[58]/*
-%lang(uk) %{_mandir}/uk/man[58]/*
-
%files client
%defattr(-,root,root,-)
%doc src/sss_client/COPYING src/sss_client/COPYING.LESSER
@@ -212,7 +223,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/pam_sss.8*
%{_mandir}/man8/sssd_krb5_locator_plugin.8*
-%files tools
+%files tools -f sssd_tools.lang
%defattr(-,root,root,-)
%doc COPYING
%{_sbindir}/sss_useradd