[CentOS] help with spec file

Tim Dunphy

bluethundr at gmail.com
Sun Oct 3 02:32:02 UTC 2010


I am attempting to learn how to build my own rpms. I found a good
tutorial online but it is a bit out of date (2007). Here it is:

http://www.rpm-based.org/how-to-create-rpm-package

At any rate, the package it uses is of course old and I found a newer
version of one to test with. The tutorial uses a program called
'subtitleeditor' which when it was written was at version
0.20.0alpha4. The current version is at 0.37.1 and is available here:

http://home.gna.org/subtitleeditor/

I have come up with a spec file for the current version that _mostly_ works...

============================================
Summary: Subtitle editor
Name: subtitleeditor
Version: 0.37.1
Release: 1.rb7
License: GPL
Group: Applications/Multimedia
URL: http://kitone.free.fr/subtitleeditor/

Source: http://kitone.free.fr/subtitleeditor/files/subtitleeditor-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
#Patch: gtk_update_icon_cache.patch

BuildRequires: gstreamer-plugins-base-devel, gtk2-devel,
gtkmm24-devel, libglademm24-devel
BuildRequires: gstreamer-devel, pcre-devel, libxml++-devel,
enchant-devel, iso-codes-devel
Packager: bluethundr

%description
Subtitle Editor is a GTK+2 tool to edit subtitles for GNU/*.
It can be used for new subtitles or as a tool to transform, edit,
correct and refine existing subtitle. This program also shows sound
waves, which makes it easier to synchronise subtitles to voices.

Subtitle Editor is free software released under the GNU General Public
License (GPL).

%prep
%setup -q
#%patch -p1 -b .buildroot


%build
%configure --disable-debug
%{__make}

%install
%{__rm} -rf %{buildroot}
%makeinstall
%find_lang %{name}

%clean
%{__rm} -rf %{buildroot}

%files -f %{name}.lang
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog INSTALL NEWS TODO README COPYING
%{_bindir}/subtitleeditor
%{_datadir}/subtitleeditor/
%{_datadir}/icons/hicolor/*
%exclude %{_datadir}/icons/hicolor/icon-theme.cache
%{_datadir}/applications/subtitleeditor.desktop

%changelog
* Sat Oct 2 2010 - bluethundr At gm4il d00t com 0.37.1
- Initial release.

======================================================
And with the prereqs installed I get mostly through the build. But I
get hung up here:

=======================================================

checking for XML::Parser... ok
checking for i686-redhat-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTKMM... configure: error: Package requirements
(gtkmm-2.4 >= 2.14 glibmm-2.4 >= 2.16.3) were not met:

Requested 'gtkmm-2.4 >= 2.14' but version of gtkmm is 2.10.10
Requested 'glibmm-2.4 >= 2.16.3' but version of GLibmm is 2.12.10

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTKMM_CFLAGS
and GTKMM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

error: Bad exit status from /var/tmp/rpm-tmp.90098 (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.90098 (%build)


======================================================

It seems to be looking for gtkmm-2.4 at version greater than 2.14 and
glibmm-2.4 at a version greater than 2.16.3. Yet I have looked for
rpm's of these files at those levels and I find none later than the
ones installed.

I think the solution may lie here:

Alternatively, you may set the environment variables GTKMM_CFLAGS
and GTKMM_LIBS to avoid the need to call pkg-config.

I understand I am novice at these matters, but I am unsure of how to
set these variables and would appreciate a pointer on how to do that.


I would appreciate it if I could get some help with this problem.
Thanks in advance!

Thanks



More information about the CentOS mailing list