[yast-devel] WebYaST: fixed translation packaging in WebYaST clients
Hi all, I have fixed translation packaging in all WebYaST client plugins. Here I'll briefly describe the changes: These lines have been added to %build section: -------------------------------------------------------------------- # remove .po files (no longer needed) rm -rf $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/po # search locale files %find_lang <GETTEXT_DOMAIN> -------------------------------------------------------------------- The first command removes all .po files from the build root, they are useless in built RPM package (they have been converted to .mo files by 'rake makemo'). The second command (%find_lang macro) searches for translation files in the buildroot and saves the file list to GETTEXT_DOMAIN.lang file which is used later. GETTEXT_DOMAIN defines which files will be added to the list. The generated file is then added to the RPM file list by -f option: -------------------------------------------------------------------- %files -f GETTEXT_DOMAIN.lang -------------------------------------------------------------------- Because .mo files are included in .lang file locale/ subtree can be removed from the file list (but the top level locale/ must be added using %dir macro). BTW simply adding /locale subdirectory to the file list is not the correct solution, in this case rpmlint prints lots of warnings about not used %lang macro (for each .mo file). -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Ladislav Slezak schrieb:
Hi all,
I have fixed translation packaging in all WebYaST client plugins. Here I'll briefly describe the changes:
These lines have been added to %build section: -------------------------------------------------------------------- # remove .po files (no longer needed) rm -rf $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/po # search locale files %find_lang <GETTEXT_DOMAIN> --------------------------------------------------------------------
The first command removes all .po files from the build root, they are useless in built RPM package (they have been converted to .mo files by 'rake makemo').
Thank you fixing. Just for understanding: Now, the mo files will NOT be generated by autobuild anymore ? So they have to be generated before packaging ? No problem. But I would suggest to call "rake makemo" while calling "rake package" too in order to ensure taking the newest mo files. Greetings Stefan
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Thu, Oct 22, 2009 at 09:27:40AM +0200, Stefan Schubert wrote:
Ladislav Slezak schrieb:
The first command removes all .po files from the build root, they are useless in built RPM package (they have been converted to .mo files by 'rake makemo').
Thank you fixing. Just for understanding: Now, the mo files will NOT be generated by autobuild anymore ? So they have to be generated before packaging ? No problem. But I would suggest to call "rake makemo" while calling "rake package" too in order to ensure taking the newest mo files.
No. Just as you build executables from .c files and don't package *.c in an i586.rpm, we delete the po sources (because for webyast, the source and build tree are the same) *after* we build the mo's. -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
On 22.10.2009 09:27, Stefan Schubert wrote:
Thank you fixing. Just for understanding: Now, the mo files will NOT be generated by autobuild anymore ? So they have to be generated before packaging ? No problem. But I would suggest to call "rake makemo" while calling "rake package" too in order to ensure taking the newest mo files.
'rake makemo' is called in %build section in .spec files (so it's not needed in 'rake package'). -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (3)
-
Ladislav Slezak
-
Martin Vidner
-
Stefan Schubert