s3-script: Install the findsmb script
authorAndreas Schneider <asn@samba.org>
Tue, 7 Jun 2016 11:49:39 +0000 (13:49 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 9 Jun 2016 17:10:15 +0000 (19:10 +0200)
When we transitioned from autotools to waf we dropped installing the
findsmb script. However we create and install the manpage for it so
install it in the system again.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jun  9 19:10:15 CEST 2016 on sn-devel-144

source3/script/findsmb.in
source3/script/wscript_build

index 546cf8ce7b4a964429e7c1fac23c7b50d99110a5..46cda841e3777e9aa48f47c9ba121c6fdf5a4a03 100755 (executable)
@@ -20,7 +20,7 @@
 # -r           add -r option to nmblookup when finding netbios name
 #
 
-$SAMBABIN = "@prefix@/bin";
+$SAMBABIN = "@BINDIR@";
 
 for ($i = 0; $i < 2; $i++) {   # test for -d and -r options
        $_ = shift;
index 56c904fe349fea81a2d9210b1d9e2e313f5ce365..25591ea762165ae15bc8fca060dff7d7930212b6 100644 (file)
@@ -10,3 +10,16 @@ bld.INSTALL_FILES('${BINDIR}',
 bld.SAMBA_SCRIPT('smbaddshare', pattern='smbaddshare', installdir='.')
 bld.SAMBA_SCRIPT('smbchangeshare', pattern='smbchangeshare', installdir='.')
 bld.SAMBA_SCRIPT('smbdeleteshare', pattern='smbdeleteshare', installdir='.')
+
+sed_expr1 = 's#@PERL@#/usr/bin/env perl#'
+sed_expr2 = 's#@BINDIR@#${BINDIR}#'
+
+bld.SAMBA_GENERATOR('findsmb-script',
+                    source='findsmb.in',
+                    target='findsmb',
+                    rule='sed -e "%s" -e "%s" ${SRC} > ${TGT}' % (sed_expr1, sed_expr2))
+
+bld.INSTALL_FILES('${BINDIR}',
+                  'findsmb',
+                  destname='findsmb',
+                  chmod=0755)