Dirk Mueller
c474e0a716
OBS-URL: https://build.opensuse.org/package/show/Base:System/cracklib?expand=0&rev=9
170 lines
5.2 KiB
RPMSpec
170 lines
5.2 KiB
RPMSpec
#
|
|
# spec file for package cracklib (Version 2.8.16)
|
|
#
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
|
|
Name: cracklib
|
|
BuildRequires: gzip zlib-devel
|
|
Url: http://sourceforge.net/projects/cracklib
|
|
License: Artistic, LGPLv2.1
|
|
Group: System/Libraries
|
|
AutoReqProv: on
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: cracklib-64bit
|
|
%endif
|
|
#
|
|
Version: 2.8.16
|
|
Release: 2
|
|
Requires: cracklib-dict
|
|
Summary: Library to crack passwords using dictionaries
|
|
Source: http://prdownloads.sourceforge.net/cracklib/cracklib-%{version}.tar.bz2
|
|
Source2: baselibs.conf
|
|
Patch: cracklib-magic.diff
|
|
Patch2: datarootdir.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
CrackLib tests passwords to determine whether they match
|
|
certainsecurity-oriented characteristics. You can use CrackLib to
|
|
stopusers from choosing passwords that are too simple.This package
|
|
contains a full dictionary file used by cracklib.
|
|
|
|
|
|
|
|
%package devel
|
|
License: Artistic
|
|
Summary: Header files and libraries for developing apps which will use CrackLib
|
|
Group: Development/Libraries/C and C++
|
|
Provides: cracklib:/usr/include/crack.h
|
|
Requires: libcrack2 = %{version} glibc-devel
|
|
AutoReqProv: on
|
|
|
|
%description devel
|
|
The cracklib-devel package contains the header files and libraries
|
|
needed to develop programs that use the CrackLib functions to to
|
|
determine whether passwords match certain security-oriented
|
|
characteristics.
|
|
|
|
|
|
%package -n libcrack2
|
|
License: LGPLv2.1
|
|
Group: System/Libraries
|
|
Summary: Library to crack passwords using dictionaries
|
|
Requires: cracklib >= %{version}
|
|
|
|
%description -n libcrack2
|
|
CrackLib tests passwords to determine whether they match
|
|
certainsecurity-oriented characteristics. You can use CrackLib to
|
|
stopusers from choosing passwords that are too simple.This package
|
|
contains a full dictionary file used by cracklib.
|
|
|
|
%package dict-small
|
|
License: Artistic
|
|
Summary: Small dictionary for cracklib - A Password-Checking Library
|
|
Group: System/Libraries
|
|
Provides: cracklib-dict
|
|
Conflicts: cracklib-dict-full
|
|
|
|
%description dict-small
|
|
CrackLib tests passwords to determine whether they match certain
|
|
security-oriented characteristics. You can use CrackLib to stop users
|
|
from choosing passwords that are easy to guess.
|
|
|
|
This package contains a small dictionay file used by cracklib.
|
|
|
|
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch
|
|
%patch2
|
|
|
|
%build
|
|
AUTOPOINT=true autoreconf -fi
|
|
%configure --disable-static --with-pic
|
|
%{__make} %{?jobs:-j%jobs}
|
|
make -C po update-po
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%install
|
|
mkdir -p $RPM_BUILD_ROOT/usr/lib
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
# libtool is broken by design, remove this *.la files ...
|
|
rm $RPM_BUILD_ROOT/%{_libdir}/libcrack.la
|
|
# set executable
|
|
chmod 755 ./util/cracklib-format
|
|
# Adjust path in comment
|
|
sed "s,/usr/lib/cracklib_dict,%{_datadir}/cracklib/pw_dict,g" lib/crack.h > $RPM_BUILD_ROOT/%{_includedir}/crack.h
|
|
./util/cracklib-format ./dicts/cracklib-small | \
|
|
./util/cracklib-packer $RPM_BUILD_ROOT/%{_datadir}/cracklib/pw_dict
|
|
ln -s cracklib-format $RPM_BUILD_ROOT/%{_sbindir}/mkdict
|
|
ln -s cracklib-packer $RPM_BUILD_ROOT/%{_sbindir}/packer
|
|
rm -f $RPM_BUILD_ROOT/%{_datadir}/cracklib/cracklib-small
|
|
ln -sf %{_datadir}/cracklib/pw_dict.hwm $RPM_BUILD_ROOT/usr/lib/cracklib_dict.hwm
|
|
ln -sf %{_datadir}/cracklib/pw_dict.pwd $RPM_BUILD_ROOT/usr/lib/cracklib_dict.pwd
|
|
ln -sf %{_datadir}/cracklib/pw_dict.pwi $RPM_BUILD_ROOT/usr/lib/cracklib_dict.pwi
|
|
#
|
|
# using zip'ed dict takes too long for a check. But the support
|
|
# for this is still in the lib.
|
|
#
|
|
#gzip $RPM_BUILD_ROOT/%{_datadir}/cracklib/pw_dict.pwd
|
|
#ln -sf %{_datadir}/cracklib/pw_dict.pwd.gz $RPM_BUILD_ROOT/usr/lib/cracklib_dict.pwd.gz
|
|
%{find_lang} %{name}
|
|
|
|
%post -n libcrack2 -p /sbin/ldconfig
|
|
|
|
%postun -n libcrack2 -p /sbin/ldconfig
|
|
|
|
%files -n libcrack2
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libcrack.so.2
|
|
%{_libdir}/libcrack.so.2.8.1
|
|
|
|
%files -f %{name}.lang
|
|
%defattr(-,root,root)
|
|
%doc README README-WORDS NEWS README-LICENSE README-DAWG AUTHORS COPYING.LIB
|
|
/usr/sbin/create-cracklib-dict
|
|
/usr/sbin/mkdict
|
|
/usr/sbin/packer
|
|
/usr/sbin/cracklib-check
|
|
/usr/sbin/cracklib-format
|
|
/usr/sbin/cracklib-packer
|
|
/usr/sbin/cracklib-unpacker
|
|
%dir %{_datadir}/cracklib
|
|
%{_datadir}/cracklib/cracklib.magic
|
|
/usr/lib/cracklib_dict.hwm
|
|
/usr/lib/cracklib_dict.pwd
|
|
/usr/lib/cracklib_dict.pwi
|
|
|
|
%files devel
|
|
%defattr(644,root,root,755)
|
|
%{_includedir}/crack.h
|
|
%{_includedir}/packer.h
|
|
%{_libdir}/libcrack.so
|
|
|
|
%files dict-small
|
|
%defattr(-,root,root)
|
|
%{_datadir}/cracklib/pw_dict.hwm
|
|
%{_datadir}/cracklib/pw_dict.pwd
|
|
%{_datadir}/cracklib/pw_dict.pwi
|
|
|
|
%changelog
|