ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] spec file pulling from CVS


From: Stuart Hughes
Subject: Re: [Ltib] spec file pulling from CVS
Date: Tue, 24 Nov 2009 18:06:01 +0000
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Andrea,

Yes this is possible, but not necessarily recommended.

Basically to do this for CVS (or any other SCM) system you basically need a spec file that is a variation of a directory build style .spec. The key is to have no source/patch references and a custom %prep section and to define the buildsubdir

Here's an example idea of the kind of thing I mean:


------ example.spec

%define pfx /opt/freescale/rootfs/%{_target_cpu}
%define buildsubdir %{name}-%{version}

Summary     : An example
Name        : example
Version     : local
Release     : 1
License     : GPL
Vendor      : Some vendor
Packager    : Some person
Group       : Applications/Test
BuildRoot   : %{_tmppath}/%{name}
Prefix      : %{pfx}

%Description
%{summary}

%Prep
if [ ! -d %{buildsubdir} ]
then
    cvs checkout some_cvs_url -d %{buildsubdir}
fi

%Build
cd %{_builddir}/%{buildsubdir}
cvs up
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build}
make

%Install
cd %{_builddir}/%{buildsubdir}
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}

%Clean
rm -rf $RPM_BUILD_ROOT

%Files
%defattr(-,root,root)
%{pfx}/*

-----------------

Regards, Stuart


Andrea Galbusera wrote:
Hi ltib people,

I was asking myself if it is possible to instruct a spec file to pull
package sources from a CVS repository instead of uncompressing a
source archive. The idea is to have an option to build a
'state-of-the-art' version of the an application which is under
development, without having to make snapshot archives from the CVS. Is
this feasible anyhow? I did not find any clue in FAQ an previous list
thread.

T.I.A. for any feedback
Andrea





reply via email to

[Prev in Thread] Current Thread [Next in Thread]