6253ea3
Name:           keepassx
6253ea3
Version:        0.2.2
9df8eae
Release:        2%{?dist}
6253ea3
Summary:        Cross-platform password manager
6253ea3
6253ea3
Group:          User Interface/Desktops
6253ea3
License:        GPL
6253ea3
URL:            http://keepassx.sourceforge.net
6253ea3
Source0:        http://download.sf.net/keepassx/KeePassX-%{version}.tar.gz
9df8eae
Source1:        http://keepassx.sourceforge.net/images/logos/KeePassX_logo_100x100.png
9df8eae
Patch0:         keepass-0.2.2-htmlview.patch
9df8eae
Patch1:         keepassx-0.2.2-helpurl.patch
6253ea3
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
6253ea3
6253ea3
BuildRequires:  qt4-devel > 4.1, libXtst-devel, ImageMagick, desktop-file-utils
6253ea3
9df8eae
Requires:       hicolor-icon-theme, htmlview
6253ea3
6253ea3
%description
6253ea3
KeePassX is an application for people with extremly high demands on secure
6253ea3
personal data management.
6253ea3
KeePassX saves many different information e.g. user names, passwords, urls,
6253ea3
attachemts and comments in one single database. For a better management
6253ea3
user-defined titles and icons can be specified for each single entry.
6253ea3
Furthermore the entries are sorted in groups, which are customizable as well.
6253ea3
The integrated search function allows to search in a single group or the
6253ea3
complete database.
6253ea3
KeePassX offers a little utility for secure password generation. The password
6253ea3
generator is very customizable, fast and easy to use. Especially someone who
6253ea3
generates passwords frequently will appreciate this feature.
6253ea3
The complete database is always encrypted either with AES (alias Rijndael) or
6253ea3
Twofish encryption algorithm using a 256 bit key. Therefore the saved
6253ea3
information can be considered as quite safe. KeePassX uses a database format
6253ea3
that is compatible with KeePass Password Safe for MS Windows.
6253ea3
6253ea3
6253ea3
%prep
6253ea3
%setup -q
9df8eae
%patch0 -p0 -b .htmlview
9df8eae
%patch1 -p0 -b .helpurl
6253ea3
6253ea3
6253ea3
%build
6253ea3
export CFLAGS=$RPM_OPT_FLAGS
6253ea3
export CXXFLAGS=$RPM_OPT_FLAGS
6253ea3
qmake-qt4 PREFIX=%{_prefix}
6253ea3
make %{?_smp_mflags}
6253ea3
6253ea3
6253ea3
%install
6253ea3
rm -rf $RPM_BUILD_ROOT
6253ea3
make install INSTALL_ROOT=$RPM_BUILD_ROOT
6253ea3
6253ea3
# Icons
6253ea3
for size in 16 22 24 32 48 64 96 128; do
6253ea3
  mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}x${size}/apps
6253ea3
  convert -resize ${size}x${size} %{SOURCE1} \
6253ea3
    $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}x${size}/apps/keepassx.png
6253ea3
done
6253ea3
# Fix permissions
6253ea3
chmod -x $RPM_BUILD_ROOT%{_datadir}/keepass/icons/*.png
6253ea3
6253ea3
# Menu
6253ea3
cat > %{name}.desktop << EOF
6253ea3
[Desktop Entry]
6253ea3
Name=KeePassX
6253ea3
Comment=Password manager
6253ea3
Exec=keepass %f
6253ea3
Icon=keepassx.png
6253ea3
Type=Application
6253ea3
MimeType=application/x-keepass;
6253ea3
EOF
6253ea3
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
6253ea3
desktop-file-install  --vendor fedora \
6253ea3
        --dir $RPM_BUILD_ROOT%{_datadir}/applications \
6253ea3
        --add-category Utility \
6253ea3
        --add-category Qt \
6253ea3
        %{name}.desktop
6253ea3
6253ea3
# Associate KDB files
6253ea3
cat > x-keepass.desktop << EOF
6253ea3
[Desktop Entry]
6253ea3
Comment=
6253ea3
Hidden=false
6253ea3
Icon=keepassx.png
6253ea3
MimeType=application/x-keepass
6253ea3
Patterns=*.kdb;*.KDB
6253ea3
Type=MimeType
6253ea3
EOF
6253ea3
install -D -m 644 -p x-keepass.desktop \
6253ea3
  $RPM_BUILD_ROOT%{_datadir}/mimelnk/application/x-keepass.desktop
6253ea3
6253ea3
6253ea3
%post
6253ea3
touch --no-create %{_datadir}/icons/hicolor || :
6253ea3
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
6253ea3
    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
6253ea3
fi
6253ea3
update-desktop-database &> /dev/null ||:
6253ea3
6253ea3
%postun
6253ea3
touch --no-create %{_datadir}/icons/hicolor || :
6253ea3
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
6253ea3
    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
6253ea3
fi
6253ea3
update-desktop-database &> /dev/null ||:
6253ea3
6253ea3
6253ea3
%clean
6253ea3
rm -rf $RPM_BUILD_ROOT
6253ea3
6253ea3
6253ea3
%files
6253ea3
%defattr(-,root,root,-)
6253ea3
%doc share/keepass/license.html
6253ea3
%{_bindir}/keepass
6253ea3
%{_datadir}/keepass
6253ea3
%{_datadir}/applications/*.desktop
6253ea3
%{_datadir}/mimelnk/application/*.desktop
6253ea3
%{_datadir}/icons/hicolor/*/apps/keepassx.png
6253ea3
6253ea3
6253ea3
%changelog
9df8eae
* Wed Jun 27 2007 Aurelien Bompard <abompard@fedoraproject.org> 0.2.2-2
9df8eae
- fix help button
9df8eae
- use htmlview instead of the hardcoded konqueror
9df8eae
6253ea3
* Sun Mar 04 2007 Aurelien Bompard <abompard@fedoraproject.org> 0.2.2-1
6253ea3
- initial package