* Replaced CLIXON_DATADIR with two configurable options defining where Clixon installs Yang files.
* use `--with-yang-installdir=DIR` to install Clixon yang files in DIR * use `--with-std-yang-installdir=DIR` to install standard yang files that Clixon may use in DIR * Default is (as before) `/usr/local/share/clixon`
This commit is contained in:
parent
934bc42c91
commit
88b0db3e95
5 changed files with 75 additions and 26 deletions
|
|
@ -69,6 +69,10 @@
|
||||||
|
|
||||||
### API changes on existing features (you may need to change your code)
|
### API changes on existing features (you may need to change your code)
|
||||||
|
|
||||||
|
* Replaced `CLIXON_DATADIR` with two configurable options defining where Clixon installs Yang files.
|
||||||
|
* use `--with-yang-installdir=DIR` to install Clixon yang files in DIR
|
||||||
|
* use `--with-std-yang-installdir=DIR` to install standard yang files that Clixon may use in DIR
|
||||||
|
* Default is (as before) `/usr/local/share/clixon`
|
||||||
* New clixon-config@2019-06-05.yang revision
|
* New clixon-config@2019-06-05.yang revision
|
||||||
* Added: `CLICON_YANG_REGEXP, CLICON_CLI_TAB_MODE, CLICON_CLI_HIST_FILE, CLICON_CLI_HIST_SIZE, CLICON_XML_CHANGELOG, CLICON_XML_CHANGELOG_FILE`.
|
* Added: `CLICON_YANG_REGEXP, CLICON_CLI_TAB_MODE, CLICON_CLI_HIST_FILE, CLICON_CLI_HIST_SIZE, CLICON_XML_CHANGELOG, CLICON_XML_CHANGELOG_FILE`.
|
||||||
* Renamed: `CLICON_XMLDB_CACHE` to `CLICON_DATASTORE_CACHE` and type changed.
|
* Renamed: `CLICON_XMLDB_CACHE` to `CLICON_DATASTORE_CACHE` and type changed.
|
||||||
|
|
|
||||||
47
configure
vendored
47
configure
vendored
|
|
@ -621,7 +621,8 @@ ac_includes_default="\
|
||||||
|
|
||||||
ac_subst_vars='LTLIBOBJS
|
ac_subst_vars='LTLIBOBJS
|
||||||
LIBOBJS
|
LIBOBJS
|
||||||
CLIXON_DATADIR
|
STD_YANG_INSTALLDIR
|
||||||
|
YANG_INSTALLDIR
|
||||||
EGREP
|
EGREP
|
||||||
GREP
|
GREP
|
||||||
LEXLIB
|
LEXLIB
|
||||||
|
|
@ -637,7 +638,6 @@ wwwuser
|
||||||
wwwdir
|
wwwdir
|
||||||
enable_stdyangs
|
enable_stdyangs
|
||||||
with_restconf
|
with_restconf
|
||||||
RANLIB
|
|
||||||
SH_SUFFIX
|
SH_SUFFIX
|
||||||
CLIXON_DEFAULT_CONFIG
|
CLIXON_DEFAULT_CONFIG
|
||||||
INSTALLFLAGS
|
INSTALLFLAGS
|
||||||
|
|
@ -718,6 +718,8 @@ with_restconf
|
||||||
with_wwwuser
|
with_wwwuser
|
||||||
with_configfile
|
with_configfile
|
||||||
with_libxml2
|
with_libxml2
|
||||||
|
with_yang_installdir
|
||||||
|
with_std_yang_installdir
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
host_alias
|
host_alias
|
||||||
|
|
@ -1367,6 +1369,8 @@ Optional Packages:
|
||||||
--with-wwwuser=<user> Set www user different from www-data
|
--with-wwwuser=<user> Set www user different from www-data
|
||||||
--with-configfile=FILE set default path to config file
|
--with-configfile=FILE set default path to config file
|
||||||
--with-libxml2 use gnome/libxml2 regex engine
|
--with-libxml2 use gnome/libxml2 regex engine
|
||||||
|
--with-yang-installdir=DIR Install Clixon yang files here (default: ${prefix}/share/clixon)
|
||||||
|
--with-std-yang-installdir=DIR Install standard yang files here (default: ${prefix}/share/clixon)
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
CC C compiler command
|
CC C compiler command
|
||||||
|
|
@ -2463,7 +2467,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# If yes, compile apps/restconf
|
# If yes, compile apps/restconf
|
||||||
|
|
||||||
wwwdir=/www-data
|
wwwdir=/www-data
|
||||||
|
|
@ -4493,13 +4496,39 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# CLIXON_DATADIR is where clixon installs the "system" yang files in yang/Makfile
|
# YANG_INSTALLDIR is where clixon installs the Clixon yang files
|
||||||
# This directory should most probably be included in each application,
|
# (the files in in yang/clixon)
|
||||||
# so each application designer may need to place CLIXON_DATADIR in their config
|
# Each application designer may need to place CLIXON_YANG_DIR in their config:
|
||||||
# (last in yang dir list):
|
# <CLIXON-YANG-DIR>$YANG_INSTALLDIR</CLIXON-YANG_DIR>
|
||||||
# <CLIXON-YANG-DIR>$CLIXON_DATADIR</CLIXON-YANG_DIR>
|
|
||||||
|
|
||||||
CLIXON_DATADIR="${prefix}/share/clixon"
|
# Check whether --with-yang-installdir was given.
|
||||||
|
if test "${with_yang_installdir+set}" = set; then :
|
||||||
|
withval=$with_yang_installdir; YANG_INSTALLDIR="$withval"
|
||||||
|
else
|
||||||
|
YANG_INSTALLDIR="${prefix}/share/clixon"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Clixon yang files are installed in ${YANG_INSTALLDIR}" >&5
|
||||||
|
$as_echo "Clixon yang files are installed in ${YANG_INSTALLDIR}" >&6; }
|
||||||
|
|
||||||
|
# STD_YANG_INSTALLDIR is where clixon installs standard yang files
|
||||||
|
# (the files in in yang/standard)
|
||||||
|
# that Clixon needs to run (or examples rely on). These may be retreived from
|
||||||
|
# elsewhere (eg yangmodels repo)
|
||||||
|
|
||||||
|
# Check whether --with-std-yang-installdir was given.
|
||||||
|
if test "${with_std_yang_installdir+set}" = set; then :
|
||||||
|
withval=$with_std_yang_installdir; STD_YANG_INSTALLDIR="$withval"
|
||||||
|
else
|
||||||
|
STD_YANG_INSTALLDIR="${prefix}/share/clixon"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Standard yang files are installed in ${STD_YANG_INSTALLDIR}" >&5
|
||||||
|
$as_echo "Standard yang files are installed in ${STD_YANG_INSTALLDIR}" >&6; }
|
||||||
|
|
||||||
# Default location for config file
|
# Default location for config file
|
||||||
|
|
||||||
|
|
|
||||||
31
configure.ac
31
configure.ac
|
|
@ -89,7 +89,6 @@ AC_SUBST(INSTALLFLAGS)
|
||||||
AC_SUBST(CLIXON_DEFAULT_CONFIG)
|
AC_SUBST(CLIXON_DEFAULT_CONFIG)
|
||||||
AC_SUBST(LIBS)
|
AC_SUBST(LIBS)
|
||||||
AC_SUBST(SH_SUFFIX)
|
AC_SUBST(SH_SUFFIX)
|
||||||
AC_SUBST(RANLIB)
|
|
||||||
AC_SUBST(with_restconf) # If yes, compile apps/restconf
|
AC_SUBST(with_restconf) # If yes, compile apps/restconf
|
||||||
AC_SUBST(enable_stdyangs)
|
AC_SUBST(enable_stdyangs)
|
||||||
AC_SUBST(wwwdir,/www-data)
|
AC_SUBST(wwwdir,/www-data)
|
||||||
|
|
@ -232,13 +231,29 @@ fi
|
||||||
#
|
#
|
||||||
AC_CHECK_FUNCS(inet_aton sigaction sigvec strlcpy strsep strndup alphasort versionsort)
|
AC_CHECK_FUNCS(inet_aton sigaction sigvec strlcpy strsep strndup alphasort versionsort)
|
||||||
|
|
||||||
# CLIXON_DATADIR is where clixon installs the "system" yang files in yang/Makfile
|
# YANG_INSTALLDIR is where clixon installs the Clixon yang files
|
||||||
# This directory should most probably be included in each application,
|
# (the files in in yang/clixon)
|
||||||
# so each application designer may need to place CLIXON_DATADIR in their config
|
# Each application designer may need to place CLIXON_YANG_DIR in their config:
|
||||||
# (last in yang dir list):
|
# <CLIXON-YANG-DIR>$YANG_INSTALLDIR</CLIXON-YANG_DIR>
|
||||||
# <CLIXON-YANG-DIR>$CLIXON_DATADIR</CLIXON-YANG_DIR>
|
AC_ARG_WITH(yang-installdir,
|
||||||
AC_SUBST(CLIXON_DATADIR)
|
[ --with-yang-installdir=DIR Install Clixon yang files here (default: ${prefix}/share/clixon) ],
|
||||||
CLIXON_DATADIR="${prefix}/share/clixon"
|
[YANG_INSTALLDIR="$withval"],
|
||||||
|
[YANG_INSTALLDIR="${prefix}/share/clixon"]
|
||||||
|
)
|
||||||
|
AC_SUBST(YANG_INSTALLDIR)
|
||||||
|
AC_MSG_RESULT(Clixon yang files are installed in ${YANG_INSTALLDIR})
|
||||||
|
|
||||||
|
# STD_YANG_INSTALLDIR is where clixon installs standard yang files
|
||||||
|
# (the files in in yang/standard)
|
||||||
|
# that Clixon needs to run (or examples rely on). These may be retreived from
|
||||||
|
# elsewhere (eg yangmodels repo)
|
||||||
|
AC_ARG_WITH(std-yang-installdir,
|
||||||
|
[ --with-std-yang-installdir=DIR Install standard yang files here (default: ${prefix}/share/clixon) ],
|
||||||
|
[STD_YANG_INSTALLDIR="$withval"],
|
||||||
|
[STD_YANG_INSTALLDIR="${prefix}/share/clixon"]
|
||||||
|
)
|
||||||
|
AC_SUBST(STD_YANG_INSTALLDIR)
|
||||||
|
AC_MSG_RESULT(Standard yang files are installed in ${STD_YANG_INSTALLDIR})
|
||||||
|
|
||||||
# Default location for config file
|
# Default location for config file
|
||||||
AC_DEFINE_UNQUOTED(CLIXON_DEFAULT_CONFIG,"${CLIXON_DEFAULT_CONFIG}",[Location for apps to find default config file])
|
AC_DEFINE_UNQUOTED(CLIXON_DEFAULT_CONFIG,"${CLIXON_DEFAULT_CONFIG}",[Location for apps to find default config file])
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,8 @@ bindir = @bindir@
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
|
|
||||||
CLIXON_DATADIR = @CLIXON_DATADIR@
|
# See also STD_YANG_INSTALLDIR for the standard yang files
|
||||||
|
YANG_INSTALLDIR = @YANG_INSTALLDIR@
|
||||||
|
|
||||||
YANGSPECS = clixon-config@2019-06-05.yang
|
YANGSPECS = clixon-config@2019-06-05.yang
|
||||||
YANGSPECS += clixon-lib@2019-06-05.yang
|
YANGSPECS += clixon-lib@2019-06-05.yang
|
||||||
|
|
@ -55,11 +56,11 @@ distclean: clean
|
||||||
rm -f Makefile *~ .depend
|
rm -f Makefile *~ .depend
|
||||||
|
|
||||||
install: $(YANGSPECS)
|
install: $(YANGSPECS)
|
||||||
install -d -m 0755 $(DESTDIR)$(CLIXON_DATADIR)
|
install -d -m 0755 $(DESTDIR)$(YANG_INSTALLDIR)
|
||||||
install -m 0644 $(YANGSPECS) $(DESTDIR)$(CLIXON_DATADIR)
|
install -m 0644 $(YANGSPECS) $(DESTDIR)$(YANG_INSTALLDIR)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
(cd $(DESTDIR)$(CLIXON_DATADIR); rm -rf *.yang)
|
(cd $(DESTDIR)$(YANG_INSTALLDIR); rm -rf *.yang)
|
||||||
|
|
||||||
install-include:
|
install-include:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ bindir = @bindir@
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
|
|
||||||
# Could place them in separate standards dir?
|
# See also YANG_INSTALLDIR for the clixon-specific yang files
|
||||||
CLIXON_DATADIR = @CLIXON_DATADIR@
|
STD_YANG_INSTALLDIR = @STD_YANG_INSTALLDIR@
|
||||||
|
|
||||||
YANGSPECS = iana-if-type@2014-05-08.yang
|
YANGSPECS = iana-if-type@2014-05-08.yang
|
||||||
YANGSPECS += ietf-interfaces@2018-02-20.yang
|
YANGSPECS += ietf-interfaces@2018-02-20.yang
|
||||||
|
|
@ -61,11 +61,11 @@ distclean: clean
|
||||||
rm -f Makefile *~ .depend
|
rm -f Makefile *~ .depend
|
||||||
|
|
||||||
install: $(YANGSPECS)
|
install: $(YANGSPECS)
|
||||||
install -d -m 0755 $(DESTDIR)$(CLIXON_DATADIR)
|
install -d -m 0755 $(DESTDIR)$(STD_YANG_INSTALLDIR)
|
||||||
install -m 0644 $(YANGSPECS) $(DESTDIR)$(CLIXON_DATADIR)
|
install -m 0644 $(YANGSPECS) $(DESTDIR)$(STD_YANG_INSTALLDIR)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
(cd $(DESTDIR)$(CLIXON_DATADIR); rm -rf *.yang)
|
(cd $(DESTDIR)$(STD_YANG_INSTALLDIR); rm -rf *.yang)
|
||||||
|
|
||||||
install-include:
|
install-include:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue