Build script: Allow to change sbindir and mandir
I'm interested in packaging NTPsec for Archlinux. The problem is that the filesystem layout on Arch differs from the defaults of the waf buildscript:
/bin, /sbin, /usr/sbin are all merged into /usr/bin and there is no /usr/local. The latter is no problem as it can easily be changed using the --prefix=/usr
option. The thing is, that there is no option to set --sbindir
and thus ntpd gets installed into /usr/sbin. Another issue is that there is no way to set the directory for the man pages. Archlinux has them under /usr/share/man, but the waf script copies them into /usr/man. There is an --path-doc=
option, but AFAICT this doesn't affect anything.
$ ./waf configure --prefix=/usr --bindir=/usr/bin --enable-crypto
...
$ ./waf build
...
$ ./waf install --destdir=../tmp
...
$ ls -lR ../tmp
total 0
drwxr-xr-x 5 wlhlm staff 170 Jun 4 14:41 usr
../tmp/usr:
total 0
drwxr-xr-x 9 wlhlm staff 306 Jun 4 14:41 bin
drwxr-xr-x 5 wlhlm staff 170 Jun 4 14:41 man
drwxr-xr-x 3 wlhlm staff 102 Jun 4 14:41 sbin
../tmp/usr/bin:
total 1952
-rwxr-xr-x 1 wlhlm staff 137404 Jun 4 14:30 ntpdig
-rwxr-xr-x 1 wlhlm staff 54972 Jun 4 14:30 ntpfrob
-rwxr-xr-x 1 wlhlm staff 61696 Jun 4 14:30 ntpkeygen
-rwxr-xr-x 1 wlhlm staff 204056 Jun 4 14:30 ntpq
-rwxr-xr-x 1 wlhlm staff 197268 Jun 4 14:30 test_libntp
-rwxr-xr-x 1 wlhlm staff 129744 Jun 4 14:30 test_ntpd
-rwxr-xr-x 1 wlhlm staff 200036 Jun 4 14:30 test_ntpdig
../tmp/usr/man:
total 0
drwxr-xr-x 6 wlhlm staff 204 Jun 4 14:41 man1
drwxr-xr-x 4 wlhlm staff 136 Jun 4 14:41 man5
drwxr-xr-x 8 wlhlm staff 272 Jun 4 14:41 man8
../tmp/usr/man/man1:
total 32
-rw-r--r-- 1 wlhlm staff 1500 Jun 4 14:37 ntpdig.1
-rw-r--r-- 1 wlhlm staff 1552 Jun 4 14:38 ntpq.1
-rw-r--r-- 1 wlhlm staff 2784 Jun 4 14:40 ntpsweep.1
-rw-r--r-- 1 wlhlm staff 1478 Jun 4 14:40 ntptrace.1
../tmp/usr/man/man5:
total 40
-rw-r--r-- 1 wlhlm staff 13297 Jun 4 14:37 ntp.conf.5
-rw-r--r-- 1 wlhlm staff 3153 Jun 4 14:37 ntp.keys.5
../tmp/usr/man/man8:
total 48
-rw-r--r-- 1 wlhlm staff 1521 Jun 4 14:37 ntpd.8
-rw-r--r-- 1 wlhlm staff 1476 Jun 4 14:38 ntpfrob.8
-rw-r--r-- 1 wlhlm staff 1488 Jun 4 14:39 ntpkeygen.8
-rw-r--r-- 1 wlhlm staff 1505 Jun 4 14:40 ntpleapfetch.8
-rw-r--r-- 1 wlhlm staff 1489 Jun 4 14:38 ntptime.8
-rw-r--r-- 1 wlhlm staff 1494 Jun 4 14:40 ntpwait.8
../tmp/usr/sbin:
total 912
-rwxr-xr-x 1 wlhlm staff 464232 Jun 4 14:30 ntpd