File tinyca2.spec of Package tinyca2

#
# spec file for package tinyca2
#
# Copyright (c) 2011 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:           tinyca2
BuildRequires:  update-desktop-files
Url:            http://tinyca.sm-zone.net/
%define	libdir		%{_datadir}/TinyCA2/lib
%define	templatesdir	%{_datadir}/TinyCA2/templates
%define	localedir	%{_datadir}/locale/
Group:          Productivity/Networking/Security
License:        GPLv2+
Requires:       perl perl-Gtk2 perl-MIME-Base64
Version:        0.7.5
Release:        57
Source0:        %{name}-%{version}.tar.bz2
Patch0:         0001-fix-combobox-strings-for-extended-key-usage.diff
Patch1:         0002-add-support-for-Microsoft-extendedKeyUsage-attributes.diff
Summary:        A Graphical Tool for Managing a Certification Authority
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       tinyca:/usr/bin/tinyca

%description 
TinyCA is a graphical tool to manage a small Certification Authority
(CA) using openssl.

TinyCA supports - creation and revocation of x509 - S/MIME
   certificates.

- PKCS#10 requests.

- exporting certificates as PEM, DER, TXT, and PKCS#12.

- server certificates for use in web servers, email servers, IPsec,
   and more.

- client certificates for use in web browsers, email clients, IPsec,
and more.



Authors:
--------
    Stephan Martin <sm@sm-zone.net>

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
# Configure pristine source
sed -i -e 's:./lib:%{libdir}:g;s:./templates:%{templatesdir}:g' tinyca2
sed -i -e '/bindtextdomain/d' tinyca2
make -C po

%install
install -d -m 755 %{buildroot}%{_bindir}
install -d -m 755 %{buildroot}%{libdir}
install -d -m 755 %{buildroot}%{libdir}/GUI
install -d -m 755 %{buildroot}%{templatesdir}
install -d -m 755 %{buildroot}/usr/share/applications
install -m 644 lib/*.pm %{buildroot}%{libdir}
install -m 644 lib/GUI/*.pm %{buildroot}%{libdir}/GUI
install -m 644 templates/openssl.cnf %{buildroot}%{templatesdir}
install -m 755 tinyca2 %{buildroot}%{_bindir}
pushd locale
for i in *; do
	install -d -m 755 %{buildroot}%{localedir}/$i/LC_MESSAGES
	install -m 644 $i/LC_MESSAGES/tinyca2.mo %{buildroot}%{localedir}/$i/LC_MESSAGES/
done
popd
cat > %buildroot/usr/share/applications/tinyca2.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Type=Application
GenericName=Tool to manage a Certification Authority
Name=TinyCA2
Exec=tinyca2
EOF
%suse_update_desktop_file tinyca2 Security Utility
%find_lang %{name}

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%doc CHANGES
%dir %{_datadir}/TinyCA2
%dir %{_datadir}/TinyCA2/lib
%dir %{_datadir}/TinyCA2/templates
%{_datadir}/TinyCA2/lib/*
%{_datadir}/TinyCA2/templates/*
%{_bindir}/tinyca2
%{_datadir}/applications/*

%changelog
openSUSE Build Service is sponsored by