The BuildRoot option, which installs software to a different location than the build prefix doesn't work properly with Samba. The reason is that several paths are set in the Makefile at configure time, and are not overridden at make time. In particular, BASEDIR, BINDIR, SBINDIR, VARDIR and DATADIR. The others properly reference ${prefix}. Instead of using direct autoconfig substitution for the capitalized variables, this should work instead: prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ BINDIR=${bindir} BASEDIR=${prefix}
Joshua, what packaging directory are you using? Can you give me some more details on how to produce the failure during an rpmbuild? I'm not seeing problems during my tests.
Created attachment 1488 [details] RPM spec file
Sorry for the slow response. I've just tried building 3.0.20a and I get the same problems. I've attached my spec file and the output from the make install stage. I'm building on a Red Hat Enterprise 3 clone. Samba is built properly; however, the install portion of the process puts the bin/ sbin/ and var/ directories in the wrong place. They end up in the final install path rather than ${buildroot}/install_path. i.e. at install time, the bin/ sbin/ and var/ directories are not being put into the user specified prefix directory, which is set on the command line for make. Possibly a problem with the installbin.sh script? I don't think what I reported earlier about the variable definitions is a problem, it should be fine as is.
Created attachment 1489 [details] Output from make install portion of rpmbuild
The BuildRoot variable works fine in the RHEL/Fedora specfiles in the source tree. I'm not sure what the problem here is. Please recheck 3.0.21b and reopen if needed. Also, the rpmbuild log file doesn't really help me understand what the problem you reported is.
Scratch that. I see it now.
OK. The fix is to call make install like: make DESTDIR=$RPM_BUILD_ROOT install