Author Topic: [PACKAGED] HarfBuzz - Is it OK?  (Read 716 times)

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
[PACKAGED] HarfBuzz - Is it OK?
« on: January 31, 2013, 10:57:33 AM »
HarfBuzz is an OpenType text shaping engine. http://www.freedesktop.org/wiki/Software/HarfBuzz
It is an optional dependency for E17.
The version under consideration is 0.9.2

This package was not previously in our repository and hence the .spec is completely self-built and most likely to have errors.

This is the first time I have tried to package a library in order to create both the library and its corresponding -devel packages. While doing so I have used the advice given here http://www.pclinuxos.com/forum/index.php/topic,112837.0.html and also tried to learn by reading some existing .spec files.

SRPM - http://dl.dropbox.com/u/37931428/E17/harfbuzz-0.9.12-1slingshot2013.src.rpm
SPEC - http://dl.dropbox.com/u/37931428/E17/slingshot-harfbuzz.spec
LOG - http://dl.dropbox.com/u/37931428/E17/slingshot-harfbuzz.spec.log

I found many unused libraries being mentioned in the log.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1164
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #1 on: January 31, 2013, 11:26:37 AM »
the files section of the spec is not ok

Code: [Select]
%files
%defattr(-,root,root)
%{_bindir}/*
%{_includedir}/harfbuzz/hb-*.h                      # everything in the includedir here *.h header files have to be put into the devel package
%{_includedir}/harfbuzz/hb.h                         # you place them in both packages. that's not a good idea
%doc AUTHORS COPYING README
%{_libdir}/libharfbuzz.*                                 # libharfbuzz.* includes libharfbuzz.so which is a devel lib which have to be in the devel package
#%{_libdir}/libharfbuzz.so.0                           # better is libharfbuzz.so.*
#%{_libdir}/libharfbuzz.so.0.912
%{_libdir}/pkgconfig/harfbuzz.pc                    # this just in the devel package

%files devel
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_includedir}/harfbuzz/hb-*.h
%{_includedir}/harfbuzz/hb.h
%{_libdir}/pkgconfig/*
                                                                # libharfbuzz.so is missing here
« Last Edit: February 01, 2013, 01:16:31 AM by ghostbunny »
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1164
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #2 on: January 31, 2013, 11:35:54 AM »
build it on my machine i have no overlinking (unused libraries)

maybe just a missing dependency
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #3 on: January 31, 2013, 12:14:29 PM »
(posting from mobile)

What is wrong with %files section? How should I correct it?

There were no dependecies mentioned anywhere,
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #4 on: January 31, 2013, 12:43:18 PM »
In addition to what ghostbunny has said:

Your SPEC file is incorrectly named.
You have packaged a /usr/lib/libharfbuzz.la

What is wrong with %files section? How should I correct it?

You have put the header files, linker library and pkgconfig file in the runtime package. They should ONLY be in the -devel subpackage.

Terry.
« Last Edit: January 31, 2013, 01:10:36 PM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1164
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #5 on: January 31, 2013, 02:32:17 PM »
(posting from mobile)

What is wrong with %files section? How should I correct it?

There were no dependecies mentioned anywhere,

read the comments in my code block
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #6 on: January 31, 2013, 08:57:36 PM »
read the comments in my code block

Sorry. I am following this thread on mobile right now, and Opera Mini is bad in displaying CODE /CODE text. Hence I missed your comments.
Opera Mobile is slightly better at it and now I can see your comments.

I will be back with improved .spec later once I am back at my computer.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #7 on: February 01, 2013, 09:17:10 PM »
I have updated the %files section thus :
Code: [Select]
%files
%defattr(-,root,root)
%exclude %{_libdir}/*.la
%{_bindir}/*
#%{_includedir}/harfbuzz/hb-*.h
#%{_includedir}/harfbuzz/hb.h
%doc AUTHORS COPYING README
%{_libdir}/libharfbuzz.so.*
#%{_libdir}/libharfbuzz.so.0.912
#%{_libdir}/pkgconfig/harfbuzz.pc

%files devel
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_libdir}/libharfbuzz.so
%{_includedir}/harfbuzz/hb-*.h
%{_includedir}/harfbuzz/hb.h
%{_libdir}/pkgconfig/harfbuzz.pc

Right now it builds without errors. But the unused libraries are persisting. I suppose I will have to further investigate the BuildRequires section.

I have updated the DropBox links above.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1164
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #8 on: February 02, 2013, 05:05:52 AM »
files section looks ok now but you should add build requirements

- glib-devel
- cairo-devel
- freetype-devel
- icu-devel

i'm currently on a win machine so i can't check it but probably graphviz-devel

Note: the listed item are not the correct package names.


regards
ghostbunny
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #9 on: February 02, 2013, 10:40:02 AM »
Those were not explicitly mentioned in any of the simple text files inside the package or on the website.
The configure.ac file seems to have them.

It is asking for graphite and not graphviz. Or does graphviz provide graphite? Package Graphite is not in our repository ;)

libicu-devel was installed but icu was not. So I installed icu but still the log seems to show that ICU is not present :(

Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1164
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #10 on: February 03, 2013, 03:23:31 AM »
Those were not explicitly mentioned in any of the simple text files inside the package or on the website.
The configure.ac file seems to have them.

yes and you can read the packages in the configure part of your spec log.

Quote
It is asking for graphite and not graphviz. Or does graphviz provide graphite? Package Graphite is not in our repository Wink

I'm still on win so do in a terminal

Code: [Select]
apt-cache whatprovides graphite
Quote
libicu-devel was installed but icu was not. So I installed icu but still the log seems to show that ICU is not present

maybe there was a other icu thing i installed i'll check this tonight or tomorrow.
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1164
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #11 on: February 03, 2013, 01:30:24 PM »
ok it does not require graphviz-devel.
and you are right icu-devel does not help maybe a newer version is optionally required but i don't know this.

so just add

- glib-devel
- cairo-devel
- freetype-devel

as build requirements.
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #12 on: February 04, 2013, 03:59:52 AM »
Other than icu-devel and graphite, I seem to have all else.
I have uploaded final version to dropbox.

I will proceed with the next E17 package now.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3737
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: [PACKAGED] HarfBuzz - Is it OK?
« Reply #13 on: March 29, 2013, 06:52:44 PM »
You solved my problem with pango...

I rewrite something in your specfile...
Code: [Select]
%define major 0
%define libname    %mklibname %{name} %{major}
%define libnamedev  %mklibname -d %{name} 

Name: harfbuzz
Version: 0.9.12
Release: %mkrel 1
Summary: HarfBuzz, a text shaping library
License: Old MIT
Group: System/Libraries
URL: http://www.harfbuzz.org
Source: %{name}-%{version}.tar.xz
BuildRequires: %{_lib}glib2.0_0-devel
BuildRequires: %{_lib}freetype6-devel
#BuildRequires: libicu-devel
BuildRequires: libcairo-devel
Requires: %{libname} = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-buildroot

%description
HarfBuzz is an OpenType text shaping engine.

%files
%defattr(-,root,root)
%{_bindir}/*
%doc AUTHORS COPYING README

#___________________________________________________________

%package -n %{libname}
Summary: HarfBuzz, a text shaping library
Group: System/Libraries
Provides: %{libname} =  %{version}-%{release}

%description -n %{libname}
HarfBuzz is an OpenType text shaping engine.


%post -n %{libname}
/sbin/ldconfig

%postun -n %{libname}
/sbin/ldconfig

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libharfbuzz.so.%{major}*

#___________________________________________________________


%package -n %{libnamedev}
Summary: Devel package of HarfBuzz
Group: Development/C
Requires: %{libname} = %{version}-%{release}
Provides: lib%{name}-devel = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}

%description -n %{libnamedev}
Devel package of HarfBuzz

%files -n %{libnamedev}
%defattr(-,root,root)
%doc AUTHORS COPYING README
%exclude %{_libdir}/*.la
%{_libdir}/libharfbuzz.so
%{_includedir}/harfbuzz/hb-*.h
%{_includedir}/harfbuzz/hb.h
%{_libdir}/pkgconfig/harfbuzz.pc

#____________________________________________________________

%prep
%setup -q

%build
%configure
%make

%install
rm -rf %buildroot

%makeinstall

%clean
rm -rf $RPM_BUILD_ROOT


%changelog
* Mon Jan 21 2013 Sling Shot <sling-shot at lycos.com> 0.9.12-1slingshot2013
- Initial package

Feel free to use it...

Regards
Daniel