Package pam_userpass: Specfile

Name: pam_userpass
Version: 1.0.2
Release: alt6

Summary: Pluggable authentication module for USER/PASS-style protocols
License: LGPLv2+
Group: System/Base
Url: http://www.openwall.com/pam/

# ftp://ftp.openwall.com/pub/projects/pam/modules/pam_userpass/pam_userpass-%version.tar.gz
Source: pam_userpass-%version.tar

# due to PAM policy.
BuildRequires(pre): libpam0-devel
# due to change in format of PAM modules requirements.
BuildRequires: rpm-build >= 0:4.0.4-alt55

%set_pam_name %name

%package -n %pam_name
Summary: Pluggable authentication module for USER/PASS-style protocols
Group: System/Base
Provides: %name = %version-%release
Obsoletes: %name < %version-%release

%package devel
Summary: Library and header files for developing pam_userpass-aware applications
Group: Development/C
Requires: %pam_name = %version-%release, libpam-devel

%package devel-static
Summary: Development static pam_userpass library
Group: Development/C
Requires: %name-devel = %version-%release

%description
pam_userpass is a PAM authentication module for use specifically by
services implementing non-interactive protocols and wishing
to verify a username/password pair.  The module doesn't do
any actual authentication, - other modules, such as pam_tcb,
should be stacked to provide the authentication.

%description -n %pam_name
pam_userpass is a PAM authentication module for use specifically by
services implementing non-interactive protocols and wishing
to verify a username/password pair.  The module doesn't do
any actual authentication, - other modules, such as pam_tcb,
should be stacked to provide the authentication.

%description devel
pam_userpass is a PAM authentication module for use specifically by
services implementing non-interactive protocols and wishing
to verify a username/password pair.  The module doesn't do
any actual authentication, - other modules, such as pam_tcb,
should be stacked to provide the authentication.

This package contains development library and header files
required for building pam_userpass-aware applications.

%description devel-static
pam_userpass is a PAM authentication module for use specifically by
services implementing non-interactive protocols and wishing
to verify a username/password pair.  The module doesn't do
any actual authentication, - other modules, such as pam_tcb,
should be stacked to provide the authentication.

This package contains development static library.

%prep
%setup

%build
%make_build \
	CFLAGS="%optflags %optflags_shared -Iinclude" \
	SECUREDIR=/%_lib/security \
	LIBDIR=%_libdir \
	LDFLAGS= \
	#

%install
%makeinstall_std \
	SECUREDIR=/%_lib/security \
	LIBDIR=%_libdir \
	#

%define docdir %_docdir/%name-%version

rm -rf %buildroot%docdir
mkdir -p %buildroot%docdir/example
install -p -m644 LICENSE README %buildroot%docdir/
install -p -m644 example_userpass.c \
	%buildroot%docdir/example/
install -p -m644 conf/example_userpass \
	%buildroot%docdir/example/example_userpass.pamd

%files -n %pam_name
%_libdir/*.so.*
/%_lib/security/*
%dir %docdir
%docdir/[A-Z]*

%files devel
%_libdir/*.so
%_includedir/security/*
%dir %docdir
%docdir/example

%files devel-static
%_libdir/*.a

%changelog
* Thu Jan 24 2013 Dmitry V. Levin <ldv@altlinux.org> 1.0.2-alt6
- Fixed interpackage dependencies.

* Wed Mar 02 2011 Dmitry V. Levin <ldv@altlinux.org> 1.0.2-alt5
- Rebuilt for debuginfo.

* Mon Oct 18 2010 Dmitry V. Levin <ldv@altlinux.org> 1.0.2-alt4
- Rebuilt for soname set-versions.

* Mon Dec 01 2008 Dmitry V. Levin <ldv@altlinux.org> 1.0.2-alt3
- Removed obsolete %%post_ldconfig/%%postun_ldconfig calls.

* Tue Apr 10 2007 Dmitry V. Levin <ldv@altlinux.org> 1.0.2-alt2
- Gearified.

* Mon May 22 2006 Dmitry V. Levin <ldv@altlinux.org> 1.0.2-alt1
- Updated to 1.0.2.

* Fri May 19 2006 Dmitry V. Levin <ldv@altlinux.org> 1.0.1-alt1
- Updated to 1.0.1.

* Tue Mar 07 2006 Dmitry V. Levin <ldv@altlinux.org> 1.0-alt4
- Fixed build with --as-needed.

* Thu Jan 12 2006 Dmitry V. Levin <ldv@altlinux.org> 1.0-alt3
- Rebuilt for new style PAM dependencies generated by rpm-build-4.0.4-alt55.

* Wed Aug 10 2005 Dmitry V. Levin <ldv@altlinux.org> 1.0-alt2
- Restricted list of global symbols exported by library
  and pam module.

* Tue Apr 19 2005 Dmitry V. Levin <ldv@altlinux.org> 1.0-alt1
- Updated to 1.0.

* Tue Aug 03 2004 Dmitry V. Levin <ldv@altlinux.org> 0.9.1-alt2
- Added multilib support (#4892).

* Sat Jan 03 2004 Dmitry V. Levin <ldv@altlinux.org> 0.9.1-alt1
- Updated to 0.9.1
- Deal with compilation warnings generated by new gcc compiler.

* Tue Oct 07 2003 Dmitry V. Levin <ldv@altlinux.org> 0.9-alt2
- Updated to current PAM policy.

* Sat Apr 12 2003 Dmitry V. Levin <ldv@altlinux.org> 0.9-alt1
- Updated to 0.9:
  + alt-libpam_userpass patch merged upstream;
  + soname raised to libpam_userpass.so.1.

* Tue Apr 01 2003 Dmitry V. Levin <ldv@altlinux.org> 0.5.1-alt2
- Updated alt-libpam_userpass patch to make it more portable.
- Do not package /usr/include/security/_pam_userpass.h file.
- Build static library (packaged in separate subpackage).

* Thu Oct 10 2002 Dmitry V. Levin <ldv@altlinux.org> 0.5.1-alt1
- Updated to 0.5.1: use const within the declaration of
  pam_userpass_t, use '=' instead of '.set' to declare the alias.

* Mon Dec 17 2001 Dmitry V. Levin <ldv@altlinux.org> 0.5-alt3
- Added lib%name library.
- Fixed linking flags.
- Moved development library and include files into devel subpackage.
- Changed pam_userpass_t members fom char* to const char*.

* Tue Nov 13 2001 Dmitry V. Levin <ldv@altlinux.org> 0.5-alt2
- Added Url (thanks to Solar for the hint).

* Mon Nov 12 2001 Dmitry V. Levin <ldv@altlinux.org> 0.5-alt1
- 0.5.

* Thu Sep 13 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.4-alt1
- 0.4.

* Tue May 29 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.3-alt1
- ALT adaptions.

* Tue Dec 19 2000 Solar Designer <solar@owl.openwall.com>
- Added "-Wall -fPIC" to the CFLAGS.

* Fri Aug 18 2000 Solar Designer <solar@owl.openwall.com>
- 0.3, added README.

* Sun Jul 09 2000 Solar Designer <solar@owl.openwall.com>
- Initial version.