build: add SAMBA_DATADIR as "samba" subdirectory of DATADIR
authorRalph Boehme <slow@samba.org>
Fri, 10 May 2019 16:49:20 +0000 (18:49 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 9 Oct 2019 14:35:28 +0000 (14:35 +0000)
DATADIR should have been set to this path from the beginning, too late to change
that now as ut's used as parent for two other directory varialbles: SETUPDIR and
CODEPAGEDIR.

From <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>:

  datadir

    The directory for installing idiosyncratic read-only
    architecture-independent data files for this program. This is usually the
    same place as ‘datarootdir’, but we use the two separate variables so that
    you can move these program-specific files without altering the location for
    Info files, man pages, etc.

    This should normally be /usr/local/share, but write it as
    $(datarootdir). (If you are using Autoconf, write it as ‘@datadir@’.)

    The definition of ‘datadir’ is the same for all packages, so you should
    install your data in a subdirectory thereof. Most packages install their
    data under $(datadir)/package-name/.

Currently Samba doesn't install any application specific data files, but I'm
going to do just that in a subsequent commit.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
buildtools/wafsamba/samba_patterns.py
docs-xml/smbdotconf/generate-file-list.sh
dynconfig/dynconfig.c
dynconfig/dynconfig.h
dynconfig/wscript

index d0fe965c730f374817bcc9d7a04e0c7c7c50a946..43422a71f99595f4aca48404cbc033191609b890 100644 (file)
@@ -101,6 +101,8 @@ def write_build_options_header(fp):
     fp.write("       output(screen,\"   LOGFILEBASE: %s\\n\", get_dyn_LOGFILEBASE());\n")
     fp.write("       output(screen,\"   LMHOSTSFILE: %s\\n\",get_dyn_LMHOSTSFILE());\n")
     fp.write("       output(screen,\"   LIBDIR: %s\\n\",get_dyn_LIBDIR());\n")
+    fp.write("       output(screen,\"   DATADIR: %s\\n\",get_dyn_DATADIR());\n")
+    fp.write("       output(screen,\"   SAMBA_DATADIR: %s\\n\",get_dyn_SAMBA_DATADIR());\n")
     fp.write("       output(screen,\"   MODULESDIR: %s\\n\",get_dyn_MODULESDIR());\n")
     fp.write("       output(screen,\"   SHLIBEXT: %s\\n\",get_dyn_SHLIBEXT());\n")
     fp.write("       output(screen,\"   LOCKDIR: %s\\n\",get_dyn_LOCKDIR());\n")
index 7ab1b7caf764bb545dedecde81da11da3efce1bc..a86bac5c28951b76d956d50c6fd6ee667227c11f 100755 (executable)
@@ -17,6 +17,7 @@ echo "<!DOCTYPE section [
 <!ENTITY pathconfig.CACHEDIR             '\${prefix}/var/cache'>
 <!ENTITY pathconfig.NTP_SIGND_SOCKET_DIR '\${prefix}/var/lib/ntp_signd'>
 <!ENTITY pathconfig.MITKDCPATH           '\${prefix}/sbin/krb5kdc'>
+<!ENTITY pathconfig.SAMBA_DATADIR        '\${prefix}/var/samba'>
 ]>"
 
 DIR=.
index e70a10f8cfe53544740ba0785200669226898c5a..dd4de16e1d40ffeacdcc0db872fffa89e928c0d2 100644 (file)
@@ -99,6 +99,7 @@ DEFINE_DYN_CONFIG_PARAM(BINDDNS_DIR)
 DEFINE_DYN_CONFIG_PARAM(LOCALEDIR)
 DEFINE_DYN_CONFIG_PARAM(NMBDSOCKETDIR)
 DEFINE_DYN_CONFIG_PARAM(DATADIR)
+DEFINE_DYN_CONFIG_PARAM(SAMBA_DATADIR)
 DEFINE_DYN_CONFIG_PARAM(SETUPDIR)
 DEFINE_DYN_CONFIG_PARAM(WINBINDD_SOCKET_DIR) /* from winbind_struct_protocol.h in s3 autoconf */
 DEFINE_DYN_CONFIG_PARAM(NTP_SIGND_SOCKET_DIR)
index bdab2e8f2422be5651788b18dde9588246792f35..156e63e38acce2e431882069b3c6ddb34d0266e2 100644 (file)
@@ -50,6 +50,7 @@ DEFINE_DYN_CONFIG_PROTO(BINDDNS_DIR)
 DEFINE_DYN_CONFIG_PROTO(LOCALEDIR)
 DEFINE_DYN_CONFIG_PROTO(NMBDSOCKETDIR)
 DEFINE_DYN_CONFIG_PROTO(DATADIR)
+DEFINE_DYN_CONFIG_PROTO(SAMBA_DATADIR)
 DEFINE_DYN_CONFIG_PROTO(SETUPDIR)
 DEFINE_DYN_CONFIG_PROTO(WINBINDD_SOCKET_DIR)
 DEFINE_DYN_CONFIG_PROTO(NTP_SIGND_SOCKET_DIR)
index e352712d284a8fe70219aa0036222325ff620520..5a0ce6d956aceb1018aacd50e61753a59cf09458 100644 (file)
@@ -100,6 +100,11 @@ dynconfig = {
          'FHS-PATH':  '${DATADIR}',
          'OVERWRITE': True,
     },
+    'SAMBA_DATADIR' : {
+         'STD-PATH':  '${DATADIR}/samba',
+         'FHS-PATH':  '${DATADIR}/samba',
+         'OVERWRITE': True,
+    },
     'LOCALEDIR' : {
          'STD-PATH':  '${LOCALEDIR}',
          'FHS-PATH':  '${LOCALEDIR}',