libreoffice-compilar/rpmbuild/SPECS/zxcvbn-c.spec

96 lines
2.4 KiB
RPMSpec

## START: Set by rpmautospec
## (rpmautospec version 0.3.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 3;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
# debuginfo is broken
%define debug_package %{nil}
%global forgeurl https://github.com/tsyrogit/zxcvbn-c
Version: 2.5
%forgemeta
Name: zxcvbn-c
Release: %autorelease
Summary: C/C++ version of the zxcvbn password strength estimator
License: MIT
URL: %{forgeurl}
Source0: %{forgesource}
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildRequires: gcc-c++
%description
This is a C/C++ implementation of the zxcvbn password strength estimation.
The code is intended to be included as part of the source of a C/C++ program.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}
%prep
%forgesetup
%build
%make_build
%install
# Make install is currently broken
#%%make_install
%{__mkdir_p} %{buildroot}%{_libdir}
%{__mkdir_p} %{buildroot}%{_bindir}
%{__mkdir_p} %{buildroot}{%{_includedir},%{_datadir}}/zxcvbn
install -p -m 0644 *.h %{buildroot}%{_includedir}/zxcvbn
# Libreoffice 24.2.0.1 saca error de que no encuentra la zxcvbn.h
# Este es el workaround:
ln -s zxcvbn/zxcvbn.h %{buildroot}%{_includedir}/
cp -a libzxcvbn.so* %{buildroot}%{_libdir}
install -p -m 0755 dictgen %{buildroot}%{_bindir}
install -p -m 0644 zxcvbn.dict %{buildroot}%{_datadir}/zxcvbn
%check
make test
%files
%doc README.md
%license LICENSE.txt
%{_bindir}/dictgen
%{_libdir}/libzxcvbn.so.0*
%{_datadir}/zxcvbn
%files devel
%{_includedir}/zxcvbn
# Workaround para libreoffice 24.2.0.1
%{_includedir}/zxcvbn.h
%{_libdir}/libzxcvbn.so
%changelog
* Mon Jan 22 2024 Sandino Araico Sánchez <sandino@sandino.net> - 2.5-3
- Workaround for Libreoffice 24.2.0.1: symbolic link
* Tue Jan 16 2024 Sandino Araico Sánchez <sandino@sandino.net> - 2.5-2
- Disabled broken debug package
* Fri Dec 15 2023 Mattia Verga <mattia.verga@proton.me> - 2.5-1
- Initial release (fedora#2253977)