[packages/keepass: 1/2] new, version 2.27
glen
glen at pld-linux.org
Sat Jan 24 14:20:17 CET 2015
commit e8670fae3915a75865f55a775e6c255a57c1e1c6
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Jan 24 15:17:56 2015 +0200
new, version 2.27
based on fedora package fbc16b6
keepass-appdata.patch | 25 +++++++++
keepass-desktop-integration.patch | 61 ++++++++++++++++++++
keepass-enable-local-help.patch | 57 +++++++++++++++++++
keepass-fix-XSL-search-path.patch | 35 ++++++++++++
keepass.spec | 115 ++++++++++++++++++++++++++++++++++++++
5 files changed, 293 insertions(+)
---
diff --git a/keepass.spec b/keepass.spec
new file mode 100644
index 0000000..0d73189
--- /dev/null
+++ b/keepass.spec
@@ -0,0 +1,115 @@
+#
+# Conditional build:
+%bcond_with doc # don't build doc
+
+Summary: Password manager
+Name: keepass
+Version: 2.27
+Release: 1
+License: GPL v2+
+Group: X11/Applications
+# Created with, e.g.:
+# version=2.25 tmpdir=`mktemp -d` && cd $tmpdir && curl -LRO http://downloads.sourceforge.net/project/keepass/KeePass%202.x/$version/KeePass-$version-Source.zip && mkdir keepass-$version && unzip -d keepass-$version KeePass-$version-Source.zip && find keepass-$version -name "*dll" -delete && tar -cJf keepass-$version.tar.xz keepass-$version
+Source0: http://pkgs.fedoraproject.org/repo/pkgs/keepass/%{name}-%{version}.tar.xz/5a4e243b7f3784db99a3f5e3ede2493b/keepass-%{version}.tar.xz
+# Source0-md5: 5a4e243b7f3784db99a3f5e3ede2493b
+# Upstream does not include a .desktop file, etc..
+Patch0: %{name}-desktop-integration.patch
+Patch3: %{name}-appdata.patch
+# Move XSL files to /usr/share/keepass:
+Patch1: %{name}-fix-XSL-search-path.patch
+# Locate locally-installed help files:
+Patch2: %{name}-enable-local-help.patch
+URL: http://keepass.info/
+%{?with_doc:BuildRequires: archmage}
+BuildRequires: desktop-file-utils
+BuildRequires: mono-devel
+BuildRequires: python-devel
+BuildRequires: rpmbuild(macros) >= 1.566
+BuildRequires: sed >= 4.0
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Requires: hicolor-icon-theme
+Requires: xdotool
+Requires: xsel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _appdir %{_prefix}/lib/%{name}
+
+%description
+KeePass is a free open source password manager, which helps you to
+remember your passwords in a secure way. You can put all your
+passwords in one database, which is locked with one master key or a
+key file. You only have to remember one single master password or
+select the key file to unlock the whole database.
+
+%package doc
+Summary: Documentation for the KeePass password manager
+BuildArch: noarch
+
+%description doc
+Documentation for KeePass, a free open source password manager.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%undos Docs/*.txt
+
+%build
+cd Build
+sh PrepMonoDev.sh
+cd -
+
+xbuild /target:KeePass /property:Configuration=Release
+%if %{with doc}
+%{__python} -c 'import archmod.CHM; archmod.CHM.CHMDir("Docs").process_templates("Docs/Chm")'
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_prefix}/lib/%{name},%{_datadir}/%{name}/XSL,%{_desktopdir},%{_bindir},%{_datadir}/mime/packages,%{_datadir}/icons/hicolor/256x256/apps,%{_mandir}/man1,%{_docdir}/%{name},%{_datadir}/appdata}
+
+install -p Build/KeePass/Release/KeePass.exe Ext/KeePass{.config.xml,.exe.config} $RPM_BUILD_ROOT%{_appdir}
+install -p Ext/XSL/{KDBX_DetailsFull.xsl,KDBX_DetailsLite.xsl,KDBX_PasswordsOnly.xsl,KDBX_Styles.css,KDBX_Tabular.xsl,TableHeader.gif} \
+ $RPM_BUILD_ROOT%{_datadir}/%{name}/XSL
+
+install -p -T Ext/Icons/Finals/plockb.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
+desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} dist/%{name}.desktop
+cp -p dist/%{name}.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages
+cp -p dist/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1
+cp -p dist/%{name}.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata
+install -p dist/%{name} $RPM_BUILD_ROOT%{_bindir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%update_desktop_database
+%update_icon_cache hicolor
+%update_mime_database
+
+%postun
+%update_desktop_database
+%update_icon_cache hicolor
+%update_mime_database
+
+%files
+%defattr(644,root,root,755)
+%doc Docs/{History.txt,License.txt}
+%attr(755,root,root) %{_bindir}/%{name}
+%{_mandir}/man1/%{name}.1*
+%{_prefix}/lib/%{name}
+%{_datadir}/%{name}
+%{_desktopdir}/%{name}.desktop
+%{_datadir}/appdata/keepass.appdata.xml
+%{_datadir}/mime/packages/keepass.xml
+%{_iconsdir}/hicolor/*/apps/keepass.png
+
+%if %{with doc}
+%files doc
+%defattr(644,root,root,755)
+%doc Docs/Chm/*
+%endif
diff --git a/keepass-appdata.patch b/keepass-appdata.patch
new file mode 100644
index 0000000..5837028
--- /dev/null
+++ b/keepass-appdata.patch
@@ -0,0 +1,25 @@
+--- keepass-2.26/dist/keepass.appdata.xml 1970-01-01 01:00:00.000000000 +0100
++++ keepass/dist/keepass.appdata.xml 2014-04-20 15:24:36.025952830 +0100
+@@ -0,0 +1,22 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!-- Copyright 2014 Peter Oliver <appdata at mavit.org.uk> -->
++<application>
++ <id type="desktop">keepass.desktop</id>
++ <metadata_license>CC0</metadata_license>
++ <name>KeePass</name>
++ <summary>Password manager</summary>
++ <description>
++ <p>
++ KeePass is a free open source password manager, which helps you to
++ remember your passwords securely. You can put all your
++ passwords in one database, which is locked with one master key or a
++ key file. You only have to remember one single master password or
++ select the key file to unlock the whole database.
++ </p>
++ </description>
++ <screenshots>
++ <screenshot type="default" width="624" height="351">http://mavit.fedorapeople.org/appdata/keepass-main-window.png</screenshot>
++ </screenshots>
++ <url type="homepage">http://keepass.info/</url>
++ <updatecontact>appdata at mavit.org.uk</updatecontact>
++</application>
diff --git a/keepass-desktop-integration.patch b/keepass-desktop-integration.patch
new file mode 100644
index 0000000..ca99a8c
--- /dev/null
+++ b/keepass-desktop-integration.patch
@@ -0,0 +1,61 @@
+diff -uNr keepass-2.26/dist/keepass keepass/dist/keepass
+--- keepass-2.26/dist/keepass 1970-01-01 01:00:00.000000000 +0100
++++ keepass/dist/keepass 2014-04-18 22:39:57.973399231 +0100
+@@ -0,0 +1,3 @@
++#!/bin/sh
++
++exec /usr/bin/mono /usr/lib/keepass/KeePass.exe "$@"
+diff -uNr keepass-2.26/dist/keepass.1 keepass/dist/keepass.1
+--- keepass-2.26/dist/keepass.1 1970-01-01 01:00:00.000000000 +0100
++++ keepass/dist/keepass.1 2014-04-18 22:39:50.906367857 +0100
+@@ -0,0 +1,23 @@
++.TH KEEPASS 1 "Mar 19, 2011"
++.SH NAME
++keepass \- password manager
++.SH SYNOPSIS
++.B keepass
++.SH DESCRIPTION
++\fBKeePass\fP is a free/open-source password manager or safe which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key file. So you only have to remember one single master password to unlock the whole database. The databases are encrypted using AES-256.
++.SH OPTIONS
++.TP
++\fB\-\-auto-type\fP
++invokes global auto-type
++.TP
++\fB\-\-lock-all\fP
++lock databases of all KeePass instances
++.TP
++\fB\-\-unlock-all\fP
++unlock databases of all KeePass instances
++.TP
++\fB\-\-exit-all\fP
++exit all KeePass instances
++.SH AUTHOR
++This manual page was written by Julian Taylor <jtaylor.debian at googlemail.com>,
++for the Debian project (but may be used by others).
+diff -uNr keepass-2.26/dist/keepass.desktop keepass/dist/keepass.desktop
+--- keepass-2.26/dist/keepass.desktop 1970-01-01 01:00:00.000000000 +0100
++++ keepass/dist/keepass.desktop 2014-04-18 22:39:35.719301001 +0100
+@@ -0,0 +1,10 @@
++[Desktop Entry]
++Name=KeePass
++GenericName=Password manager
++Exec=keepass %u
++Icon=keepass
++Terminal=false
++Type=Application
++StartupNotify=false
++Categories=Utility;
++MimeType=application/x-keepass2;
+diff -uNr keepass-2.26/dist/keepass.xml keepass/dist/keepass.xml
+--- keepass-2.26/dist/keepass.xml 1970-01-01 01:00:00.000000000 +0100
++++ keepass/dist/keepass.xml 2014-04-18 22:39:44.732340767 +0100
+@@ -0,0 +1,9 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
++ <mime-type type="application/x-keepass2">
++ <comment>KeePass 2 database</comment>
++ <comment xml:lang="de">KeePass 2 Datenbank</comment>
++ <glob pattern="*.kdbx"/>
++ <icon name="keepass"/>
++ </mime-type>
++</mime-info>
diff --git a/keepass-enable-local-help.patch b/keepass-enable-local-help.patch
new file mode 100644
index 0000000..bd6c67f
--- /dev/null
+++ b/keepass-enable-local-help.patch
@@ -0,0 +1,57 @@
+From: Julian Taylor <jtaylor.debian at googlemail.com>
+Date: Tue, 12 Jul 2011 21:51:43 +0200
+Subject: enable local help
+
+disable windows chm viewer and use x-www-browser to view docs
+located as html files in "/usr/share/doc/keepass2/Chm/help/"
+Forwarded: not-needed
+---
+ KeePass/App/AppHelp.cs | 19 ++++++++-----------
+ 1 file changed, 8 insertions(+), 11 deletions(-)
+
+--- a/KeePass/App/AppHelp.cs
++++ b/KeePass/App/AppHelp.cs
+@@ -58,7 +58,7 @@ namespace KeePass.App
+ {
+ if(m_strLocalHelpFile == null) return false;
+
+- try { return File.Exists(m_strLocalHelpFile); }
++ try { return Directory.Exists(@"/usr/share/doc/keepass/Chm/help/"); }
+ catch(Exception) { }
+ return false;
+ }
+@@ -114,14 +114,13 @@ namespace KeePass.App
+ private static void ShowHelpLocal(string strTopic, string strSection)
+ {
+ Debug.Assert(m_strLocalHelpFile != null);
+-
+- // Unblock CHM file for proper display of help contents
+- WinUtil.RemoveZoneIdentifier(m_strLocalHelpFile);
+-
+- string strCmd = "\"ms-its:" + m_strLocalHelpFile;
++
++ string strCmd = @"/usr/share/doc/keepass/Chm/help/";
+
+ if(strTopic != null)
+- strCmd += @"::/help/" + strTopic + ".html";
++ strCmd += strTopic + ".html";
++ else
++ strCmd += @"../index.html";
+
+ if(strSection != null)
+ {
+@@ -129,12 +128,10 @@ namespace KeePass.App
+ strCmd += @"#" + strSection;
+ }
+
+- strCmd += "\"";
+-
+- try { Process.Start(WinUtil.LocateSystemApp("hh.exe"), strCmd); }
++ try { Process.Start("x-www-browser", strCmd); }
+ catch(Exception exStart)
+ {
+- MessageService.ShowWarning(@"hh.exe " + strCmd, exStart);
++ MessageService.ShowWarning(@"x-www-browser " + strCmd, exStart);
+ }
+ }
+
diff --git a/keepass-fix-XSL-search-path.patch b/keepass-fix-XSL-search-path.patch
new file mode 100644
index 0000000..eb73bc6
--- /dev/null
+++ b/keepass-fix-XSL-search-path.patch
@@ -0,0 +1,35 @@
+From: Debian CLI Applications Team <pkg-cli-apps-team at lists.alioth.debian.org>
+Date: Tue, 21 Jun 2011 19:43:31 +0200
+Subject: fix XSL search path
+
+search for XSL files in /usr/share/keepass2
+
+Forwarded: not-needed
+---
+ KeePass/App/AppDefs.cs | 2 ++
+ KeePass/Forms/AboutForm.cs | 3 +--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/KeePass/App/AppDefs.cs
++++ b/KeePass/App/AppDefs.cs
+@@ -36,6 +36,8 @@ namespace KeePass.App
+ public static readonly Color ColorControlDisabled = SystemColors.Control;
+ public static readonly Color ColorEditError = Color.FromArgb(255, 192, 192);
+
++ public const string DebianDataDir = "/usr/share/keepass/";
++
+ public const string XslFilesDir = "XSL";
+ public const string XslFileHtmlLite = "KDBX_DetailsLite.xsl";
+ public const string XslFileHtmlFull = "KDBX_DetailsFull.xsl";
+--- a/KeePass/Forms/AboutForm.cs
++++ b/KeePass/Forms/AboutForm.cs
+@@ -89,8 +89,7 @@ namespace KeePass.Forms
+ m_lvComponents.Items.Add(lvi);
+
+ lvi = new ListViewItem(KPRes.XslStylesheetsKdbx);
+- string strPath = WinUtil.GetExecutable();
+- strPath = UrlUtil.GetFileDirectory(strPath, true, false);
++ string strPath = AppDefs.DebianDataDir;
+ strPath += AppDefs.XslFilesDir;
+ strPath = UrlUtil.EnsureTerminatingSeparator(strPath, false);
+ bool bInstalled = File.Exists(strPath + AppDefs.XslFileHtmlLite);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/keepass.git/commitdiff/789dedded0673d8af87f750c04bed13e0cc623bc
More information about the pld-cvs-commit
mailing list