%define WITH_SELINUX 0

Summary: The passwd utility for setting/changing passwords using PAM.
Summary(ja): PAM を使用する、パスワードユーティリティ
Name: passwd
Version: 0.80
Release: 1%{?_dist_release}
Group: System Environment/Base
License: BSD
URL:    https://pagure.io/passwd
Source: https://pagure.io/passwd/archive/passwd-%{version}/passwd-passwd-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-root
Requires: pam >= 0.99, /etc/pam.d/system-auth
BuildRequires: glib2-devel, libuser-devel, pam-devel
BuildRequires: popt-devel

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke

%description
The passwd package contains a system utility (passwd) which sets
and/or changes passwords, using PAM (Pluggable Authentication
Modules).

To use passwd, you should have PAM installed on your system.

%description -l ja
passwdパッケージはパスワードを設定/変更する為のユーティリティです。
passwdは、PAM（Pluggable Authentication Modules）を使用します。

%prep
%setup -q -n passwd-passwd-%{version}

autoreconf -ivf

%build
%configure \
%if %{WITH_SELINUX}
	--with-selinux
%else
	--without-selinux
%endif
%__make %{?_smp_mflags} DEBUG= RPM_OPT_FLAGS="$RPM_OPT_FLAGS"

%install
%__make install DESTDIR=$RPM_BUILD_ROOT bindir=%{_bindir} mandir=%{_mandir}
strip $RPM_BUILD_ROOT%{_bindir}/passwd
install -m 755 -d $RPM_BUILD_ROOT/etc/pam.d/
install -m 644 passwd.pamd $RPM_BUILD_ROOT/etc/pam.d/passwd

#rm -f $RPM_BUILD_ROOT/%{_bindir}/{chfn,chsh}
#rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/{chfn,chsh}.*

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%license COPYING
%defattr(-,root,root)
%config /etc/pam.d/passwd
%attr(4511,root,root) %{_bindir}/passwd
%{_mandir}/man1/passwd.1*

%changelog
* Sun Mar 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.80-1
- updated to 0.80.

* Sun May 25 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 0.79-1
- update to 0.79

* Wed Apr 13 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.78-1
- new upstream release

* Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 0.71-1vl5
- applied new versioning policy, spec in utf-8

* Tue Mar 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.71-0vl1
- new upstream release
- build with pam-0.99.3.0

* Sat Apr 10 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 0.68-8vl1
- sync with fedora

* Thu Mar 27 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org>
- 0.64.1-4vl3
- rebuild with pam-0.75-48vl1

* Fri Aug 02 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org>
- 0.64.1-4vl2
- rebuild with pam-0.75-39vl1

* Wed Feb 21 2001 Kunio Murasawa <murasawa@marineroad.com>
- 0.64.1-4vl1
- added Japanese summary and description
- changed Buildroot

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Mon Jun  5 2000 Nalin Dahyabhai <nalin@redhat.com>
- move man pages to %{_mandir}

* Thu Jun  1 2000 Nalin Dahyabhai <nalin@redhat.com>
- modify PAM setup to use system-auth
- modify for building as non-root users

* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
- fix manpage links

* Fri Feb 04 2000 Nalin Dahyabhai <nalin@redhat.com>
- document --stdin in man page
- fix for gzipped man pages

* Sat Apr 10 1999 Cristian Gafton <gafton@redhat.com>
- first build from the new source code base.
