File makepasswd.spec of Package makepasswd
# vim: set sw=4 ts=4 et nu:
# Copyright (c) 2011-2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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/
Name: makepasswd
Version: 0.5.1
Release: 0
Summary: Password Generator
Source: http://www.defora.org/os/download/download/3670/makepasswd-%{version}.tar.gz
URL: http://www.defora.org/os/project/117/makepasswd
Group: Productivity/Security
License: GPL-3.0+
BuildRoot: %{_tmppath}/build-%{name}-%{version}
BuildRequires: gcc make
BuildRequires: libxslt-devel
%if 0%{?suse_version}
BuildRequires: docbook2x
%define db2man docbook-to-man
%endif
%if 0%{?fedora_version} || 0%{?redhat_version} || 0%{?centos_version}
BuildRequires: docbook2X
%define db2man db2x_docbook2man
%endif
%if 0%{?sles_version} == 10
BuildRequires: perl-Archive-Tar
%endif
%description
Makepasswd generates pseudo-random passwords of a desired length. It is able to
generate its crypted equivalent.
%prep
%setup -q
%build
%__make %{?_smp_flags} \
PREFIX="%{_prefix}" \
BINDIR="%{_bindir}" \
CC="%__cc" \
CPPFLAGS="%{optflags} -Wall"
pushd doc
%db2man makepasswd.1.xml
popd
%install
%__make %{?_smp_flags} \
DESTDIR="%{buildroot}" \
PREFIX="%{_prefix}" \
BINDIR="%{_bindir}" \
CC="%__cc" \
CPPFLAGS="%{optflags} -Wall" \
install
%__install -D -m0644 doc/MAKEPASSWD.1 "%{buildroot}%{_mandir}/man1/makepasswd.1"
%files
%defattr(-,root,root)
%{_bindir}/makepasswd
%doc %{_mandir}/man1/makepasswd.1*
%changelog