[olsr-dev] Patch to make Makefile respect DESTDIR

Roar Bjørgum Rotvik (spam-protected)
Wed Nov 8 12:42:19 CET 2006


Bernd Petrovitsch wrote:
> On Wed, 2006-11-08 at 08:22 +0100, Roar Bjørgum Rotvik wrote:

>>>> Attached patch does basically two things:
>>>> - Change the INSTALL_PREFIX-var on all makefiles to DESTDIR (that's more 
>>>> standard, basically most Makefiles out there use DESTDIR)
>>>> - Let the linux-gtk-frontend also respect the DESTDIR-var on make install.
>>>>
>>>> Would be nice if you could apply this.
>>> Since this probably affects mostly packagers: Opinions?
>> I don't think it will be a problem for the RPM package, just a small change.
> 
> Yup.
> But e.g. "rpm" changed one mandatory header field from "Copyright" to
> "License" so everyother .src.rpm I try to `rpm --rebuild` needs ATM `rpm
> -i; $EDITOR .spec; rpm -ba .spec` just to fix that.

But what has this header option in the spec file have to do with the change from 
INSTALL_PREFIX to DESTDIR? :)

>> The src.rpm file also contains the .spec file.
>> The olsrd init file (installed as /etc/init.d/olsrd) is embedded inside the .spec file for 
>> RPM at least.
>>
>> I see no problem adding the RPM spec file in CVS, actually I think it would be smart to do 
>> it like this. Everyone with access to CVS would have access to the package files and the 
>> package files would be under version control also.
>>
>> Someone need to decide on a package directory in the source tree where we can put these 
>> package files.
>> Example: olsrd-current/packages/rpm, olsrd-current/packages/deb and so on?
> 
> Well, RedHat/FC doesn't have any special place for the .spec AFAIK.
> Debian expects for it's packages a "debian" directory directly in the
> top level (and depending on the package they have an awful lot of files
> in there). So this doesn't seem to be avoidable. Consequently one (well,
> at least /me) would make a "redhat" (or whatever name fits) directory in
> parallel and put the .spec and /etc/init.d/olsrd script in there (and
> other files which make sense only for RPM building).

At least rpmbuild supports building from .tar file if it can find a spec file inside the 
tar file.
I have not tested this yet so I don't know exactly where inside the tar file rpmbuild look 
for a .spec file, but I think it look in the root folder for a file named olsrd.spec if 
the tar file is named olsrd-0.4.10.tar.gz.

In this case "rpmbuild -ta olsrd-0.4.10.tar.gz" would find the spec file inside and build 
a RPM file that is placed in /usr/src/redhat/RPMS/i386/ (default while building as root on 
Red Hat or Fedora).

If rpmbuild supports looking for the .spec file in other locations inside the tar file 
(like under a directory named rpm/ or so) that would be nice, but I guess we could place 
the rpm .spec file in the top level source directory to support rpmbuild from tar file.
Or at least place the .spec file in the top level directory while creating a tar file for 
release if we place the .spec file another place in the source tree.

-- 
Roar Bjørgum Rotvik

-- 
Roar




More information about the Olsr-dev mailing list