deepin-pw-check/deepin-pw-check.spec

127 lines
3.6 KiB
RPMSpec
Raw Permalink Normal View History

2022-07-22 15:59:08 +08:00
# Run tests in check section
# disable for bootstrapping
%bcond_with check
2023-12-01 17:13:57 +08:00
%global with_debug 1
2022-07-22 15:59:08 +08:00
%if 0%{?with_debug}
%global debug_package %{nil}
%endif
Name: deepin-pw-check
2023-12-01 17:13:57 +08:00
Version: 5.1.4
Release: 1
2022-07-22 15:59:08 +08:00
Summary: Used to check password and manager the configuration for password.
2023-12-01 17:13:57 +08:00
License: GPLv3
URL: %{gourl}
2023-04-06 16:02:42 +08:00
Source0: %{name}-%{version}.tar.gz
2022-07-22 15:59:08 +08:00
Patch1000: 0001-fix-for-UonioTech.patch
2023-12-01 17:13:57 +08:00
#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
2023-04-06 16:02:42 +08:00
2023-12-01 17:13:57 +08:00
BuildRequires: compiler(go-compiler)
2022-07-22 15:59:08 +08:00
BuildRequires: pam-devel
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gdk-3.0)
BuildRequires: deepin-gettext-tools
2023-12-01 17:13:57 +08:00
BuildRequires: gocode
2022-07-22 15:59:08 +08:00
BuildRequires: cracklib-devel
BuildRequires: iniparser
2023-12-01 17:13:57 +08:00
BuildRequires: golang-github-linuxdeepin-go-dbus-factory-devel
BuildRequires: go-lib-devel
BuildRequires: go-gir-generator
2022-07-22 15:59:08 +08:00
Requires: polkit
2023-12-01 17:13:57 +08:00
Requires: license-config
2022-07-22 15:59:08 +08:00
%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
2023-12-01 17:13:57 +08:00
%patch1000 -p1
%patch1002 -p1
%patch1003 -p1
2022-07-22 15:59:08 +08:00
%build
2023-12-01 17:13:57 +08:00
%ifarch loongarch64
export CGO_ENABLED=1
export GOOS="linux"
%endif
2022-07-22 15:59:08 +08:00
BUILDID="0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')"
2023-12-01 17:13:57 +08:00
export GOPATH=/usr/share/gocode
2022-07-22 15:59:08 +08:00
%make_build GO_BUILD_FLAGS=-trimpath GOBUILD="go build -compiler gc -ldflags \"-B $BUILDID\""
%post
2023-12-01 17:13:57 +08:00
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
2022-07-22 15:59:08 +08:00
%postun
2023-12-01 17:13:57 +08:00
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
2022-07-22 15:59:08 +08:00
%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
2023-12-01 17:13:57 +08:00
%ifarch i686
mv %{buildroot}/usr/lib64/libdeepin_pw_check.so* %{buildroot}/usr/lib/
%endif
2022-07-22 15:59:08 +08:00
%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.*
2023-12-01 17:13:57 +08:00
%ifarch i686
/usr/lib/security/pam_deepin_pw_check.so
%else
2022-07-22 15:59:08 +08:00
%{_libdir}/security/pam_deepin_pw_check.so
2023-12-01 17:13:57 +08:00
%endif
2022-07-22 15:59:08 +08:00
%{_datadir}/dbus-1/system-services/*.service
%{_datadir}/dbus-1/system.d/*.conf
%{_datadir}/polkit-1/actions/*.policy
%files devel
2023-12-01 17:13:57 +08:00
%ifarch i686
/usr/lib64/libdeepin_pw_check.a
/usr/lib/pkgconfig/libdeepin_pw_check.pc
%else
2022-07-22 15:59:08 +08:00
%{_libdir}/libdeepin_pw_check.a
%{_libdir}/pkgconfig/libdeepin_pw_check.pc
2023-12-01 17:13:57 +08:00
%endif
%{_libdir}/libdeepin_pw_check.so
2022-07-22 15:59:08 +08:00
%{_includedir}/deepin_pw_check.h
%changelog
2023-12-01 17:13:57 +08:00
* Fri Dec 01 2023 zhangshaoning <zhangshaoning@uniontech.com> -5.1.4-1
- rebase to deepin-pw-check-5.1.4-1
2023-04-06 16:02:42 +08:00
* Wed Dec 21 2022 liweiganga <liweiganga@uniontech.com> - 5.0.20.7-3
- enable debuginfo for fix strip
* Tue Aug 02 2022 liweiganga <liweiganga@uniontech.com> - 5.0.20.7-2
- add dde.conf
2022-07-22 15:59:08 +08:00
* Fri Jul 22 2022 konglidong <konglidong@uniontech.com> - 5.0.20.7-1
- package init