diff --git a/ChangeLog b/ChangeLog index 0061024..acd597c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ Version NEXT minor whitespace cleanup do not fail hard if we can't write to pid file and running from inetd + added scons switch without-server=yes to not build fspd Version 2.8.1b29 - 24 Aug 2019 added scons command line argument without-fspscan=yes for building diff --git a/INSTALL b/INSTALL index ae86a98..e5a81cd 100644 --- a/INSTALL +++ b/INSTALL @@ -56,11 +56,12 @@ SCons command line options: sysconfdir=directory where to look for fspd and client configuration files. Default prefix/etc docdir=directory where to put documentation. - Default prefix/share/doc/fsp + Default prefix/share/doc/fsp examplesdir=directory where to install examples Default is docdir/examples - without-clients=yes dont build and install client commands - without-fspscan=yes dont build and install fspcan command + without-clients=yes dont build and install client commands + without-fspscan=yes dont build and install fspcan command + without-server=yes don't build fspd server dsssl=directory Look for DocBook DSSSL Stylesheets there Client utilities: diff --git a/SConscript b/SConscript index 9316dee..d275054 100644 --- a/SConscript +++ b/SConscript @@ -4,7 +4,8 @@ env.Install(dir=DOCDIR,source=Split("""BETA.README COPYRIGHT ChangeLog FILES INFO INSTALL MACHINES TODO """)) -env.Install(dir=EXAMPLESDIR,source="fspd.conf") +if SERVER: + env.Install(dir=EXAMPLESDIR,source="fspd.conf") if CLIENTS: env.Install(dir=EXAMPLESDIR,source=Split("setup.sh setup.csh")) env.Alias("install", EXAMPLESDIR) diff --git a/SConstruct b/SConstruct index a0b318b..3b9e221 100644 --- a/SConstruct +++ b/SConstruct @@ -59,6 +59,7 @@ from docdir import checkForUserDocdir from mandir import autodetectMandir from examplesdir import checkForUserExamplesdir from clients import checkForBuildingClients +from server import checkForBuildingServer from fspscan import checkForBuildingFspscan from sysconfdir import checkForUserSysconfdir from largefiles import enableLargeFiles @@ -66,7 +67,7 @@ from jade import checkDSSSLProcessor from dsssl import findDocbookStylesheets conf = Configure(env,{'checkForCCOption':checkForCCOption, - 'MAINTAINER_MODE':checkForMaintainerMode, + 'MAINTAINER_MODE':checkForMaintainerMode, 'checkForLockPrefix':checkForLockPrefix, 'checkPrefix':checkForUserPrefix, 'checkForLockingType':checkForLockingType, @@ -80,6 +81,7 @@ conf = Configure(env,{'checkForCCOption':checkForCCOption, 'autodetectMandir':autodetectMandir, 'checkForUserSysconfdir':checkForUserSysconfdir, 'checkForBuildingClients':checkForBuildingClients, + 'checkForBuildingServer':checkForBuildingServer, 'checkForBuildingFspscan':checkForBuildingFspscan, 'checkDSSSLProcessor':checkDSSSLProcessor, 'findDocbookStylesheets':findDocbookStylesheets @@ -160,11 +162,12 @@ if EFENCE == True: EFENCE=conf.CheckLib("efence","EF_Abort") conf.checkForLamerPack() CLIENTS=conf.checkForBuildingClients() +SERVER=conf.checkForBuildingServer() FSPSCAN=conf.checkForBuildingFspscan() conf.checkForClientTimeout() conf.Finish() env.Append(CPPFLAGS = "-DPACKAGE_VERSION=\\\""+VERSION+"\\\"") # process build rules -Export( Split("env PREFIX MANDIR DOCDIR EXAMPLESDIR CLIENTS FSPSCAN JADE DSSSL")) +Export( Split("env PREFIX MANDIR DOCDIR EXAMPLESDIR CLIENTS SERVER FSPSCAN JADE DSSSL")) env.SConscript(dirs=Split("doc . bsd_src common server client clients contrib tests man")) diff --git a/server/SConscript b/server/SConscript index 8a400d6..46a0df3 100644 --- a/server/SConscript +++ b/server/SConscript @@ -1,9 +1,9 @@ -Import(Split("env PREFIX common bsdfsp")) +Import(Split("env PREFIX common bsdfsp SERVER")) -fspd=env.Program(target = 'fspd', source = Split(''' +if SERVER: + fspd=env.Program(target = 'fspd', source = Split(''' acl.c file.c info.c main.c random.c conf.c filecache.c iprange.c path.c server.c fifocache.c host.c log.c pidfile.c ''') + common + bsdfsp) - -env.Install(dir = PREFIX+'/bin', source = fspd) + env.Install(dir = PREFIX+'/bin', source = fspd) diff --git a/site_scons/server.py b/site_scons/server.py new file mode 100644 index 0000000..d1f0679 --- /dev/null +++ b/site_scons/server.py @@ -0,0 +1,23 @@ +# +# SCons client commands build tester +# +# Version 1.0 +# 03-Jun-2020 +# + +from SCons.Script import ARGUMENTS + +def checkForBuildingServer(conf): + """Check command line arguments if user requested to not build server.""" + conf.Message("Checking if we are building client commands... ") + buildlamer=ARGUMENTS.get('without-server', 0) + try: + buildlamer2=int(buildlamer) + except ValueError: + buildlamer2=None + if buildlamer2 == 1 or str(buildlamer).lower() == 'yes': + conf.Result(0) + return False + else: + conf.Result(1) + return True