File makepasswd.spec of Package makepasswd

# vim: set sw=4 ts=4 et nu:

# Copyright (c) 2011-2012 Pascal Bleser <>
# 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

Name:           makepasswd
Version:        0.5.1
Release:        0
Summary:        Password Generator
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
%if 0%{?fedora_version} || 0%{?redhat_version} || 0%{?centos_version}
BuildRequires:  docbook2X
%define db2man db2x_docbook2man
%if 0%{?sles_version} == 10
BuildRequires:  perl-Archive-Tar

Makepasswd generates pseudo-random passwords of a desired length. It is able to
generate its crypted equivalent.

%setup -q

%__make %{?_smp_flags} \
    PREFIX="%{_prefix}" \
    BINDIR="%{_bindir}" \
    CC="%__cc" \
    CPPFLAGS="%{optflags} -Wall"

pushd doc
%db2man makepasswd.1.xml

%__make %{?_smp_flags} \
    DESTDIR="%{buildroot}" \
    PREFIX="%{_prefix}" \
    BINDIR="%{_bindir}" \
    CC="%__cc" \
    CPPFLAGS="%{optflags} -Wall" \

%__install -D -m0644 doc/MAKEPASSWD.1 "%{buildroot}%{_mandir}/man1/makepasswd.1"

%doc %{_mandir}/man1/makepasswd.1*