]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - cracklib/cracklib.nm
pygobject3: Update to version 3.18.0
[people/amarx/ipfire-3.x.git] / cracklib / cracklib.nm
CommitLineData
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 6name = cracklib
0dc58886
MT
7version = 2.9.2
8release = 1
bfbb4b80 9
802ea3af
MT
10groups = Security/Password
11url = http://sourceforge.net/projects/cracklib/
12license = GPLv2
13summary = A password-checking library.
bfbb4b80 14
802ea3af 15description
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
23end
24
71e6a8ef 25source_dl = http://prdownloads.sourceforge.net/cracklib/
802ea3af 26sources += cracklib-words-20080507.gz
bfbb4b80 27
802ea3af
MT
28build
29 requires
30 python-devel
31 end
bfbb4b80 32
71e6a8ef
MT
33 dictdir = %{datadir}/cracklib
34 dictpath = %{dictdir}/pw_dict
35
802ea3af 36 configure_options += \
316bfb6e 37 --with-default-dict=%{dictpath} \
802ea3af
MT
38 --with-python \
39 --disable-static
6ecc8c00 40
802ea3af
MT
41 # Only extract the source tarball.
42 prepare
43 cd %{DIR_SRC} && %{MACRO_EXTRACT} %{DIR_DL}/%{thisapp}.tar.gz
71e6a8ef
MT
44 cd %{DIR_APP}
45
46 cp lib/packer.h lib/packer.h.in
47 chmod +x util/cracklib-format
6ecc8c00 48
71e6a8ef
MT
49 mkdir cracklib-dicts
50 cp -vf %{DIR_DL}/cracklib-words-20080507.gz cracklib-dicts
51
52 # Create distribution dict.
53 echo -ne "%{DISTRO_NAME}\n%{DISTRO_SNAME}\n" >> \
54 cracklib-dicts/cracklib-distro-words
55 gzip -9 cracklib-dicts/cracklib-distro-words
802ea3af 56 end
6ecc8c00 57
802ea3af 58 install_cmds
71e6a8ef
MT
59 # Install python bindings
60 make install DESTDIR=%{BUILDROOT} INSTALL="install -c -p" -C python
61
71e6a8ef
MT
62 mkdir -pv %{BUILDROOT}{%{dictdir},%{dictpath}}
63 util/cracklib-format cracklib-dicts/* | \
64 util/cracklib-packer %{BUILDROOT}%{dictpath}
65 util/cracklib-format %{BUILDROOT}%{dictdir}/cracklib-small | \
66 util/cracklib-packer %{BUILDROOT}%{dictdir}/cracklib-small
67 rm -f %{BUILDROOT}%{dictdir}/cracklib-small
68
69 sed -e "s@/usr/lib/cracklib_dict@%{dictpath}@g" lib/crack.h \
70 > %{BUILDROOT}%{includedir}/crack.h
71
72 ln -svf cracklib-format %{BUILDROOT}%{sbindir}/mkdict
73 ln -svf cracklib-packer %{BUILDROOT}%{sbindir}/packer
74
75 toprelpath=..
76 touch %{BUILDROOT}/top
77 while ! test -f %{BUILDROOT}%{libdir}/${toprelpath}/top; do
78 toprelpath=../${toprelpath}
79 done
80 rm -f %{BUILDROOT}/top
81
82 if [ "%{dictpath}" != "%{libdir}/cracklib_dict" ]; then
83 ln -svf ${toprelpath}%{dictpath}.hwm %{BUILDROOT}%{libdir}/cracklib_dict.hwm
84 ln -svf ${toprelpath}%{dictpath}.pwd %{BUILDROOT}%{libdir}/cracklib_dict.pwd
85 ln -svf ${toprelpath}%{dictpath}.pwi %{BUILDROOT}%{libdir}/cracklib_dict.pwi
86 fi
802ea3af
MT
87 end
88end
bfbb4b80 89
802ea3af
MT
90packages
91 package %{name}
92 requires = %{name}-dicts
93 end
1f9bc2f0 94
802ea3af
MT
95 package %{name}-devel
96 template DEVEL
97 end
1f9bc2f0 98
802ea3af
MT
99 # We build an extra package with the dictionaries.
100 package %{name}-dicts
101 summary = Dictionaries for %{thisapp}.
102 description = %{summary}
1f9bc2f0 103
802ea3af 104 files
71e6a8ef
MT
105 %{dictdir}
106 %{dictpath}
802ea3af
MT
107 end
108 end
1f9bc2f0 109
802ea3af
MT
110 # We build an extra python package with the bindings for it.
111 package python-cracklib
316bfb6e 112 summary = Python bindings for %{thisapp}.
802ea3af 113 description = %{summary}
1f9bc2f0 114
316bfb6e
MT
115 files
116 /usr/lib/python*
117 %{libdir}/python*
118 end
802ea3af 119 end
1f9bc2f0
MT
120
121 package %{name}-debuginfo
122 template DEBUGINFO
123 end
802ea3af 124end