# COPR Ligenix's spec file for glpi-plugin-purchaserequest # # Copyright (c) 2022-2023 Jean-Marc Liger # # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %global pluginname purchaserequest %global glpi_min 10.0.0 %global glpi_max 10.1.0 Name: glpi-plugin-%{pluginname} Version: 3.0.2 Release: 1%{?dist} Summary: GLPI Plugin to purchase requests prior to launching orders Summary(fr): Extension GLPI de gestion des demandes d'achats préalables au lancement de commandes License: AGPLv3+ URL: https://github.com/InfotelGLPI/%{pluginname} Source0: https://github.com/InfotelGLPI/%{pluginname}/releases/download/v%{version}/glpi-%{pluginname}-%{version}.tar.bz2 BuildArch: noarch BuildRequires: gettext %if 0%{?fedora} || 0%{?rhel} >= 8 Requires: (glpi >= %{glpi_min} with glpi < %{glpi_max}) %else Requires: glpi >= %{glpi_min} Requires: glpi < %{glpi_max} %endif Requires: glpi-plugin-order %description This plugin allows you to purchase requests prior to launching orders with the order plugin %description -l fr Cette extension permet de créer des demandes d'achats préalables au lancement de commandes avec le plugin order %prep %setup -q -c # display compatibility check grep 'min' %{pluginname}/setup.php # remove unused files # move doc files mkdir docs mv %{pluginname}/README.md docs/ # create link to LICENSE for standard doc folder ln -s %{_datadir}/glpi/plugins/%{pluginname}/LICENSE LICENSE %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 %doc docs/* %dir %{_datadir}/glpi/plugins/%{pluginname} %dir %{_datadir}/glpi/plugins/%{pluginname}/locales # LICENSE file required by installation process %{_datadir}/glpi/plugins/%{pluginname}/LICENSE %{_datadir}/glpi/plugins/%{pluginname}/*.php %{_datadir}/glpi/plugins/%{pluginname}/ajax %{_datadir}/glpi/plugins/%{pluginname}/front %{_datadir}/glpi/plugins/%{pluginname}/inc %changelog * Mon Sep 16 2024 Jean-Marc Liger - 3.0.2-1 - Version 3.0.2 * Fri May 05 2023 Jean-Marc Liger - 3.0.1-1 - Version 3.0.1 for GLPI 10.0.x - Initial RPM based on Remi Collet previous GLPI plugins spec files