diff --git a/README.md b/README.md index eedd558..afa01ba 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,33 @@ -Icinga Web 2 - IPL -================== +# Icinga PHP Library - IPL -This module ships the new Icinga PHP library. Please download the latest -release and install it like any other module. +This project bundles all Icinga PHP libraries into one piece and can be integrated as library into Icinga Web 2. -> **HINT**: Do NOT install the GIT master, it will not work! Checking out a -> branch like `stable/0.5.0` or a tag like `v0.5.0` is fine. +## Installation -Sample Tarball installation ---------------------------- +Please download the latest release and install it in one of your configured library paths. The default library +path for Icinga Web 2 installations is: `/usr/share/php-Icinga` + +Download or clone this repository there (e.g. `/usr/share/php-Icinga/ipl`) and you're done. + +> **Note**: Do NOT install the GIT master, it will not work! Checking out a +> branch like `stable/1.0.0` or a tag like `v1.0.0` is fine. + +### Examples + +**Sample Tarball installation** ```sh -MODULE_NAME=ipl -MODULE_VERSION=v0.5.0 -MODULES_PATH="/usr/share/icingaweb2/modules" -MODULE_PATH="${MODULES_PATH}/${MODULE_NAME}" -RELEASES="https://github.com/Icinga/icingaweb2-module-${MODULE_NAME}/archive" -mkdir "$MODULE_PATH" \ -&& wget -q $RELEASES/${MODULE_VERSION}.tar.gz -O - \ - | tar xfz - -C "$MODULE_PATH" --strip-components 1 -icingacli module enable "${MODULE_NAME}" +INSTALL_PATH="/usr/share/php-Icinga/ipl" +INSTALL_VERSION="v1.0.0" +mkdir "$INSTALL_PATH" +&& wget -q "https://github.com/Icinga/ipl/archive/$INSTALL_VERSION.tar.gz" -O - \ + | tar xfz - -C "$INSTALL_PATH" --strip-components 1 ``` -Sample GIT installation ------------------------ +**Sample GIT installation** -```sh -MODULE_NAME=ipl -MODULE_VERSION=v0.5.0 -REPO="https://github.com/Icinga/icingaweb2-module-${MODULE_NAME}" -MODULES_PATH="/usr/share/icingaweb2/modules" -git clone ${REPO} "${MODULES_PATH}/${MODULE_NAME}" --branch "${MODULE_VERSION}" -icingacli module enable "${MODULE_NAME}" ``` - -Developer Documentation ------------------------ - -### Add a new dependency - - composer require author/library:version - -### Create a new release - - ./bin/make-release.sh - -e.g. - - ./bin/make-release.sh 0.6.0 +INSTALL_PATH="/usr/share/php-Icinga/ipl" +INSTALL_VERSION="stable/1.0.0" +git clone https://github.com/Icinga/ipl.git "$INSTALL_PATH" --branch "$INSTALL_VERSION" +``` diff --git a/bin/make-release.sh b/bin/make-release.sh index 646576d..823600e 100755 --- a/bin/make-release.sh +++ b/bin/make-release.sh @@ -37,8 +37,8 @@ find vendor/ -type f -name "*.php" \ find vendor/ -type f -name LICENSE | xargs -L1 git add -f find vendor/ -type f -name '*.json' | xargs -L1 git add -f find vendor -type f -path 'vendor/*/asset/*' | xargs -L1 git add -f -sed -i.bak "s/^Version:.*/Version: v$VERSION/" module.info && rm -f module.info.bak -git add module.info +echo "v$VERSION" > VERSION +git add VERSION git add composer.lock -f git commit -m "Version v$VERSION" diff --git a/composer.json b/composer.json index 644116a..f57d3b1 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { - "name": "icinga/icingaweb2-module-ipl", + "name": "icinga/ipl", "type": "project", - "description": "Icinga Web 2 - bundled ipl libraries", - "homepage": "https://github.com/Icinga/icingaweb2-module-ipl", + "description": "Icinga Web 2 - bundled Icinga PHP libraries", + "homepage": "https://github.com/Icinga/ipl", "license": "MIT", "config": { "sort-packages": true, @@ -12,7 +12,6 @@ }, "require": { "php": ">=5.6.0", - "guzzlehttp/psr7": "^1.5", "ipl/html": ">=0.3.0", "ipl/orm": ">=0.1.0", "ipl/sql": ">=0.1.0", diff --git a/module.info b/module.info deleted file mode 100644 index 93cc497..0000000 --- a/module.info +++ /dev/null @@ -1,5 +0,0 @@ -Name: IPL Bundle -Version: dev-master -Description: The Icinga PHP library - This repository ships libraries useful for Icinga Web 2 modules. Please download - the latest release and install it like any other module. diff --git a/run.php b/run.php deleted file mode 100644 index cdc28bc..0000000 --- a/run.php +++ /dev/null @@ -1,3 +0,0 @@ -addError( - 'ipl.master', - time(), - 'Please install a Release version of the IPL module, not the GIT master' - ); - } - } - - $this->provideHook('ApplicationState', '\\Icinga\\Module\\Ipl\\ApplicationState'); -}