]>
Commit | Line | Data |
---|---|---|
bfbb4b80 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
bfbb4b80 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = cracklib |
71e6a8ef MT |
7 | version = 2.8.18 |
8 | release = 1 | |
bfbb4b80 | 9 | |
802ea3af MT |
10 | groups = Security/Password |
11 | url = http://sourceforge.net/projects/cracklib/ | |
12 | license = GPLv2 | |
13 | summary = A password-checking library. | |
bfbb4b80 | 14 | |
802ea3af | 15 | description |
bfbb4b80 MT |
16 | CrackLib tests passwords to determine whether they match certain \ |
17 | security-oriented characteristics, with the purpose of stopping users \ | |
18 | from choosing passwords that are easy to guess. CrackLib performs \ | |
19 | several tests on passwords: it tries to generate words from a username \ | |
20 | and gecos entry and checks those words against the password; it checks \ | |
21 | for simplistic patterns in passwords; and it checks for the password \ | |
22 | in a dictionary. | |
802ea3af MT |
23 | end |
24 | ||
71e6a8ef | 25 | source_dl = http://prdownloads.sourceforge.net/cracklib/ |
802ea3af | 26 | sources += cracklib-words-20080507.gz |
bfbb4b80 | 27 | |
802ea3af MT |
28 | build |
29 | requires | |
71e6a8ef MT |
30 | autoconf |
31 | automake | |
32 | gettext-devel | |
802ea3af MT |
33 | python-devel |
34 | end | |
bfbb4b80 | 35 | |
71e6a8ef MT |
36 | dictdir = %{datadir}/cracklib |
37 | dictpath = %{dictdir}/pw_dict | |
38 | ||
802ea3af MT |
39 | configure_options += \ |
40 | --with-default-dict=/lib/cracklib/pw_dict \ | |
41 | --with-python \ | |
42 | --disable-static | |
6ecc8c00 | 43 | |
802ea3af MT |
44 | # Only extract the source tarball. |
45 | prepare | |
46 | cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz | |
71e6a8ef MT |
47 | cd %{DIR_APP} |
48 | ||
49 | cp lib/packer.h lib/packer.h.in | |
50 | chmod +x util/cracklib-format | |
6ecc8c00 | 51 | |
802ea3af MT |
52 | # Apply all patches. |
53 | %{MACRO_PATCHES} | |
71e6a8ef MT |
54 | |
55 | #autoreconf -fi | |
56 | ||
57 | mkdir cracklib-dicts | |
58 | cp -vf %{DIR_DL}/cracklib-words-20080507.gz cracklib-dicts | |
59 | ||
60 | # Create distribution dict. | |
61 | echo -ne "%{DISTRO_NAME}\n%{DISTRO_SNAME}\n" >> \ | |
62 | cracklib-dicts/cracklib-distro-words | |
63 | gzip -9 cracklib-dicts/cracklib-distro-words | |
802ea3af | 64 | end |
6ecc8c00 | 65 | |
802ea3af | 66 | install_cmds |
71e6a8ef MT |
67 | # Install python bindings |
68 | make install DESTDIR=%{BUILDROOT} INSTALL="install -c -p" -C python | |
69 | ||
666c90e9 MT |
70 | mkdir -pv %{BUILDROOT}/{,usr/}%{lib} |
71 | mv -v %{BUILDROOT}%{libdir}/libcrack.so.2* %{BUILDROOT}/%{lib} | |
71e6a8ef MT |
72 | ln -vsf ../../%{lib}/libcrack.so.2.8.1 %{BUILDROOT}%{libdir}/libcrack.so |
73 | ||
74 | mkdir -pv %{BUILDROOT}{%{dictdir},%{dictpath}} | |
75 | util/cracklib-format cracklib-dicts/* | \ | |
76 | util/cracklib-packer %{BUILDROOT}%{dictpath} | |
77 | util/cracklib-format %{BUILDROOT}%{dictdir}/cracklib-small | \ | |
78 | util/cracklib-packer %{BUILDROOT}%{dictdir}/cracklib-small | |
79 | rm -f %{BUILDROOT}%{dictdir}/cracklib-small | |
80 | ||
81 | sed -e "s@/usr/lib/cracklib_dict@%{dictpath}@g" lib/crack.h \ | |
82 | > %{BUILDROOT}%{includedir}/crack.h | |
83 | ||
84 | ln -svf cracklib-format %{BUILDROOT}%{sbindir}/mkdict | |
85 | ln -svf cracklib-packer %{BUILDROOT}%{sbindir}/packer | |
86 | ||
87 | toprelpath=.. | |
88 | touch %{BUILDROOT}/top | |
89 | while ! test -f %{BUILDROOT}%{libdir}/${toprelpath}/top; do | |
90 | toprelpath=../${toprelpath} | |
91 | done | |
92 | rm -f %{BUILDROOT}/top | |
93 | ||
94 | if [ "%{dictpath}" != "%{libdir}/cracklib_dict" ]; then | |
95 | ln -svf ${toprelpath}%{dictpath}.hwm %{BUILDROOT}%{libdir}/cracklib_dict.hwm | |
96 | ln -svf ${toprelpath}%{dictpath}.pwd %{BUILDROOT}%{libdir}/cracklib_dict.pwd | |
97 | ln -svf ${toprelpath}%{dictpath}.pwi %{BUILDROOT}%{libdir}/cracklib_dict.pwi | |
98 | fi | |
802ea3af MT |
99 | end |
100 | end | |
bfbb4b80 | 101 | |
802ea3af MT |
102 | packages |
103 | package %{name} | |
104 | requires = %{name}-dicts | |
105 | end | |
1f9bc2f0 | 106 | |
802ea3af MT |
107 | package %{name}-devel |
108 | template DEVEL | |
109 | end | |
1f9bc2f0 | 110 | |
802ea3af MT |
111 | # We build an extra package with the dictionaries. |
112 | package %{name}-dicts | |
113 | summary = Dictionaries for %{thisapp}. | |
114 | description = %{summary} | |
1f9bc2f0 | 115 | |
802ea3af | 116 | files |
71e6a8ef MT |
117 | %{dictdir} |
118 | %{dictpath} | |
802ea3af MT |
119 | end |
120 | end | |
1f9bc2f0 | 121 | |
802ea3af MT |
122 | # We build an extra python package with the bindings for it. |
123 | package python-cracklib | |
124 | summary = Python bindings for ${thisapp}. | |
125 | description = %{summary} | |
1f9bc2f0 | 126 | |
802ea3af MT |
127 | files = /usr/lib*/python* |
128 | end | |
1f9bc2f0 MT |
129 | |
130 | package %{name}-debuginfo | |
131 | template DEBUGINFO | |
132 | end | |
802ea3af | 133 | end |