]> eyrie.org Git - kerberos/krb5-strength.git/blob - krb5-strength.spec
Add license statement to RPM spec file
[kerberos/krb5-strength.git] / krb5-strength.spec
1 # RPM spec file for krb5-strength.
2 #
3 # Written by Daria Phoebe Brashear
4 # Copyright 2023 Daria Phoebe Brashear
5 # Copyright 2023 Russ Allbery <eagle@eyrie.org>
6 #
7 # SPDX-License-Identifier: MIT
8
9 %bcond_with     krb5            # build with MIT kerberos if asked
10
11 # Crypt::PBKDF2 isn't in base or EPEL on rhel8 so this won't work there frex
12 %bcond_with     history # build heimdal-history tool
13
14 Name:           krb5-strength
15 Version:        3.3
16 Release:        1%{?dist}
17 Summary:        Kerberos password strength checking plugin
18 Group:          System Environment/Daemons
19 License:        MIT
20 Vendor:         Russ Allbery
21 URL:            https://www.eyrie.org/~eagle/software/%{name}/
22 Source0:        https://archives.eyrie.org/software/kerberos/%{name}-%{version}.tar.gz
23
24 %if %{with krb5}
25 BuildRequires: krb5-devel
26 %else
27 BuildRequires: heimdal-devel
28 BuildRequires: libcom_err-devel
29 BuildRequires: ncurses-devel
30 %endif
31 BuildRequires: sqlite-devel
32 BuildRequires: tinycdb-devel
33
34 Requires: perl(autodie)
35 Requires: perl(Getopt::Long)
36 Requires: sqlite
37 Requires: tinycdb
38 %if %{with krb5}
39 Requires: krb5-server
40 %else
41 Requires: heimdal-server
42 %endif
43 %if %{with history}
44 %package -n %{name}-history
45 Summary:        Kerberos password strength checking plugin history tool
46 Group:          System Environment/Daemons
47 Requires: %{name}
48 Requires: perl(autodie)
49 Requires: perl(Const::Fast)
50 Requires: perl(Crypt::PBKDF2)
51 Requires: perl(DB_File::Lock)
52 Requires: perl(Getopt::Long::Descriptive)
53 Requires: perl(IPC::Run)
54 Requires: perl(JSON::MaybeXS)
55 %description -n %{name}-history
56 Heimdal password history tool for Kerberos password strength checking plugin
57 %endif
58
59 %description
60 Kerberos password strength checking plugin and program for Heimdal KDC
61
62 %prep
63 %setup -q
64
65 # in theory a system could have Heimdal and krb5
66 %build 
67 %if %{with krb5}
68 export PATH_KRB5_CONFIG=/usr/bin/krb5-config
69 %else
70 export PATH_KRB5_CONFIG=/usr/bin/heimdal-krb5-config
71 %endif
72 %configure
73 %make_build
74
75 %install
76 %make_install
77 %if !%{with history}
78 rm -f $RPM_BUILD_ROOT%{_bindir}/heimdal-history
79 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/heimdal-history.*
80 %endif
81
82 %files
83 %defattr(-,root,root)
84 %license LICENSE
85 %doc README
86 %{_bindir}/heimdal-strength
87 %{_bindir}/krb5-strength-wordlist
88 %{_mandir}/man1/heimdal-strength.*
89 %{_mandir}/man1/krb5-strength-wordlist.*
90 %{_mandir}/man5
91 %{_libdir}/krb5/plugins/pwqual/strength.so
92 %{_libdir}/krb5/plugins/pwqual/strength.la
93
94 %if %{with history}
95 %files -n %{name}-history
96 %defattr(-,root,root)
97 %{_bindir}/heimdal-history
98 %{_mandir}/man1/heimdal-history.*
99 %endif
100
101 %changelog
102 * Mon Dec 25 2023 Russ Allbery <eagle@eyrie.org> 3.3-1
103 - Update license
104 - Update Perl dependencies for history package
105
106 * Wed Nov 15 2023 Daria Phoebe Brashear <dariaphoebe@auristor.com> 3.2-1
107 - Heimdal spec file