diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index e460e38..98e35a2 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -7,85 +7,94 @@ # # Copyright (c) 2009 - 2021 LSC Project #================================================= +%global lsc_min_version 2.3 -#================================================= -# Variables -#================================================= -%define lsc_executable_name lsc-executable-plugin -%define lsc_executable_version 1.3 -%define lsc_min_version 2.2 -%define lsc_user lsc -%define lsc_group lsc +%bcond build_from_sources 0 +%bcond tests 0 -#================================================= -# Header -#================================================= -Summary: LSC Executable plugin -Name: %{lsc_executable_name} -Version: %{lsc_executable_version} +Name: lsc-executable-plugin +Version: 1.4 Release: 1%{?dist} -License: BSD -BuildArch: noarch - -Group: Applications/System +Summary: LSC Executable plugin +License: BSD-3-Clause URL: https://lsc-project.org +%if %{with build_from_sources} +Source0: https://github.com/lsc-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +%else +Source1: https://www.lsc-project.org/archives/lsc-executable-plugin-%{version}.jar +Source2: https://raw.githubusercontent.com/lsc-project/%{name}/refs/tags/v%{version}/scripts/lsc-executable-add-modify-delete-modrdn.pl +Source3: https://raw.githubusercontent.com/lsc-project/%{name}/refs/tags/v%{version}/scripts/lsc-executable-csv2ldif-get.pl +Source4: https://raw.githubusercontent.com/lsc-project/%{name}/refs/tags/v%{version}/scripts/lsc-executable-csv2ldif-list.pl +%endif +BuildArch: noarch -Source: %{lsc_executable_name}-%{lsc_executable_version}.jar -Source1: lsc-executable-add-modify-delete-modrdn.pl -Source2: lsc-executable-csv2ldif-get.pl -Source3: lsc-executable-csv2ldif-list.pl -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -Requires(pre): coreutils +BuildRequires: coreutils +%if %{with build_from_sources} +BuildRequires: jpackage-utils +BuildRequires: java-devel >= 1:21 +BuildRequires: maven +BuildRequires: maven-local +%endif Requires: lsc >= %{lsc_min_version} -%description -This is an Executable plugin for LSC -%prep +%description +This is an Executable plugin for LSC. -%build -%install +%prep +%if %{with build_from_sources} +%setup -q +%endif -rm -rf %{buildroot} -# Create directories -mkdir -p %{buildroot}/usr/%{_lib}/lsc -mkdir -p %{buildroot}/var/lib/lsc +%build +%if %{with build_from_sources} +mvn %{!?with_tests:"-Dmaven.test.skip=true"} package +%endif -# Copy files -cp -a %{SOURCE0} %{buildroot}/usr/%{_lib}/lsc -cp -a %{SOURCE1} %{buildroot}/var/lib/lsc -cp -a %{SOURCE2} %{buildroot}/var/lib/lsc -cp -a %{SOURCE3} %{buildroot}/var/lib/lsc -%post +%install +# Jar +mkdir -p %{buildroot}%{_libdir}/lsc +%if %{with build_from_sources} +install -m 0644 target/%{name}-%{version}.jar \ + %{buildroot}%{_libdir}/lsc +%else +install -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/lsc/ +mkdir scripts +install -m 0644 %{SOURCE2} %{SOURCE3} %{SOURCE4} scripts/ +%endif -/bin/chown -R %{lsc_user}:%{lsc_group} /usr/%{_lib}/lsc -/bin/chown -R %{lsc_user}:%{lsc_group} /var/lib/lsc +%files +%if %{with build_from_sources} +%license LICENSE.txt +%doc README.md doc/* +%endif +%doc scripts/* +%{_libdir}/lsc/lsc-executable-plugin* -%postun -%clean -rm -rf %{buildroot} +%changelog +* Mon Jul 27 2026 Xavier Bachelot - 1.4-1 +- Update to 1.4 + - Properly handle Base64-encoded attributes + - Compatibility with LSC 2.3 +- Clean rpm specfile -%files -%defattr(-, root, root, 0755) -/usr/%{_lib}/lsc/lsc-executable-plugin* -/var/lib/lsc/lsc-executable* +* Mon Jul 21 2025 Xavier Bachelot - 1.3-2 +- Rework specfile -#================================================= -# Changelog -#================================================= -%changelog * Mon Jul 21 2025 - Clement Oudot - 1.3-1 - Upgrade to 1.3 - fix value comparison + add unit test for executableLdifDestinationService task + * Mon Apr 14 2025 - Clement Oudot - 1.2-1 - Upgrade to 1.2 + * Thu Jan 07 2021 - Clement Oudot - 1.1-0 - Upgrade to 1.1 + * Tue Mar 04 2014 - Clement Oudot - 1.0-0 - First package for LSC Executable plugin