diff --git a/Makefile b/Makefile index ef1bed5..b0bcc58 100644 --- a/Makefile +++ b/Makefile @@ -1 +1,9 @@ include ../../PluginsMakefile.mk + +install-ext: ## Install PHP extensions required by this plugin (sqlsrv). Re-run after any container rebuild. + $(COMPOSE) exec --user root app bash -c "\ + apt-get update -yq \ + && apt-get install -yq --no-install-recommends unixodbc-dev \ + && rm -rf /var/lib/apt/lists/* \ + && pecl install sqlsrv \ + && docker-php-ext-enable sqlsrv" diff --git a/README.md b/README.md index f6fefa3..42f7d15 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,18 @@ Plugin to synchronize computers from SCCM (version 1802) to GLPI. ![GLPISCCMPluginSchema](screenshots/schema.png "GLPISCCMPluginSchema") +## Development setup + +This plugin requires the `sqlsrv` PHP extension (PECL), which is not included in the base GLPI development image. + +After starting the containers (`make` from the GLPI root), install it once: + +```bash +make install-ext +``` + +Re-run this command after any container rebuild. + ## Documentation We maintain a detailed documentation here -> [Documentation](https://glpi-plugins.readthedocs.io/en/latest/sccm/index.html)