From a8fc81287595250edcd18503ea2319d0c1ff6863 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 2 Oct 2013 18:30:54 +0200 Subject: glpi-ocsinventoryng: 1.0.2 - New Package --- Makefile | 4 + glpi-ocsinventoryng-httpd.conf | 10 +++ glpi-ocsinventoryng-lock.patch | 33 ++++++++ glpi-ocsinventoryng.spec | 168 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 215 insertions(+) create mode 100644 Makefile create mode 100644 glpi-ocsinventoryng-httpd.conf create mode 100644 glpi-ocsinventoryng-lock.patch create mode 100644 glpi-ocsinventoryng.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91b0fd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../common/Makefile + diff --git a/glpi-ocsinventoryng-httpd.conf b/glpi-ocsinventoryng-httpd.conf new file mode 100644 index 0000000..1ffd374 --- /dev/null +++ b/glpi-ocsinventoryng-httpd.conf @@ -0,0 +1,10 @@ + + Order Allow,Deny + Deny from all + + + + Order Allow,Deny + Deny from all + + diff --git a/glpi-ocsinventoryng-lock.patch b/glpi-ocsinventoryng-lock.patch new file mode 100644 index 0000000..ac3f491 --- /dev/null +++ b/glpi-ocsinventoryng-lock.patch @@ -0,0 +1,33 @@ +Index: trunk/scripts/ocsng_fullsync.sh +=================================================================== +--- ocsinventoryng/scripts/ocsng_fullsync.sh (revision 331) ++++ ocsinventoryng/scripts/ocsng_fullsync.sh (revision 332) +@@ -31,7 +31,7 @@ + + exit_if_soft_lock() + { +- if [ -f $GLPI_LOCK_DIR/ocsinventory.lock ] ++ if [ -f $GLPI_LOCK_DIR/ocsinventoryng.lock ] + then + echo "Software lock : script can't run !" + exit 1 +Index: trunk/scripts/run.php +=================================================================== +--- ocsinventoryng/scripts/run.php (revision 331) ++++ ocsinventoryng/scripts/run.php (revision 332) +@@ -70,7 +70,7 @@ + + function exit_if_soft_lock() { + +- if (file_exists(GLPI_LOCK_DIR."/massocsimport.lock")) { ++ if (file_exists(GLPI_LOCK_DIR."/ocsinventoryng.lock")) { + echo "Software lock : script can't run !\n"; + exit (1); + } +@@ -204,4 +204,4 @@ + cleanup($pidfile); + fwrite ($log, date("r") . " " . $_SERVER["argv"][0] . " ended\n\n"); + +-?> +\ No newline at end of file ++?> diff --git a/glpi-ocsinventoryng.spec b/glpi-ocsinventoryng.spec new file mode 100644 index 0000000..9073062 --- /dev/null +++ b/glpi-ocsinventoryng.spec @@ -0,0 +1,168 @@ +# spec file for glpi-ocsinventoryng +# +# Copyright (c) 2013 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/3.0/ +# +# Please, preserve the changelog entries +# +%global pluginname ocsinventoryng +%global lockname ocsinventoryng.lock + +Name: glpi-ocsinventoryng +Version: 1.0.2 +Release: 1%{?dist} +Summary: Plugin to synchronize GLPI with OCS Inventory NG + +Group: Applications/Internet +License: GPLv2+ +URL: https://forge.indepnet.net/projects/ocsinventoryng + +Source0: https://forge.indepnet.net/attachments/download/1564/glpi-ocsinventoryng-1.0.2.tar.gz +Source1: %{name}-httpd.conf + +# https://forge.indepnet.net/projects/ocsinventoryng/repository/revisions/332 +Patch0: %{name}-lock.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: gettext + +Requires: glpi >= 0.84 +Requires: glpi < 0.85 +Requires: crontabs +Requires: php-cli +# phpcompatinfo for version 1.0.2 +Requires: php-date +Requires: php-json +Requires: php-pcre + +# Latest version is 1.6.x for GLPI 0.83.x +Obsoletes: glpi-mass-ocs-import < 1.7 +Provides: glpi-mass-ocs-import = 1.7.0 +Provides: glpi-massocsimport = 1.7.0 + + +%description +This plugin allows you to synchronize GLPI inventory with OCS Inventory NG. + +It's intended to replace native mode OCS of GLPI and use the massocsimport +plugin features to provide better compatibility and extensibility with OCS. + + +%prep +%setup -q -c + +%patch0 -p0 + +mv %{pluginname}/docs docs + +# Create link to LICENSE for standard doc folder +ln -s %{_datadir}/glpi/plugins/%{pluginname}/LICENSE docs/LICENSE + +# dos2unix to avoid rpmlint warnings +for doc in docs/* ; do + sed -i -e 's/\r//' $doc +done + +# For developer only +rm -rf %{pluginname}/tools + +# For Windows only +rm %{pluginname}/scripts/run.** + +# Access retricted in apache config +rm ocsinventoryng/scripts/.htaccess \ + ocsinventoryng/install/mysql/.htaccess + +cat < - 1.0.2-1 +- Initial RPM (from glpi-mass-ocs-import.spec) -- cgit