Re: Newbie trying to build a binary RPM

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

 




OK, this is good. We're making progress now I think. I put in a .rpmmacros and set my %_topdir macro as suggested by you and another responder (Thanks!)
I also changed the file name as you suggested.

Here's my current spec file:

Summary: A SIP-based softphone for the Linux Operating System
Name: sip
Version: 0.9.1
Release: 1
Copyright: Free for non-commercial use
Group: Applications/Communications
Source: %{name}-%{version}.tgz

%description
The Cornfed SIP User Agent is a Session Initiation Protocol (SIP) based
softphone for your IBM-compatible Personal Computer running the Linux
Operating System. The Cornfed SIP User Agent allows you to make Internet
phone calls using an Open Sound System (OSS) or Advanced Linux Sound
Architecture (ALSA) sound card with speakers and microphone as your
telephone handset.

%prep
%setup
%build
%install
install -o 0 -g 0 -s -v -m 755 sip /usr/local/bin/sip
install -o 0 -g 0 -v -m 644 ring.wav /etc/sip/ring.wav
%files
/usr/local/bin/sip
/etc/sip/ring.wav

I've put a fresh .tgz file called sip-0.9.1.tgz in the SOURCES directory and have also done a clean build there as well. The actual binaries that I want to be packed into the RPM are therefore at the following locations:

/home/fwmiller/sip/rpm/SOURCES/sip/gnome/sip
/home/fwmiller/sip/rpm/SOURCES/sip/wav/ring.wav

These files should be going into /usr/local/bin/sip and /etc/sip/ring.wav, respectively.

However, now when I run rpmbuild I get the following output:

[fwmiller@localhost SPECS]$ rpmbuild -bb --nobuild -vv sip.spec
Processing files: sip-0.9.1-1
error: File not found: /usr/local/bin/sip
error: File not found: /etc/sip/ring.wav
Processing files: sip-debuginfo-0.9.1-1
error: Could not open %files file /home/fwmiller/sip/rpm/BUILD/sip-0.9.1/debugfiles.list: No such file or directory


RPM build errors:
   File not found: /usr/local/bin/sip
   File not found: /etc/sip/ring.wav
Could not open %files file /home/fwmiller/sip/rpm/BUILD/sip-0.9.1/debugfiles.list: No such file or directory


Tim Born wrote:

Frank -

I'm no expert, so my advice may not be any good.

I'd start by creating $HOME/.rpmmacros so you can build in your own area:
bash$ cat .rpmmacros
%_topdir /home/timborn/usr/src/redhat

That should take care of your first problem. The next problem you are likely to see is that your tarball isn't following the naming convention used by RPMs. There's ways to work around everything, but The Path Of Least Resistance is to have your tarball in %_topdir/SOURCES be named %{name}-%{version}.tar (or .tar.gz, or .tgz). Otherwise you need to tweak the %prep section, because this is the format it's expecting.

You can also replace your Source: tag with something like
Source: %{name}-%{version}.tgz



[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux