[opensuse-gnome] proposed shared library GNOME package
Hallo. I spent some time thinking about a fix of libgtop and libwnck shared library. Here is the result. Thinking about packaging of library, which often change soname, but does not change translation domain, I guess that we have to create both libgtop and libgtop-2_0-7 - first one will contain translations, second one library itself. If we will not do it, we will get a file conflict or missing translations. I guess that the cyclic dependency is OK here. Otherwise you may install translations without library thinking, that you installed library. Note that also devel renaming following pkgconfig epoch might be useful for some packages, but in general, I would be glad to avoid it and rename packages to its "canonical" form as mich as possible. Name: libgtop BuildRequires: gdbm-devel glib2-devel gtk-doc intltool licenses popt-devel xorg-x11-devel License: GPL v2 or later Group: Development/Libraries/GNOME Version: 2.19.4 %define shlib_name 2_0-7 Release: 0 Summary: LibGTop Library Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/libgtop/2.19/%{name}-%{version}.tar.bz2 Patch: libgtop-resident-field-fix.patch Requires: %{name}-%{shlib_name} licenses BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A library that fetches information about the running system, such as CPU and memory usage and active processes. On Linux systems, this information is taken directly from the /proc file system. On other systems, a server is used to read information from /dev/kmem. Authors: -------- Martin Baulig (martin@home-of-linux.org) Drazen Kacar (dave@srce.hr) %package %{shlib_name} Summary: LibGTop Library Group: Development/Libraries/GNOME # Require translation package (%{name}) not older than the library: Requires: %{name} >= %{version} %description %{shlib_name} This package contains all necessary include files and libraries needed to develop applications that require these. Authors: -------- Martin Baulig (martin@home-of-linux.org) Drazen Kacar (dave@srce.hr) %package devel Summary: Include Files and Libraries mandatory for Development. Group: Development/Libraries/GNOME Requires: %{name} = %{version} glib2-devel gdbm-devel xorg-x11-devel PreReq: %install_info_prereq %description devel This package contains all necessary include files and libraries needed to develop applications that require these. Authors: -------- Martin Baulig (martin@home-of-linux.org) Drazen Kacar (dave@srce.hr) %package doc Summary: LibGTop Library Group: Development/Libraries/GNOME Requires: %{name} = %{version} %description doc A library that fetches information about the running system, such as CPU and memory usage and active processes. On Linux systems, this information is taken directly from the /proc file system. On other systems, a server is used to read information from /dev/kmem. Authors: -------- Martin Baulig (martin@home-of-linux.org) Drazen Kacar (dave@srce.hr) %prep %setup -q %patch # rpmlint note: libgtop has a separate translation for both Bengali and Bengali India %build autoreconf -f -i %configure\ --disable-static make %{?jobs:-j%jobs} %install %makeinstall %find_lang %{name}-2.0 LIBNAME="$(echo $RPM_BUILD_ROOT%{_libdir}/%{name}-*.so.? | sed 's/.*\///;s/\.so\./-/;s/\./_/')" if test "$LIBNAME" != "%{name}-%{shlib_name}" ; then echo "Library version does not match package name. It should be $LIBNAME." exit 1 fi for FILE in COPYING copyright.txt ; do MD5SUM=$(md5sum $FILE | sed 's/ .*//') if test -f /usr/share/doc/licenses/md5/$MD5SUM ; then ln -sf /usr/share/doc/licenses/md5/$MD5SUM $FILE fi done %clean rm -rf $RPM_BUILD_ROOT %post %{shlib_name} -p /sbin/ldconfig %postun %{shlib_name} -p /sbin/ldconfig %post doc %install_info --info-dir=%{_datadir}/info %{_datadir}/info/%{name}2.info.gz %postun doc %install_info_delete --info-dir=%{_datadir}/info %{_datadir}/info/%{name}2.info.gz %files -f %{name}-2.0.lang %defattr(-, root, root) # TODO is empty %doc AUTHORS COPYING NEWS README copyright.txt %files %{shlib_name} %defattr(-, root, root) %{_libdir}/*.so.* %files devel %defattr(-, root, root) %{_includedir}/libgtop-2.0 %{_libdir}/*.so %{_libdir}/*.*a %{_libdir}/pkgconfig/*.pc %files doc %defattr(-, root, root) %dir %{_datadir}/gtk-doc/html/libgtop %{_datadir}/gtk-doc/html/libgtop/* %doc %{_infodir}/*.info* -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: opensuse-gnome+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-gnome+help@opensuse.org
participants (1)
-
Stanislav Brabec