On 02/02/2010 10:44 AM, John Thomas wrote:
> I was able to build an RPM by:
>    extracting the tar.gz,
>    changed the version in the spec file to _rc2 from -rc2,
>    changed the bz2 in the spec file to gz,
>    copied the spec file to ~/,
>    renamed the directory to _rc2 from -rc2,
>    tar.gz the directory back up copy it to rpmbuild/SOURCES, and
>    rpmbuild -bb sqlgrey.spec
A bit too complicated ;-)
Here's a cleaner way (in sqlgrey.spec):
---- 8< ----
Name:           sqlgrey
Version:        1.8.0_rc1	# _rc1
...
Source0:        sqlgrey-1.8.0-rc1.tar.gz	# original tarball
...
%prep
%setup -n sqlgrey-1.8.0-rc1
%build
make
---- 8< ----
The key line is "%setup -n sqlgrey-1.8.0-rc1" which advises the rpm
builder that the unpacked directory is sqlgrey-1.8.0-rc1 instead of
sqlgrey-1.8.0_rc1 as would have been the default derived from %{version}.
HTH,
Michal
 |