summaryrefslogtreecommitdiffstats
path: root/glpi-archires.spec
blob: 197c63f6a2cd6b035fcf5e5ff79249d968c6a61b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# remirepo spec file for glpi-archires
#
# Copyright (c) 2018-2079 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%global pluginname   archires

Name:           glpi-archires
Version:        2.7.0
Release:        1%{?dist}
Summary:        Network architecture

License:        AGPLv3+
URL:            https://forge.glpi-project.org/projects/archires

Source0:        https://forge.glpi-project.org/attachments/download/2297/glpi-archires-2.7.0.tar.gz

BuildArch:      noarch
BuildRequires:  gettext

%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires:      (glpi >= 9.4 with glpi < 9.5)
%else
Requires:       glpi >= 9.4
Requires:       glpi <  9.5
%endif
Requires:       graphviz


%description
This plugin allow you to generate automatically a graphical representation
of the network architecture.

Filters :
- by equipment type,
- by states,
- by network
- by VLAN
- by groups

Setup :
- association of pics with types of equipment
- association of colors with types of networks,
- association of colors with status of equipments,
- association of colors with VLANs



%prep
%setup -q -c

# Create link to LICENSE for standard doc folder
ln -s %{_datadir}/glpi/plugins/%{pluginname}/LICENSE LICENSE

# For developer only
rm -rf %{pluginname}/tools

# Display compatibility check
grep version_compare %{pluginname}/setup.php


%build
# Regenerate the locales
for po in %{pluginname}/locales/*.po
do
   msgfmt $po -o $(dirname $po)/$(basename $po .po).mo
done


%install
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


%files -f %{name}.lang
%{!?_licensedir:%global license %%doc}
%license LICENSE
%dir %{_datadir}/glpi/plugins/%{pluginname}
%dir %{_datadir}/glpi/plugins/%{pluginname}/locales
%{_datadir}/glpi/plugins/%{pluginname}/*.php
%{_datadir}/glpi/plugins/%{pluginname}/ajax
%{_datadir}/glpi/plugins/%{pluginname}/front
%{_datadir}/glpi/plugins/%{pluginname}/inc
%{_datadir}/glpi/plugins/%{pluginname}/pics
%{_datadir}/glpi/plugins/%{pluginname}/sql
# Keep here as required from interface
%{_datadir}/glpi/plugins/%{pluginname}/LICENSE


%changelog
* Thu Dec 12 2019 Remi Collet <remi@remirepo.net> - 2.7.0-1
- Update to 2.7.0 for GLPI 9.4

* Fri Nov 30 2018 Remi Collet <remi@remirepo.net> - 2.6.0-1
- Initial RPM, version 2.6.0 for GLPI 9.3