2008-06-27

SUSE 11.0 handmade

SUSE 11.0 released about a week ago. As few previous versions, there is lack of proprietary multimedia formats support. And there is few ways to resolve it. First, most common way - to add packman repository and install everything from there, and to find other repositories for freetype2 and few other packages. But I don't like this way. SUSE team did a great job with packages and integration, downloaded from other sources packages rarely have this level of integration. My way - to take official SUSE src.rpm packages from official source repositories, and build it with SUSE build tools.

Preparing:
There is a great tutorial about "build", it will introduce build procedure for you. It will prepare you for reading this article.
Also, there is some packages from internet repository you will need. I don't know why aren't they on DVD. You can store them to folder of provided packages, "/home/to_build/provided" for me. I got them from x86_64 repository, and videolan repository for libmad and libdvdcss.

avahi-lang-0.6.22-68.1.x86_64.rpm
flac-devel-1.2.1-43.1.x86_64.rpm
gconf2-lang-2.22.0-28.1.x86_64.rpm
gnome-vfs2-lang-2.22.0-33.1.x86_64.rpm
gstreamer-0_10-lang-0.10.19-16.1.x86_64.rpm
gstreamer-0_10-plugins-base-lang-0.10.19-24.1.x86_64.rpm
libbonobo-lang-2.22.0-21.1.x86_64.rpm
libcdio++0-0.80-3.1.x86_64.rpm
libcdio-devel-0.80-3.1.x86_64.rpm
libdvdcss-1.2.9-5.1.x86_64.rpm
libgnutls-devel-2.2.2-17.1.x86_64.rpm
libiso9660-5-0.80-3.1.x86_64.rpm
libmad-0.15.1b-5.1.x86_64.rpm
libmad-devel-0.15.1b-5.1.x86_64.rpm
libtheora-devel-1.0.beta2-3.1.x86_64.rpm
libudf0-0.80-3.1.x86_64.rpm
speex-devel-1.1.99.3-28.1.x86_64.rpm
vcdimager-0.7.23-132.1.x86_64.rpm
vcdimager-devel-0.7.23-132.1.x86_64.rpm

Step One - xine
The most important multimedia part of SUSE distro - xine engine. Let's build it first.
1. Download xine-lib-1.1.12-8.1.src.rpm from SUSE repositories and unpack it to some (target) folder.
2. Remove xine-lib-1.1.12-crippled.tar.bz2 from target folder.
3. Download xine-lib-1.1.12.tar.bz2 from official sourceforge website and save it to target folder.
4. Open xine-lib.spec with your favourite editor.
5. Change line like this:
from
"%define BUILD_XINE %{?_with_internal:2}%{!?_with_internal:%build_xine_default}" to "%define BUILD_XINE 2".
6. Set Release to "Release: 8.1.1" - it will with pleasure override already installed xine.
7. Modify source declaration from crippled:
from:

Source: xine-lib-%version-crippled.tar.bz2
%if 0
Source: xine-lib-%version.tar.bz2
%endif
to:

Source: xine-lib-%version.tar.bz2

8. Find and comment each of lines to let sources be uncrippled:

Source99: precheckin_cripple_tarball.sh
Patch70: xine-lib-crippled-LOCAL.diff
%patch70

9. Also, change all
"mad" and "mad-devel" dependencies to "libmad" and "libmad-devel".
10. just build it:

build --root /home/to_build/root --rpms /home/to_build/provided xine-lib.spec
11. Take your packages from
"/home/to_build/root/usr/src/packages/RPMS/".

Step Two - Kaffeine
Kaffeine is best front-end for xine ever-made. Let's build it with DVD support!
1. Download kaffeine-0.8.6-54.1.src.rpm and unpack it.
2. Comment each of this lines:

Patch0: %name.diff
Patch2: messagebox-dvd.diff
3. Build it. I got small problem with some locale files, so you can just add locale files after icons packaging:
from:

/opt/kde3/share/appl*/*/*
/opt/kde3/share/apps/kaffeine
/opt/kde3/share/apps/konqueror
/opt/kde3/share/apps/profiles
/opt/kde3/share/icons/*
/opt/kde3/share/mimelnk/*/*.desktop
to:

/opt/kde3/share/appl*/*/*
/opt/kde3/share/apps/kaffeine
/opt/kde3/share/apps/konqueror
/opt/kde3/share/apps/profiles
/opt/kde3/share/icons/*
/opt/kde3/share/locale/*/*/*
/opt/kde3/share/mimelnk/*/*.desktop


Step Three - FreeType2
There is no subpixel font smoothing in SUSE, so it will be useful for LCD owners.
1. Download freetype2-2.3.5-62.1.src.rpm from SUSE repository and unpack it, for example into "/home/to_build/src/freetype".
2. Download full FreeType2 from official website into same folder ("/home/to_build/src/freetype"), replacing old one.
3. Change two blocks:
from
Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2
Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.bz2
to
Source0: freetype-%{version}.tar.bz2
Source1: freetype-doc-%{version}.tar.bz2
and from
%define enable_subpixel_rendering 0%{?opensuse_bs}
to
%define enable_subpixel_rendering 1
4. Just build it and install packages from same folder -
"/home/to_build/root/usr/src/packages/RPMS/"

That is all! Now you have your SUSE good as new, without less integrated third-party packages and without crippled multimedia. It's time to install win32 codecs from packman and libdvdcss from videolan before first kaffeine launch, install amarok-xine and remove buggy amarok-yauap plugin.

2 comments:

Anonymous said...

Just as a matter of interest, Aekold (and to negate the entire purpose of your excellent and informative blog post), is there a third-party repository that provides a pre-compiled binary of FreeType2 with both subpixel smoothing *and* the bytecode interpreter enabled?

Regards,

Michael

Aekold said...

Once for 10.1 and 10.2 there was a Guru repository. But after Guru went to packman - I didn't found anything.