[Bug 1289634] Review Request: libchardet - Mozilla's universal character set detector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1289634



--- Comment #8 from Petr Pisar <ppisar@xxxxxxxxxx> ---
I think the problem is %find_lang --with-man gathers the /usr/share/man/ko/
files as localized stuff, list them into %{name}.lang and then "%files -f
%{name}.lang" includes them into libchardet package, so they are already moved 
when creating libcharet-devel.

I have no experience with it, but I think the answer is in older review
<https://bugzilla.redhat.com/show_bug.cgi?id=1047647#c12>:

> If there will ever be translation files for the library, you may need to
> "grep" from the %name.lang file to extract what to include in the individual
> subpackages.

I tried it:

--- libchardet.spec.old 2015-12-10 20:09:31.000000000 +0100
+++ libchardet.spec     2015-12-11 12:55:52.188000000 +0100
@@ -10,6 +10,7 @@
 Patch0:         %{name}-%{version}-man.patch
 Patch1:         %{name}-%{version}-pc.in.patch
 BuildRequires:  libstdc++-devel
+BuildRequires:  sed

 %description
 libchardet provides an interface to Mozilla's universal charset detector,
@@ -45,7 +46,9 @@
 %install
 make DESTDIR=%{buildroot} install

-%find_lang %{name} --with-man --all-name
+%find_lang all --with-man --all-name
+< all.lang sed -e '/\/man3\//!d' > %{name}-devel.lang
+< all.lang sed -e '/\/man3\//d' > %{name}.lang

 # remove all '*.la' files
 find %{buildroot} -name '*.la' -exec rm -f {} ';'
@@ -62,7 +65,7 @@
 %license LICENSE
 %{_libdir}/%{name}.so.*

-%files devel
+%files devel -f %{name}-devel.lang
 %{_bindir}/chardet-config
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/chardet.pc

But the issue is rpmbuild then fails like:

Processing files: libchardet-1.0.4-2.fc24.x86_64
error: Empty %files file
/home/test/rpmbuild/BUILD/libchardet-1.0.4/libchardet.lang

because no other localized files left for the libchardet package and rpmbuild
does like empty files passed by the -f option.

I think the easiest fix is to move "-f" option from libchardet to
libchardet-devel package:

--- libchardet.spec.old 2015-12-10 20:09:31.000000000 +0100
+++ libchardet.spec     2015-12-11 13:07:52.898000000 +0100
@@ -45,7 +45,7 @@
 %install
 make DESTDIR=%{buildroot} install

-%find_lang %{name} --with-man --all-name
+%find_lang %{name}-devel --with-man --all-name

 # remove all '*.la' files
 find %{buildroot} -name '*.la' -exec rm -f {} ';'
@@ -57,12 +57,12 @@

 %postun -p /sbin/ldconfig

-%files -f %{name}.lang
+%files
 %doc Changelog README
 %license LICENSE
 %{_libdir}/%{name}.so.*

-%files devel
+%files devel -f %{name}-devel.lang
 %{_bindir}/chardet-config
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/chardet.pc

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review




[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]