[PATCH] build: adjust RPM spec file to accommodate new locale files

Jim Meyering jim at meyering.net
Tue Oct 11 20:03:56 UTC 2011


Thanks for the report, Steve.
Here's one way to fix it.

>From my reading of recommended %find_lang usage,

  https://fedoraproject.org/wiki/Packaging/Guidelines#Handling_Locale_Files

I should not have to add this line,

  %{_datadir}/locale/*/LC_MESSAGES/%{name}.mo

but without it, I get this:

    Processing files: iwhd-debuginfo-0.99-1.fc15.x86_64
    Checking for unpackaged file(s): /usr/lib/rpm/check-files /h/j/rpmbuild/BUILDROOT/iwhd-0.99-1.fc15.x86_64
    error: Installed (but unpackaged) file(s) found:
       /usr/share/locale/es/LC_MESSAGES/iwhd.mo
       /usr/share/locale/ja/LC_MESSAGES/iwhd.mo
       /usr/share/locale/ru/LC_MESSAGES/iwhd.mo
       /usr/share/locale/uk/LC_MESSAGES/iwhd.mo


    RPM build errors:
        Installed (but unpackaged) file(s) found:
       /usr/share/locale/es/LC_MESSAGES/iwhd.mo
       /usr/share/locale/ja/LC_MESSAGES/iwhd.mo
       /usr/share/locale/ru/LC_MESSAGES/iwhd.mo
       /usr/share/locale/uk/LC_MESSAGES/iwhd.mo
    make: *** [rpm] Error 1


>From bec51ff7ea8d1b1e2eefb89df1d25c5bbdee942d Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Tue, 11 Oct 2011 21:10:14 +0200
Subject: [PATCH] build: adjust RPM spec file to accommodate new locale files

* iwhd.spec.in (BuildRequires): Add "%find_lang %{name}", now
that we have locale files.  This fixes a "make rpm" build failure.
Steve Linabery reported the problem.
---
 iwhd.spec.in |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/iwhd.spec.in b/iwhd.spec.in
index a987ff9..f1b9c4a 100644
--- a/iwhd.spec.in
+++ b/iwhd.spec.in
@@ -51,12 +51,14 @@ make install DESTDIR=%{buildroot}
 %check
 make -s check

+%find_lang %{name}
+
 %clean
 rm -rf %{buildroot}

 %post

-%files
+%files -f %{name}.lang
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING README NEWS
 %{_bindir}/iwhd
@@ -67,6 +69,7 @@ rm -rf %{buildroot}
 %config(noreplace)	%{_sysconfdir}/iwhd/conf.js
 %config(noreplace)	%{_sysconfdir}/logrotate.d/iwhd
 %{_localstatedir}/lib/iwhd
+%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo

 %changelog
 * Wed Oct  7 2010 Jim Meyering <meyering at redhat.com> - 0.90-1
--
1.7.7


More information about the iwhd-devel mailing list