# Generated by go2rpm 1.15.0 # With manual changes by maintainer # Do not edit this spec file. (Re-)Generate using newrelease %bcond check 1 # **** release metadata **** # populated by envsubst in newrelease %global deepin_pw_check_spec_name deepin-pw-check %global deepin_pw_check_spec_ver 6.0.2 # Uncomment if needed for commit based release # %%global deepin_pw_check_commit %global deepin_pw_check_tag 6.0.2 %global golangver 1.20 # Commit for the builds # Uncomment if needed for commit based release # %%global commit0 %%{deepin_pw_check_commit} %{?deepin_pw_check_commit:%global commit0 %{deepin_pw_check_commit}} %global __provides_exclude_from ^%{_libdir}/security/.*\.so$ # https://github.com/linuxdeepin/deepin-pw-check %global goipath github.com/linuxdeepin/deepin-pw-check Version: %{deepin_pw_check_spec_ver} %{!?commit0:%global tag %{deepin_pw_check_tag}} %gometa -L Name: deepin-pw-check Release: %autorelease Summary: A tool to verify the validity of the password. License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-4.0 AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND MIT URL: %{gourl} Source0: %{gosource} # go_vendor_archive create deepin-pw-check.spec Source1: %{archivename}-vendor.tar.bz2 # Fix for trivy being unable to detect some licenses # go_vendor_license --detector askalono report # go_vendor_license --config go-vendor-tools.toml --detector trivy explicit -f vendor/gopkg.in/yaml.v3/LICENSE "Apache-2.0 AND MIT" # go_vendor_license --config go-vendor-tools.toml --detector askalono report Source2: go-vendor-tools.toml # fix: Missing include stdlib.h Patch0: https://github.com/linuxdeepin/deepin-pw-check/pull/37.patch Patch1: 0001-Adapt-to-Fedora-cracklib-API.patch BuildRequires: make BuildRequires: gcc BuildRequires: golang >= %{golangver} BuildRequires: go-vendor-tools BuildRequires: pam-devel BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gdk-3.0) BuildRequires: deepin-gettext-tools BuildRequires: cracklib-devel BuildRequires: iniparser-devel BuildRequires: libxcrypt-devel %description In order to unify the authentication interface, this interface is designed to adapt to fingerprint, face and other authentication methods. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: cracklib-devel%{?_isa} Requires: iniparser-devel%{?_isa} %description devel This package contains development files for %{name}. %prep %goprep -A # Required to unpack vendor on top of main %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} sed -i 's|\${PREFIX}/lib$|\${PREFIX}/%{_lib}|; s|cp |cp -a |' Makefile sed -i 's|/usr/lib|%{_libdir}|' misc/pkgconfig/libdeepin_pw_check.pc # expand build_ldflags at %%build section, RHBZ#2044028 sed -i 's|gcc |gcc %{build_cflags} %{build_ldflags} |' Makefile %build export CGO_CFLAGS="%{optflags} -std=gnu17" %gobuild -o out/bin/%{name} %{goipath}/service %make_build %install %go_vendor_license_install -c %{S:2} export PKG_FILE_DIR=%{_libdir}/pkgconfig %make_install PKG_FILE_DIR=%{_libdir}/pkgconfig PAM_MODULE_DIR=%{_libdir}/security # don't install static library rm -v %{buildroot}%{_libdir}/*.a %find_lang deepin-pw-check %files -f deepin-pw-check.lang -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc README.md %{_bindir}/pwd-conf-update %dir %{_prefix}/lib/deepin-pw-check %{_prefix}/lib/deepin-pw-check/deepin-pw-check %{_libdir}/libdeepin_pw_check.so.1* %{_libdir}/security/pam_deepin_pw_check.so %{_datadir}/dbus-1/system-services/org.deepin.dde.PasswdConf1.service %{_datadir}/dbus-1/system.d/org.deepin.dde.PasswdConf1.conf %{_datadir}/polkit-1/actions/org.deepin.dde.passwdconf.policy %files devel %{_libdir}/libdeepin_pw_check.so %{_libdir}/pkgconfig/libdeepin_pw_check.pc %{_includedir}/deepin_pw_check.h %changelog %autochangelog