summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--changeset_r322.diff33
-rw-r--r--changeset_r323.diff107
-rw-r--r--changeset_r361.diff20
-rw-r--r--glpi-pdf-dev.spec165
-rw-r--r--glpi-pdf.spec48
6 files changed, 58 insertions, 317 deletions
diff --git a/Makefile b/Makefile
index 1e65467..91b0fd5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
SRCDIR := $(shell pwd)
NAME := $(shell basename $(SRCDIR))
-include ../common/Makefile
+include ../../common/Makefile
diff --git a/changeset_r322.diff b/changeset_r322.diff
deleted file mode 100644
index f8ff15a..0000000
--- a/changeset_r322.diff
+++ /dev/null
@@ -1,33 +0,0 @@
-Index: trunk/inc/common.class.php
-===================================================================
---- trunk/inc/common.class.php (revision 321)
-+++ trunk/inc/common.class.php (revision 322)
-@@ -118,7 +118,7 @@
- **/
- function getTabNameForItem(CommonGLPI $item, $withtemplate=0) {
- global $LANG;
--
-+
- if(!isset($withtemplate) || empty($withtemplate)) {
- return $LANG['plugin_pdf']['title'][1];
- }
-@@ -310,6 +310,7 @@
-
- if (!is_integer($itemtype)
- && $itemtype != 'empty'
-+ && method_exists($itemtype, "displayTabContentForPdf")
- && ($obj = getItemForItemtype($itemtype))) {
- if ($obj->displayTabContentForPdf($this->pdf, $this->obj, $tabnum)) {
- continue;
-Index: trunk/inc/computer.class.php
-===================================================================
---- trunk/inc/computer.class.php (revision 321)
-+++ trunk/inc/computer.class.php (revision 322)
-@@ -44,6 +44,7 @@
-
- $onglets = parent::defineAllTabs($options);
- unset($onglets['OcsLink$1']); // TODO add method to print OCS
-+ unset($onglets['Item_Problem$1']); // TODO add method to print linked Problems
- return $onglets;
- }
-
diff --git a/changeset_r323.diff b/changeset_r323.diff
deleted file mode 100644
index 645b266..0000000
--- a/changeset_r323.diff
+++ /dev/null
@@ -1,107 +0,0 @@
-Index: trunk/inc/monitor.class.php
-===================================================================
---- trunk/inc/monitor.class.php (revision 322)
-+++ trunk/inc/monitor.class.php (revision 323)
-@@ -41,6 +41,14 @@
-
-
-
-+ function defineAllTabs($options=array()) {
-+
-+ $onglets = parent::defineAllTabs($options);
-+ unset($onglets['Item_Problem$1']); // TODO add method to print linked Problems
-+ return $onglets;
-+ }
-+
-+
- static function pdfMain(PluginPdfSimplePDF $pdf, Monitor $item) {
- global $LANG;
-
-Index: trunk/inc/software.class.php
-===================================================================
---- trunk/inc/software.class.php (revision 322)
-+++ trunk/inc/software.class.php (revision 323)
-@@ -104,6 +104,7 @@
-
- $onglets = parent::defineAllTabs($options);
- unset($onglets['Software$1']); // Merge tab can't be exported
-+ unset($onglets['Item_Problem$1']); // TODO add method to print linked Problems
- return $onglets;
- }
-
-Index: trunk/inc/peripheral.class.php
-===================================================================
---- trunk/inc/peripheral.class.php (revision 322)
-+++ trunk/inc/peripheral.class.php (revision 323)
-@@ -40,7 +40,14 @@
- }
-
-
-+ function defineAllTabs($options=array()) {
-
-+ $onglets = parent::defineAllTabs($options);
-+ unset($onglets['Item_Problem$1']); // TODO add method to print linked Problems
-+ return $onglets;
-+ }
-+
-+
- static function pdfMain(PluginPdfSimplePDF $pdf, Peripheral $item) {
- global $LANG;
-
-Index: trunk/inc/networkequipment.class.php
-===================================================================
---- trunk/inc/networkequipment.class.php (revision 322)
-+++ trunk/inc/networkequipment.class.php (revision 323)
-@@ -40,6 +40,14 @@
- }
-
-
-+ function defineAllTabs($options=array()) {
-+
-+ $onglets = parent::defineAllTabs($options);
-+ unset($onglets['Item_Problem$1']); // TODO add method to print linked Problems
-+ return $onglets;
-+ }
-+
-+
- static function pdfMain(PluginPdfSimplePDF $pdf, NetworkEquipment $item) {
- global $LANG;
-
-Index: trunk/inc/phone.class.php
-===================================================================
---- trunk/inc/phone.class.php (revision 322)
-+++ trunk/inc/phone.class.php (revision 323)
-@@ -40,7 +40,14 @@
- }
-
-
-+ function defineAllTabs($options=array()) {
-
-+ $onglets = parent::defineAllTabs($options);
-+ unset($onglets['Item_Problem$1']); // TODO add method to print linked Problems
-+ return $onglets;
-+ }
-+
-+
- static function pdfMain(PluginPdfSimplePDF $pdf, Phone $item) {
- global $LANG;
-
-Index: trunk/inc/printer.class.php
-===================================================================
---- trunk/inc/printer.class.php (revision 322)
-+++ trunk/inc/printer.class.php (revision 323)
-@@ -40,6 +40,14 @@
- }
-
-
-+ function defineAllTabs($options=array()) {
-+
-+ $onglets = parent::defineAllTabs($options);
-+ unset($onglets['Item_Problem$1']); // TODO add method to print linked Problems
-+ return $onglets;
-+ }
-+
-+
- static function pdfMain(PluginPdfSimplePDF $pdf, Printer $printer) {
- global $LANG;
-
diff --git a/changeset_r361.diff b/changeset_r361.diff
new file mode 100644
index 0000000..b7380a2
--- /dev/null
+++ b/changeset_r361.diff
@@ -0,0 +1,20 @@
+Index: trunk/hook.php
+===================================================================
+--- trunk/hook.php (revision 360)
++++ trunk/hook.php (revision 361)
+@@ -122,7 +122,7 @@
+ `use` tinyint(1) default 0,
+ PRIMARY KEY (`id`)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
+- $DB->queryOrDir($query, $DB->error());
++ $DB->queryOrDie($query, $DB->error());
+ } else {
+ if (FieldExists('glpi_plugin_pdf_profiles','ID')) { //< 0.7.0
+ $migration->changeField('glpi_plugin_pdf_profiles', 'ID', 'id', 'autoincrement');
+@@ -199,4 +199,4 @@
+
+ return true;
+ }
+-?>
+\ No newline at end of file
++?>
diff --git a/glpi-pdf-dev.spec b/glpi-pdf-dev.spec
deleted file mode 100644
index 8063c66..0000000
--- a/glpi-pdf-dev.spec
+++ /dev/null
@@ -1,165 +0,0 @@
-%global pluginname pdf
-#global svnrelease 315
-
-Name: glpi-pdf
-Version: 0.83
-%if 0%{?svnrelease}
-Release: 0.1.svn%{svnrelease}%{?dist}
-%else
-Release: 2%{?dist}
-%endif
-Summary: GLPI Plugin to print PDF of equipment
-Summary(fr): Extension GLPI pour créer des PDF des matériels
-
-Group: Applications/Internet
-License: GPLv2+
-URL: https://forge.indepnet.net/projects/pdf
-
-%if 0%{?svnrelease}
-# svn export -r 315 https://forge.indepnet.net/svn/pdf/trunk pdf
-# tar czf glpi-pdf-0.83-315.tar.gz pdf
-Source0: glpi-pdf-0.83-%{svnrelease}.tar.gz
-%else
-Source0: https://forge.indepnet.net/attachments/download/1095/glpi-pdf-0.83.tar.gz
-%endif
-
-# https://forge.indepnet.net/issues/3455
-Patch0: changeset_r322.diff
-Patch1: changeset_r323.diff
-
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch: noarch
-
-Requires: glpi >= 0.83
-Requires: glpi < 0.84
-
-
-%description
-This GLPI plugin enables you to print, in pdf format, the information
-sheet of an equipment or a software of the inventory.
-
-
-%description -l fr
-Cette extension GLPI vous permet de créer un PDF contenant toutes les
-informations sur un équipement ou un logiciel de l'inventaire.
-
-
-%prep
-%setup -q -c
-
-# dos2unix to avoid rpmlint warnings
-mv %{pluginname}/docs docs
-for doc in docs/* ; do
- sed -i -e 's/\r//' $doc
-done
-
-cd %{pluginname}
-%patch0 -p1
-%patch1 -p1
-
-
-%build
-# empty build
-
-%install
-rm -rf %{buildroot}
-
-mkdir -p %{buildroot}/%{_datadir}/glpi/plugins
-cp -ar %{pluginname} %{buildroot}/%{_datadir}/glpi/plugins/%{pluginname}
-
-for i in %{buildroot}/%{_datadir}/glpi/plugins/%{pluginname}/locales/*
-do
- lang=$(basename $i)
- echo "%lang(${lang:0:2}) %{_datadir}/glpi/plugins/%{pluginname}/locales/${lang}"
-done | tee %{name}.lang
-
-
-%clean
-rm -rf %{buildroot}
-
-
-%files -f %{name}.lang
-%defattr(-,root,root,-)
-%doc docs/* %{pluginname}/LICENSE
-%dir %{_datadir}/glpi/plugins/%{pluginname}
-%dir %{_datadir}/glpi/plugins/%{pluginname}/locales
-%{_datadir}/glpi/plugins/%{pluginname}/*.php
-%{_datadir}/glpi/plugins/%{pluginname}/fonts
-%{_datadir}/glpi/plugins/%{pluginname}/front
-%{_datadir}/glpi/plugins/%{pluginname}/inc
-%{_datadir}/glpi/plugins/%{pluginname}/pics
-# Keep here as required from interface
-%{_datadir}/glpi/plugins/%{pluginname}/LICENSE
-
-
-%changelog
-* Thu Apr 19 2012 Remi Collet <Fedora@FamilleCollet.com> - 0.83-2
-- add patch for 0.83.1 (Problem tab on various object)
-
-* Fri Apr 06 2012 Remi Collet <Fedora@FamilleCollet.com> - 0.83-1
-- version 0.83
- https://forge.indepnet.net/projects/pdf/versions/615
-
-* Sun Feb 26 2012 Remi Collet <Fedora@FamilleCollet.com> - 0.83-0.1.svn315
-- update to 0.83 for glpi 0.83 RC (svn snapshot)
-
-* Tue Sep 20 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.80.3-1
-- version 0.80.3
- https://forge.indepnet.net/projects/pdf/versions/617
-
-* Tue Jul 19 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.80-1
-- update to 0.80 (version have change from 0.8.0)
-
-* Tue Jun 28 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.8.0-0.1.svn259
-- update to 0.8.0 for glpi 0.80 RC (svn snapshot)
-
-* Sat Jun 11 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.7.2-1
-- version 0.7.2
- https://forge.indepnet.net/projects/pdf/versions/550
-
-* Sat Jan 22 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.7.1-1
-- version 0.7.1
-
-* Tue Oct 12 2010 Remi Collet <Fedora@FamilleCollet.com> - 0.7.0-1
-- version 0.7.0 and GLPI 0.78 released
-
-* Sat Sep 18 2010 Remi Collet <Fedora@FamilleCollet.com> - 0.7.0-0.1.svn194
-- new snapshot
-
-* Tue Aug 10 2010 Remi Collet <Fedora@FamilleCollet.com> - 0.7.0-0.1.svn190
-- new snapshot
-
-* Thu Jul 08 2010 Remi Collet <Fedora@FamilleCollet.com> - 0.7.0-0.1.svn189
-- new snapshot
-
-* Tue Jun 15 2010 Remi Collet <Fedora@FamilleCollet.com> - 0.7.0-0.1.svn188
-- update to 0.7.0 for glpi 0.78 RC (svn snapshot)
-
-* Fri May 21 2010 Remi Collet <Fedora@FamilleCollet.com> - 0.6.1-2
-- spec cleanup
-
-* Tue Aug 18 2009 Remi Collet <Fedora@FamilleCollet.com> - 0.6.1-1
-- update to 0.6.1 finale for glpi 0.72
-
-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
-
-* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-
-* Sat Jul 12 2008 Remi Collet <Fedora@FamilleCollet.com> - 0.5-1
-- update to 0.5 finale for glpi 0.71
-
-* Thu Dec 27 2007 Remi Collet <Fedora@FamilleCollet.com> - 0.4-1
-- update to 0.4 finale
-- Initial RPM for Fedora review
-
-* Sun Nov 11 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.4-0.20071111
-- update from SVN
-
-* Sat Sep 23 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.3-0.20070922
-- new SVN snapshot
-
-* Mon Aug 13 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.2-0.20070813
-- Initial RPM
-
diff --git a/glpi-pdf.spec b/glpi-pdf.spec
index 8f3825c..d370fc1 100644
--- a/glpi-pdf.spec
+++ b/glpi-pdf.spec
@@ -1,8 +1,8 @@
%global pluginname pdf
-#global svnrelease 259
+#global svnrelease 315
Name: glpi-pdf
-Version: 0.80.3
+Version: 0.84
%if 0%{?svnrelease}
Release: 0.1.svn%{svnrelease}%{?dist}
%else
@@ -16,18 +16,22 @@ License: GPLv2+
URL: https://forge.indepnet.net/projects/pdf
%if 0%{?svnrelease}
-# svn export -r 259 https://forge.indepnet.net/svn/pdf/trunk pdf
-# tar czf glpi-pdf-0.8.0-259.tar.gz pdf
-Source0: glpi-pdf-0.8.0-%{svnrelease}.tar.gz
+# svn export -r 315 https://forge.indepnet.net/svn/pdf/trunk pdf
+# tar czf glpi-pdf-0.83-315.tar.gz pdf
+Source0: glpi-pdf-0.83-%{svnrelease}.tar.gz
%else
-Source0: https://forge.indepnet.net/attachments/download/966/glpi-pdf-0.80.3.tar.gz
+Source0: https://forge.indepnet.net/attachments/download/1666/glpi_pdf-0.84.tar.gz
%endif
+# https://forge.indepnet.net/issues/4783
+Patch0: changeset_r361.diff
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+BuildRequires: gettext
-Requires: glpi >= 0.80.3
-Requires: glpi < 0.81
+Requires: glpi >= 0.84
+Requires: glpi < 0.85
%description
@@ -50,10 +54,16 @@ for doc in docs/* ; do
done
cd %{pluginname}
+%patch0 -p1
%build
-# empty build
+# Regenerate the locales
+for po in %{pluginname}/locales/*.po
+do
+ msgfmt $po -o $(dirname $po)/$(basename $po .po).mo
+done
+
%install
rm -rf %{buildroot}
@@ -74,7 +84,7 @@ rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root,-)
-%doc docs/*
+%doc docs/* %{pluginname}/LICENSE
%dir %{_datadir}/glpi/plugins/%{pluginname}
%dir %{_datadir}/glpi/plugins/%{pluginname}/locales
%{_datadir}/glpi/plugins/%{pluginname}/*.php
@@ -82,9 +92,25 @@ rm -rf %{buildroot}
%{_datadir}/glpi/plugins/%{pluginname}/front
%{_datadir}/glpi/plugins/%{pluginname}/inc
%{_datadir}/glpi/plugins/%{pluginname}/pics
+# Keep here as required from interface
+%{_datadir}/glpi/plugins/%{pluginname}/LICENSE
%changelog
+* Wed Feb 12 2014 Remi Collet <remi@fedoraproject.org> - 0.84-1
+- version 0.84 for GLPI 0.84
+ https://forge.indepnet.net/projects/pdf/versions/941
+
+* Thu Apr 19 2012 Remi Collet <Fedora@FamilleCollet.com> - 0.83-2
+- add patch for 0.83.1 (Problem tab on various object)
+
+* Fri Apr 06 2012 Remi Collet <Fedora@FamilleCollet.com> - 0.83-1
+- version 0.83
+ https://forge.indepnet.net/projects/pdf/versions/615
+
+* Sun Feb 26 2012 Remi Collet <Fedora@FamilleCollet.com> - 0.83-0.1.svn315
+- update to 0.83 for glpi 0.83 RC (svn snapshot)
+
* Tue Sep 20 2011 Remi Collet <Fedora@FamilleCollet.com> - 0.80.3-1
- version 0.80.3
https://forge.indepnet.net/projects/pdf/versions/617
@@ -139,7 +165,7 @@ rm -rf %{buildroot}
* Sun Nov 11 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.4-0.20071111
- update from SVN
-* Sat Sep 23 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.3-0.20070922
+* Sun Sep 23 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.3-0.20070922
- new SVN snapshot
* Mon Aug 13 2007 Remi Collet <RPMS@FamilleCollet.com> - 0.2-0.20070813