Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#5 DESTDIR in Makefile

open
nobody
None
5
2005-12-19
2005-12-19
Tobias Mucke
No

Hi,

please use DESTDIR in your Makefile consequently,
especially when using chmod in the last lines of your
Makefile. Otherwise it is not easy to build an RPM file.

Thanks.

Tobias

Discussion

  • Mike Frysinger
    Mike Frysinger
    2006-01-10

    Logged In: YES
    user_id=114429

    agreed ... simple sed to fix the bug:
    sed -i 's:chmod u+s $(:chmod u+s $(DESTDIR)$(:' Makefile.am

     
  • Werner Flamme
    Werner Flamme
    2008-11-23

    I unpacked the sources, applied the sed command, Makefile.am is OK. So I packed the sources again and put them to /usr/src/packages/SOURCES and retried 'rpmbuild -ba SPECS/rssh.spec'. The result is not what I expected.

    In BUILD/rssh-2.3.2 I see the patched Makefile.am. But when I look at the makefile, it still reads "chmod u+s $(libexecdir)/rssh_chroot_helper", without the $(DESTDIR). And it again chmods the wrong file...

    make install-exec-hook
    make[2]: Entering directory `/usr/src/packages/BUILD/rssh-2.3.2'
    chmod u+s /usr/lib64/rssh_chroot_helper
    make[2]: Leaving directory `/usr/src/packages/BUILD/rssh-2.3.2'

    I had to modify line 731 (the corresponding install-exe-hook) in Makefile.in to have chmod working against the newly created rssh_chroot_helper.

    make install-exec-hook
    make[2]: Entering directory `/usr/src/packages/BUILD/rssh-2.3.2'
    chmod u+s /tmp/rssh-2.3.2-buildroot/usr/lib64/rssh_chroot_helper
    make[2]: Leaving directory `/usr/src/packages/BUILD/rssh-2.3.2'

    Regards,
    Werner