gnif/mod_rpaf

DESTDIR fails. Building on CentOS6

Closed this issue · 1 comments

When i try and pass the DESTDIR=/foo/bar parameter it fails with.

make install DESTDIR=/root/fpm/tmp/mod_rpaf
./apxs.sh -c -n mod_rpaf.so mod_rpaf.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/local/include  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_rpaf.lo mod_rpaf.c && touch mod_rpaf.slo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o mod_rpaf.la  -rpath /usr/local/libexec -module -avoid-version    mod_rpaf.lo
./apxs.sh -i -S LIBEXECDIR=/root/fpm/tmp/mod_rpaf$(./apxs.sh -q LIBEXECDIR)/ -n mod_rpaf.so mod_rpaf.la
/usr/local/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' mod_rpaf.la /root/fpm/tmp/mod_rpaf/usr/local/libexec/
/usr/lib64/apr-1/build/libtool --mode=install cp mod_rpaf.la /root/fpm/tmp/mod_rpaf/usr/local/libexec//
libtool: install: cp .libs/mod_rpaf.so /root/fpm/tmp/mod_rpaf/usr/local/libexec/mod_rpaf.so
cp: cannot create regular file `/root/fpm/tmp/mod_rpaf/usr/local/libexec/mod_rpaf.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
make: *** [install] Error 1

As you can see it puts a // here /usr/lib64/apr-1/build/libtool --mode=install cp mod_rpaf.la /root/fpm/tmp/mod_rpaf/usr/local/libexec//

In the Makefile changing install to:

$(APXS) -i -S LIBEXECDIR=$(DESTDIR)$$($(APXS) -q LIBEXECDIR) -n mod_rpaf.so mod_rpaf.la

drops the extra / but still fails to install to my DESTDIR.

make install DESTDIR=/root/fpm/tmp/mod_rpaf
./apxs.sh -c -n mod_rpaf.so mod_rpaf.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/local/include  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_rpaf.lo mod_rpaf.c && touch mod_rpaf.slo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o mod_rpaf.la  -rpath /usr/local/libexec -module -avoid-version    mod_rpaf.lo
./apxs.sh -i -S LIBEXECDIR=/root/fpm/tmp/mod_rpaf$(./apxs.sh -q LIBEXECDIR) -n mod_rpaf.so mod_rpaf.la
/usr/local/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' mod_rpaf.la /root/fpm/tmp/mod_rpaf/usr/local/libexec
/usr/lib64/apr-1/build/libtool --mode=install cp mod_rpaf.la /root/fpm/tmp/mod_rpaf/usr/local/libexec/
libtool: install: cp .libs/mod_rpaf.so /root/fpm/tmp/mod_rpaf/usr/local/mod_rpaf.so
cp: cannot create regular file `/root/fpm/tmp/mod_rpaf/usr/local/mod_rpaf.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
make: *** [install] Error 1

Now if I change the install line to:

$(APXS) -i -S LIBEXECDIR=$(DESTDIR)$($(APXS) -q LIBEXECDIR) -n mod_rpaf.so mod_rpaf.la

The install seems to complete to the DESTDIR

make install DESTDIR=/root/fpm/tmp/mod_rpaf
./apxs.sh -c -n mod_rpaf.so mod_rpaf.c
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/local/include  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_rpaf.lo mod_rpaf.c && touch mod_rpaf.slo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o mod_rpaf.la  -rpath /usr/local/libexec -module -avoid-version    mod_rpaf.lo
./apxs.sh -i -S LIBEXECDIR=/root/fpm/tmp/mod_rpaf -n mod_rpaf.so mod_rpaf.la
/usr/local/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' mod_rpaf.la /root/fpm/tmp/mod_rpaf
/usr/lib64/apr-1/build/libtool --mode=install cp mod_rpaf.la /root/fpm/tmp/mod_rpaf/
libtool: install: cp .libs/mod_rpaf.so /root/fpm/tmp/mod_rpaf/mod_rpaf.so
libtool: install: cp .libs/mod_rpaf.lai /root/fpm/tmp/mod_rpaf/mod_rpaf.la
libtool: install: cp .libs/mod_rpaf.a /root/fpm/tmp/mod_rpaf/mod_rpaf.a
libtool: install: chmod 644 /root/fpm/tmp/mod_rpaf/mod_rpaf.a
libtool: install: ranlib /root/fpm/tmp/mod_rpaf/mod_rpaf.a
libtool: install: warning: remember to run `libtool --finish /usr/local/libexec'
chmod 755 /root/fpm/tmp/mod_rpaf/mod_rpaf.so

But there is only mod_rpaf.so in there, it does not create /usr/local/libexec inside my DESTDIR. Kinda lost after this point. Thanks for any info or help getting this to work with DESTDIR as I am trying to package this.

gnif commented

Closing this issue due to age, if this is still an issue feel free to comment.