diff options
author | Remi Collet <fedora@famillecollet.com> | 2012-06-13 20:26:29 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2012-06-13 20:26:29 +0200 |
commit | eafa7ae6893a41b9d0516eaac2b652c30e3e2988 (patch) | |
tree | cf83a8b9959c3bf5a857547b3862553134c3b0ac |
reorg repo
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | glpi-loadentity.spec | 131 |
2 files changed, 135 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1e65467 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../common/Makefile + diff --git a/glpi-loadentity.spec b/glpi-loadentity.spec new file mode 100644 index 0000000..481d925 --- /dev/null +++ b/glpi-loadentity.spec @@ -0,0 +1,131 @@ +%global pluginname loadentity +#global svnrelease 57 + +Name: glpi-loadentity +Version: 1.3.0 +%if 0%{?svnrelease} +Release: 0.1.svn%{svnrelease}%{?dist} +%else +Release: 1%{?dist} +%endif +Summary: GLPI Plugin for entity import +Summary(fr): Extension GLPI d'import d'une entité + +Group: Applications/Internet +License: GPLv2+ +URL: https://forge.indepnet.net/projects/loadentity + +%if 0%{?svnrelease} +# svn export -r 57 https://forge.indepnet.net/svn/loadentity/trunk loadentity +# tar czf glpi-loadentity-1.2.0-57.tar.gz loadentity +Source0: glpi-loadentity-%{version}-%{svnrelease}.tar.gz +%else +Source0: https://forge.indepnet.net/attachments/download/1112/glpi-loadentity-1.3.0.tar.gz +%endif + + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch + +Requires: glpi >= 0.83 +Requires: glpi < 0.84 +Requires: %{_sysconfdir}/cron.d + +%description +Plugin which allow to export data from a entity to CSV. + +Designed to work with serveur using dumpentity. + +%description -l fr +Extension permettant de réaliser une importation des données +d'une entité en CSV. + +Conçue pour fonctionner avec un serveur utilisant dumpentity. + +%prep +%setup -q -c + +cat >cron <<EOF +# GLPI loadentity extension. +# Change time to avoid bottleneck on server +# and uncomment to enable +# 0 6 * * * apache php -q -f %{_datadir}/glpi/plugins/%{pluginname}/scripts/run.php +EOF + +cat >httpd <<EOF +<Directory /usr/share/glpi/plugins/%{pluginname}/scripts> + <IfModule mod_authz_core.c> + Require all denied + </IfModule> + <IfModule !mod_authz_core.c> + Order Allow,Deny + Deny from all + </IfModule> +</Directory> +EOF + +# dos2unix to avoid rpmlint warnings +for doc in %{pluginname}/docs/* ; do + sed -i -e 's/\r//' $doc +done +mv %{pluginname}/docs docs + + +%build +# empty build + +%install +rm -rf %{buildroot} + +mkdir -p %{buildroot}/%{_datadir}/glpi/plugins +cp -ar %{pluginname} %{buildroot}/%{_datadir}/glpi/plugins/%{pluginname} + +mkdir -p %{buildroot}%{_sysconfdir}/cron.d +install --mode 644 cron %{buildroot}%{_sysconfdir}/cron.d/%{name} + +# ===== apache ===== +rm %{buildroot}/%{_datadir}/glpi/plugins/%{pluginname}/scripts/.htaccess +mkdir -p %{buildroot}/%{_sysconfdir}/httpd/conf.d/ +install --mode 644 httpd %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf + + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc docs/* %{pluginname}/LICENSE +%config(noreplace) %{_sysconfdir}/cron.d/%{name} +%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf +%{_datadir}/glpi/plugins/%{pluginname} + +%changelog +* Fri Apr 06 2012 Remi Collet <Fedora@FamilleCollet.com> - 1.3.0-1 +- version 1.3.0 for GLPI 0.83 + https://forge.indepnet.net/projects/loadentity/versions/653 + +* Tue Oct 12 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.2.0-1 +- version 1.2.0 and GLPI 0.78 released + +* Fri Jun 18 2010 Remi Collet <Fedora@FamilleCollet.com> - 1.2.0-0.1.svn57 +- update to 1.2.0 for glpi 0.78 RC (svn snapshot) + +* Mon Jul 20 2009 Remi Collet <RPMS@FamilleCollet.com> - 1.0.0-1 +- update to 1.0.0 for glpi 0.72 + +* Sat Jul 12 2008 Remi Collet <RPMS@FamilleCollet.com> - 0.2-1 +- update to 0.2 for glpi 0.71 + +* Sun Nov 11 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.1-0.20071111 +- new SVN snapshot + +* Wed Oct 24 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.1-0.20071024 +- new SVN snapshot + +* Sun Oct 21 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.1-0.20071021 +- update from SVN +- add apache conf + +* Sat Oct 20 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.1-0.20071020 +- Initial RPM + |