new tag AX_BUILD_HTML_NPM

master
Marc Wäckerlin 8 years ago
parent c82bf7fba5
commit 8c6cc34bbf
  1. 6
      scripts/ax_init_standard_project.m4
  2. 64
      scripts/bootstrap.sh

@ -500,6 +500,12 @@ maintainer-clean-html-targets:
EOF EOF
]) ])
# use this in configure.ac to support HTML data for webservers
AC_DEFUN([AX_BUILD_HTML_NPM], [
AC_CONFIG_FILES([html/package.json])
AX_BUILD_HTML
])
# use this in configure.ac to support C++ libraries # use this in configure.ac to support C++ libraries
AC_DEFUN([AX_USE_LIBTOOL], [ AC_DEFUN([AX_USE_LIBTOOL], [
# libtool versioning # libtool versioning

@ -148,7 +148,8 @@ GENERATED FILES
* src/version.hxx - if you enabled AX_USE_CXX * src/version.hxx - if you enabled AX_USE_CXX
* src/version.cxx - if you enabled AX_USE_CXX * src/version.cxx - if you enabled AX_USE_CXX
* etc/makefile.am - if you enable AX_USE_ETC * etc/makefile.am - if you enable AX_USE_ETC
* html/makefile.am - if you enabled AX_BUILD_HTML * html/makefile.am - if you enabled AX_BUILD_HTML or AX_BUILD_HTML_NPM
* html/package.json.in - if you enabled AX_BUILD_HTML_NPM
* scripts/makefile.am - if you enabled AX_USE_SCRIPTS * scripts/makefile.am - if you enabled AX_USE_SCRIPTS
* nodejs/makefile.am - if you add AX_USE_NODEJS * nodejs/makefile.am - if you add AX_USE_NODEJS
* nodejs/${DEFAULT_PROJECT_NAME}.js - if you add AX_USE_NODEJS * nodejs/${DEFAULT_PROJECT_NAME}.js - if you add AX_USE_NODEJS
@ -223,7 +224,7 @@ FILE DEPENDENCIES
configuration a dependent, i.e.: configuration a dependent, i.e.:
* test/makefile.am depends on AX_USE_LIBTOOL * test/makefile.am depends on AX_USE_LIBTOOL
* html/makefile.am depends on AX_BUILD_HTML * html/makefile.am depends on AX_BUILD_HTML or AX_BUILD_HTML_NPM
* doc/doxyfile.in depends on AX_BUILD_EXAMPLES * doc/doxyfile.in depends on AX_BUILD_EXAMPLES
* debian/control.in depends on AX_USE_DOXYGEN, AX_USE_PERLDOC, * debian/control.in depends on AX_USE_DOXYGEN, AX_USE_PERLDOC,
AX_USE_CPPUNIT AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL AX_USE_CPPUNIT AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL
@ -583,6 +584,7 @@ AX_INIT_STANDARD_PROJECT
#AX_BUILD_TEST #AX_BUILD_TEST
#AX_BUILD_EXAMPLES #AX_BUILD_EXAMPLES
#AX_BUILD_HTML #AX_BUILD_HTML
#AX_BUILD_HTML_NPM
# qt features, uncomment, what you need: # qt features, uncomment, what you need:
#AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets]) #AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets])
@ -1081,7 +1083,9 @@ to --condition AX_USE_NODEJS nodejs/etc/systemd/system/${PACKAGE_NAME}.service <
Description=$(head -1 README) Description=$(head -1 README)
[Service] [Service]
ExecStart=/usr/bin/nodejs /usr/share/${PACKAGE_NAME}/nodejs/${PACKAGE_NAME} > /var/log/${PACKAGE_NAME}.log ExecStart=/usr/bin/nodejs /usr/share/${PACKAGE_NAME}/nodejs/${PACKAGE_NAME}
StandardOutput=journal
StandardError=journal
Restart=on-abort Restart=on-abort
[Install] [Install]
@ -1280,11 +1284,59 @@ LDADD = -l${PACKAGE_NAME#lib}
MAINTAINERCLEANFILES = makefile.in MAINTAINERCLEANFILES = makefile.in
EOF EOF
to --condition AX_BUILD_HTML html/makefile.am <<EOF to --condition AX_BUILD_HTML_NPM html/package.json.in <<EOF
${HEADER}EXTRA_DIST = \${www_DATA} {
"name": "@PACKAGE_NAME@",
"version": "@PACKAGE_VERSION@",
"private": true,
"dependencies": {
},
"description": "@DESCRIPTION@",
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "@AUTHOR@",
"license": "@LICENSE@",
"path": {
"prefix": "@PREFIX@",
"sysconf": "@SYSCONFDIR@",
"pkgdata": "@PKGDATADIR@",
"localstate": "@LOCALSTATEDIR@",
"log": "@LOCALSTATEDIR@/log/@PACKAGE_NAME@.log",
"config": "@SYSCONFDIR@/@PACKAGE_NAME@.json",
"nodejs": "@PKGDATADIR@/nodejs"
}
}
EOF
to --condition 'AX_BUILD_HTML|AX_BUILD_HTML_NPM' html/makefile.am <<EOF
${HEADER}EXTRA_DIST = $(testtag AX_BUILD_HTML_NPM && echo "package.json.in")
wwwdir = \${pkgdatadir}/html wwwdir = \${pkgdatadir}/html
www_DATA = www_DATA = $(testtag AX_BUILD_HTML_NPM && echo "package.json")
dist_www_DATA =
$(if testtag AX_BUILD_HTML_NPM; then
cat<<EOF2
all: node_modules
node_modules: package.json.in
HOME=. npm install
clean-local:
-rm -r node_modules .npm
install-data-hook:
test -d \$(DESTDIR)\${wwwdir} || mkdir -p \$(DESTDIR)\${wwwdir}
chmod -R u+w \$(DESTDIR)\${wwwdir}
cp -r . \$(DESTDIR)\${wwwdir}
uninstall-local:
-chmod -R u+w \$(DESTDIR)\${wwwdir}
-rm -rf \$(DESTDIR)\${wwwdir}
EOF2
fi)
MAINTAINERCLEANFILES = makefile.in MAINTAINERCLEANFILES = makefile.in
EOF EOF

Loading…
Cancel
Save