# Run tests in check section # disable for bootstrapping %bcond_with check %global with_debug 1 %if 0%{?with_debug} %global debug_package %{nil} %endif Name: deepin-pw-check Version: 5.1.4 Release: 1 Summary: Used to check password and manager the configuration for password. License: GPLv3 URL: %{gourl} Source0: %{name}-%{version}.tar.gz Patch1000: 0001-fix-for-UonioTech.patch #uelc patch Patch1001: 0001-Mangle-Suit-Cracklib2.9.6.patch #uel patch Patch1002: 1000-deepin-pw-check-modify-password-policy.patch Patch1003: 1001-deepin-pw-check-uos-delete-blank.patch BuildRequires: compiler(go-compiler) BuildRequires: pam-devel BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gdk-3.0) BuildRequires: deepin-gettext-tools BuildRequires: gocode BuildRequires: cracklib-devel BuildRequires: iniparser BuildRequires: golang-github-linuxdeepin-go-dbus-factory-devel BuildRequires: go-lib-devel BuildRequires: go-gir-generator Requires: polkit Requires: license-config %description In order to unify the authentication interface, this interface is designed to adapt to fingerprint, face and other authentication methods. %package devel Summary: Header files and libraries used to build deepin-pw-check Requires: %{name} = %{version}-%{release} Requires: cracklib-devel iniparser %description devel In order to unify the authentication interface, this interface is designed to adapt to fingerprint, face and other authentication methods. %prep %setup -q %patch1000 -p1 %patch1002 -p1 %patch1003 -p1 %build %ifarch loongarch64 export CGO_ENABLED=1 export GOOS="linux" %endif BUILDID="0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" export GOPATH=/usr/share/gocode %make_build GO_BUILD_FLAGS=-trimpath GOBUILD="go build -compiler gc -ldflags \"-B $BUILDID\"" %post pwd-conf-update sed -i "s/pam_pwquality.so/pam_deepin_pw_check.so/g" /etc/pam.d/system-auth sed -i "s/pam_pwquality.so/pam_deepin_pw_check.so/g" /etc/pam.d/password-auth %postun if [ "$1" = "0" ] ; then sed -i "s/pam_deepin_pw_check.so/pam_pwquality.so/g" /etc/pam.d/system-auth sed -i "s/pam_deepin_pw_check.so/pam_pwquality.so/g" /etc/pam.d/password-auth fi %install mkdir -p %{buildroot}/%{_sysconfdir}/deepin export GOPATH=%{_datadir}/gocode export PKG_FILE_DIR=%{_libdir}/pkgconfig %make_install PKG_FILE_DIR=%{_libdir}/pkgconfig LIBDIR=lib64 PAM_MODULE_DIR=%{_libdir}/security GOBUILD="go build -compiler gc -ldflags \"-B $BUILDID\"" %find_lang deepin-pw-check %ifarch i686 mv %{buildroot}/usr/lib64/libdeepin_pw_check.so* %{buildroot}/usr/lib/ %endif %files -f deepin-pw-check.lang %doc README.md %license %dir %{_sysconfdir}/deepin %{_bindir}/pwd-conf-update %{_prefix}/lib/deepin-pw-check/deepin-pw-check %{_libdir}/libdeepin_pw_check.so.* %ifarch i686 /usr/lib/security/pam_deepin_pw_check.so %else %{_libdir}/security/pam_deepin_pw_check.so %endif %{_datadir}/dbus-1/system-services/*.service %{_datadir}/dbus-1/system.d/*.conf %{_datadir}/polkit-1/actions/*.policy %files devel %ifarch i686 /usr/lib64/libdeepin_pw_check.a /usr/lib/pkgconfig/libdeepin_pw_check.pc %else %{_libdir}/libdeepin_pw_check.a %{_libdir}/pkgconfig/libdeepin_pw_check.pc %endif %{_libdir}/libdeepin_pw_check.so %{_includedir}/deepin_pw_check.h %changelog * Fri Dec 01 2023 zhangshaoning -5.1.4-1 - rebase to deepin-pw-check-5.1.4-1 * Wed Dec 21 2022 liweiganga - 5.0.20.7-3 - enable debuginfo for fix strip * Tue Aug 02 2022 liweiganga - 5.0.20.7-2 - add dde.conf * Fri Jul 22 2022 konglidong - 5.0.20.7-1 - package init