Fixed spec file

Discussion of Transmission that doesn't fit in the other categories
Post Reply
blizzeye
Posts: 4
Joined: Thu Mar 05, 2009 10:05 pm

Fixed spec file

Post by blizzeye »

Hey, I was trying to build an RPM from the source package of Transmission and I saw that a spec file was present in the source directory. Some things weren't working so I fixed those. I'm running Fedora 10 myself, so I'm unsure this also works on other rpm-based systems like Suse. But for me it worked perfectly. Hope this of use to anyone.

Code: Select all

%define name transmission
%define version 1.51
%define release 1

Summary:   Transmission BitTorrent Client
Name:      %{name}
Version:   %{version}
Release:   %{release}
License:   MIT
Group:     Applications/Internet
URL:       http://www.transmissionbt.com/
Epoch:     1
Source0:   %{name}-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: curl-devel >= 7.16.3
BuildRequires: openssl-devel >= 0.9.4
BuildRequires: glib2-devel >= 2.6.0
BuildRequires: gtk2-devel >= 2.6.0
BuildRequires: libnotify-devel >= 0.4.3
BuildRequires: dbus-glib-devel >= 0.70

Requires: curl >= 7.16.3
Requires: openssl >= 0.9.4
Requires: glib2 >= 2.6.0
Requires: gtk2 >= 2.6.0
Requires: libnotify >= 0.4.3
Requires: dbus-glib >= 0.70

Provides: %{name}

%description
A fast and easy BitTorrent client

%prep
%setup -q
%build
%configure --program-prefix="" 
make CFLAGS="$RPM_OPT_FLAGS"
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS NEWS README
%attr(755,root,root) %{_bindir}/%{name}*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/*
%{_datadir}/icons/*
%{_datadir}/%{name}/web/*
%{_datadir}/man/man1/%{name}*
%{_datadir}/locale/*

%changelog

* Wed Jul 18 2006 Jordan Lee <jordan@transmissionbt.com>
- first draft at a spec file, cribbed from Pan's spec file
* Thu Mar 5 2009 Gijs <info@bs-en-w.nl>
- fixed %files section
- added Source0
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Fixed spec file

Post by rb07 »

Just a note, as you saw that file was made in 2006, so many things were obsolete... the version dependencies are different from what appears on the Web page, I asked a few months back and changed things for Gentoo (which doesn't use the spec file), here's what I use as dependencies:

Code: Select all

RDEPEND="|| ( >=net-misc/curl-7.16.3[ssl] >=net-misc/curl-7.16.3[gnutls] )
                 >=dev-libs/openssl-0.9.8
                 gtk? ( >=dev-libs/glib-2.16
                                >=x11-libs/gtk+-2.6
                                >=dev-libs/dbus-glib-0.70
                                libnotify? ( >=x11-libs/libnotify-0.4.3 ) )"
DEPEND="${RDEPEND}
                sys-devel/gettext
                >=dev-util/pkgconfig-0.19
                >=dev-util/intltool-0.35"
RDEPEND corresponds to Requires, DEPEND to BuildRequires. The differences are openssl and glib; the curl stuff means it depends on curl (actually libcurl but in Gentoo there is no separate libcurl) built with either openssl or gnutls.
Post Reply