summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2012-08-04 14:21:04 +0000
committerMichael Palimaka <kensington@gentoo.org>2012-08-04 14:21:04 +0000
commit2fdf39e877620b8dbadf20052667ea4c9cb17fd5 (patch)
tree52aa0b116e92a94e1554f73cf604ba04ffe975c0 /app-admin
parentx11-drivers/xf86-video-intel: Bump to 2.20.3 (diff)
downloadhistorical-2fdf39e877620b8dbadf20052667ea4c9cb17fd5.tar.gz
historical-2fdf39e877620b8dbadf20052667ea4c9cb17fd5.tar.bz2
historical-2fdf39e877620b8dbadf20052667ea4c9cb17fd5.zip
Initial import for bug #371723. Ebuild by Alessandro Di Federico <ale@clearmind.me>.
Package-Manager: portage-2.1.11.9/cvs/Linux x86_64
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/keepass/ChangeLog12
-rw-r--r--app-admin/keepass/Manifest21
-rw-r--r--app-admin/keepass/files/keepass-2.19-skip-sgen-if-unix.patch18
-rw-r--r--app-admin/keepass/files/keepass-2.19-xsl-path-detection.patch43
-rw-r--r--app-admin/keepass/files/keepass.xml9
-rw-r--r--app-admin/keepass/keepass-2.19.ebuild100
-rw-r--r--app-admin/keepass/metadata.xml19
7 files changed, 222 insertions, 0 deletions
diff --git a/app-admin/keepass/ChangeLog b/app-admin/keepass/ChangeLog
new file mode 100644
index 000000000000..24cdd79dc85e
--- /dev/null
+++ b/app-admin/keepass/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for app-admin/keepass
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/keepass/ChangeLog,v 1.1 2012/08/04 14:21:04 kensington Exp $
+
+*keepass-2.19 (04 Aug 2012)
+
+ 04 Aug 2012; Michael Palimaka <kensington@gentoo.org>
+ +files/keepass-2.19-skip-sgen-if-unix.patch,
+ +files/keepass-2.19-xsl-path-detection.patch, +files/keepass.xml,
+ +keepass-2.19.ebuild, +metadata.xml:
+ Initial import for bug #371723. Ebuild by Alessandro Di Federico
+ <ale@clearmind.me>.
diff --git a/app-admin/keepass/Manifest b/app-admin/keepass/Manifest
new file mode 100644
index 000000000000..5eb8b1070b56
--- /dev/null
+++ b/app-admin/keepass/Manifest
@@ -0,0 +1,21 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX keepass-2.19-skip-sgen-if-unix.patch 839 SHA256 5c17b676df36e763275c71f369c68ad86a793341c0ab65d4adde9c09e63347a5 SHA512 44e9da9480f75cd6837cf802607b3ae9df121f8a9c4b6755ae4b330297478a1f649128431061138426d7ab24b2fc53b368dea41d0096510c94460f1dfad84a59 WHIRLPOOL 2754389e8cbd832fd3a10c35e93a9167d96228c943f50e3c5fa294ecbb95cd1a0ad03b7b478e6e96d3cb2c02e08078bc64e151f9b334c8846786af4e599d4003
+AUX keepass-2.19-xsl-path-detection.patch 1499 SHA256 a187a1923c4373ce60aba9bc62c24180c343a4f637d3799832d8aca7e6324682 SHA512 de61a588f7544fad1994321d49ad6c7c3902825ba70a4fa93fdb7bbb474369d5ee06cdc5095296c97028d32bcbaf3414c02bf5146e03e72e260c13408d5ded8e WHIRLPOOL e76b2bc8dc57aed4c503dddd27de28bf8d1864dfa55a427ce840fc7018709bc9ce63553804d0e51eebe619fd95d42b21be383708a8db8afcfd10db1e6f053978
+AUX keepass.xml 275 SHA256 14e15149e0b9177008cc1fb67e57ef83e2c8663846403dfdf2411c77ebb3ee3f SHA512 a6055604ff4ff9e905012b5f8448540ea3b3fa8527ce1fd247fe4e5329e6861e5e7a01ea5ed907c41c073d81ee02452392ea0b0d61bf1119dadd300911a450fb WHIRLPOOL d0ee272ae608241ca67a0a2d1365d37e19b86ce4a7baede55f7094f8b1b58671935a753fa3f9859777c0bef2ee47a36b418165e5e6c894bfa6e634f965abd57e
+DIST KeePass-2.19-Source.zip 3338045 SHA256 772a223ca9a799176fb6e473527bfc756663a57c322241002e6b81638e5e7bef SHA512 27c22552ccf6ec55d430bd90d8f79ac70ff11cf674240cb16575ba8342eee44a0079ee8ab8800b773985fb41b79875b7d88a54267989e3b7b2112732169093e0 WHIRLPOOL a9b5cb2adf48f90f1a922f9ed165cc3e3e95f21e5ed76a1ea6a40c8f1bea1d34ddf0417b7d372adcc557152ee762bfd0a80c8ac7f94da50cafe03fc4a35c22bc
+EBUILD keepass-2.19.ebuild 2569 SHA256 678eca1d10f512f14e3fc9262052dcc322c7ee84ca90eb01a8a220cf18a17ccb SHA512 c340cdb045b7c0dabd46a6a6fc9e4530cc6e3d8185fb951b4827bf4e75713dcdb1468d9b39ece18d6214b0562e164278305074bbd38feac02f0abef873ca90b5 WHIRLPOOL 8509d2c0ec6e79163998c41681ee6bacc61deb2c3a41eb6ad855cda4e4fe052498087a8b0a32619ba4939f788ef545358cc9f9e759c5f46b2dbe4a221922ea0b
+MISC ChangeLog 539 SHA256 1b6d2794462bb6e98da1bf3fe168a61dc1bcbd3f2f5534d00649f0ab0e548f7c SHA512 6149940997352f072553e8bd63e58923ccef9be0fc419065e007223fdcd3e336c86471b9e2d47879c1c402c8767d395f9d58b6041d503f64969a3df5f3ff3bed WHIRLPOOL 06e4f14c89aa296ffb63b9fc13795b359cb86f01de65411b8a67bb1afac408a4787a0ea04faae11c9efedbb555cf62c0a0095217524d76a5e3d76131c16cab07
+MISC metadata.xml 637 SHA256 48bf99013c8266faf11c6ed20ead4e25b5d081b9f8e9ce4a9ba0905db6a6c6d9 SHA512 954f9e9d800f2b25da7e82f7953b005e41d7d9a996dc261f0ebb9db3944db46d59815698274fda0f93c8fcce5b0563a5200fd09e42d59470bd734b4239841935 WHIRLPOOL 973ea44da3b79e5bef665a018c650a5cbd92e3291377c53dbb5e58c63cdd009e64df4d2ce59a5a6ad9e5ad04d8bacf6c2015f2f1917ed2f0645028cf06944f48
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iQEcBAEBCAAGBQJQHS/DAAoJEMbwO6tnXQ0ssKsIALd18hlGxtFVRAmV6c9SymlP
+4a+p0d0SomVJnBgbzqjKoHDEaudwgxQu7ke0rwws8V2YmcGOtEAQZ6Xl9zWwGB/k
+O+Lgrmcr4T7cLZlTQX1+mEWWcglnS+7Umf2P7dkGt8F5KgfPPLiqsf73JNZO9D5J
+sbNAOI04hRKWzoWhJKyfo1QHexETwLUWrC1hbtGkTpgFB71S8gzckJuoVGYdoYeD
+SKm/bVPYe5nO14oJ5gcqw7UmkrEjx6mls/U8HP1tNWd55wu8k6KSOD3WQqZ/aSXb
+cUKP9doFER4odPhqhOa7jfusLnNS1UGx/1Yk0vIx5EbAQCqoCORbHg1kWWLNSk0=
+=6Yto
+-----END PGP SIGNATURE-----
diff --git a/app-admin/keepass/files/keepass-2.19-skip-sgen-if-unix.patch b/app-admin/keepass/files/keepass-2.19-skip-sgen-if-unix.patch
new file mode 100644
index 000000000000..69abc95d1269
--- /dev/null
+++ b/app-admin/keepass/files/keepass-2.19-skip-sgen-if-unix.patch
@@ -0,0 +1,18 @@
+This patch is a workaround to disable the use of sgen.exe after the build,
+since sgen.exe is not available in Mono. The trick works because we use a
+syntax which is common to sh and cmd.exe, but we also use `true` which is part
+of UNIX coreutils.
+true || windows-part
+
+--- a/KeePass/KeePass.csproj
++++ b/KeePass/KeePass.csproj
+@@ -1249,6 +1249,6 @@
+ </Target>
+ -->
+ <PropertyGroup>
+- <PostBuildEvent>"$(FrameworkSDKDir)bin\sgen.exe" /assembly:"$(TargetPath)" /force /nologo /compiler:/keycontainer:VS_KEY_33430356D8D7D1B8 /compiler:/delaysign-</PostBuildEvent>
++ <PostBuildEvent>true || "$(FrameworkSDKDir)bin\sgen.exe" /assembly:"$(TargetPath)" /force /nologo /compiler:/keycontainer:VS_KEY_33430356D8D7D1B8 /compiler:/delaysign-</PostBuildEvent>
+ </PropertyGroup>
+-</Project>
+\ No newline at end of file
++</Project>
diff --git a/app-admin/keepass/files/keepass-2.19-xsl-path-detection.patch b/app-admin/keepass/files/keepass-2.19-xsl-path-detection.patch
new file mode 100644
index 000000000000..76b924111141
--- /dev/null
+++ b/app-admin/keepass/files/keepass-2.19-xsl-path-detection.patch
@@ -0,0 +1,43 @@
+KeePass looks for some resources (XSL files) in the executable directory,
+however under UNIX system this not a good idea, so we look into the
+CommonApplicationData SpecialFolder, which usually maps to "/usr/share/".
+So the final search path should be "/usr/share/KeePass/XSL/".
+
+--- a/KeePass/Forms/AboutForm.cs
++++ b/KeePass/Forms/AboutForm.cs
+@@ -31,9 +31,11 @@ using KeePass.UI;
+ using KeePass.Resources;
+ using KeePass.Util;
+ using KeePass.DataExchange;
++using KeePass.Native;
+
+ using KeePassLib;
+ using KeePassLib.Utility;
++using KeePassLib.Native;
+
+ namespace KeePass.Forms
+ {
+@@ -92,8 +94,21 @@ namespace KeePass.Forms
+ m_lvComponents.Items.Add(lvi);
+
+ lvi = new ListViewItem(KPRes.XslStylesheets);
+- string strPath = WinUtil.GetExecutable();
+- strPath = UrlUtil.GetFileDirectory(strPath, true, false);
++
++ string strPath;
++ if (NativeLib.IsUnix())
++ {
++ strPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
++ strPath = UrlUtil.EnsureTerminatingSeparator(strPath, false);
++ strPath += PwDefs.ShortProductName.ToLower();
++ strPath = UrlUtil.EnsureTerminatingSeparator(strPath, false);
++ }
++ else
++ {
++ strPath = WinUtil.GetExecutable();
++ strPath = UrlUtil.GetFileDirectory(strPath, true, false);
++ }
++
+ strPath += AppDefs.XslFilesDir;
+ strPath = UrlUtil.EnsureTerminatingSeparator(strPath, false);
+ bool bInstalled = File.Exists(strPath + AppDefs.XslFileHtmlLite);
diff --git a/app-admin/keepass/files/keepass.xml b/app-admin/keepass/files/keepass.xml
new file mode 100644
index 000000000000..5e3d80dcae7b
--- /dev/null
+++ b/app-admin/keepass/files/keepass.xml
@@ -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 database</comment>
+ <glob pattern="*.kdbx"/>
+ <icon name="keepass" />
+ </mime-type>
+</mime-info>
+
diff --git a/app-admin/keepass/keepass-2.19.ebuild b/app-admin/keepass/keepass-2.19.ebuild
new file mode 100644
index 000000000000..94d842392868
--- /dev/null
+++ b/app-admin/keepass/keepass-2.19.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/keepass/keepass-2.19.ebuild,v 1.1 2012/08/04 14:21:04 kensington Exp $
+
+EAPI=4
+
+inherit eutils fdo-mime gnome2-utils mono multilib
+
+MY_PN="KeePass"
+DESCRIPTION="A free, open source, light-weight and easy-to-use password manager"
+HOMEPAGE="http://keepass.info/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-${PV}-Source.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="aot"
+
+RDEPEND=">=dev-lang/mono-2.10.5"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ # Remove Windows-specific things
+ pushd Build || die
+ . PrepMonoDev.sh || die
+ popd || die
+
+ # sgen not available on mono
+ epatch "${FILESDIR}/${PN}-2.19-skip-sgen-if-unix.patch"
+
+ # KeePass looks for some XSL files in the same folder as the executable,
+ # we prefer to have it in /usr/share/KeePass
+ epatch "${FILESDIR}/${PN}-2.19-xsl-path-detection.patch"
+}
+
+src_compile() {
+ # Build with Release target
+ xbuild /target:KeePass /property:Configuration=Release || die
+
+ # Run Ahead Of Time compiler on the binary
+ if use aot; then
+ mono --aot -O=all Build/KeePass/Release/KeePass.exe || die
+ fi
+}
+
+src_install() {
+ # Wrapper script to launch mono
+ make_wrapper ${PN} "mono /usr/$(get_libdir)/${PN}/KeePass.exe"
+
+ # Some XSL files
+ insinto /usr/share/${PN}/XSL
+ doins Ext/XSL/*
+
+ insinto /usr/$(get_libdir)/${PN}/
+ exeinto /usr/$(get_libdir)/${PN}/
+ doins Ext/KeePass.exe.config
+ # Default configuration, simply says to use user-specific configuration
+ doins Ext/KeePass.config.xml
+
+ # The actual executable
+ doexe Build/KeePass/Release/KeePass.exe
+
+ # Copy the AOT compilation result
+ if use aot; then
+ doexe Build/KeePass/Release/KeePass.exe.so
+ fi
+
+ # Prepare the icons
+ newicon -s 256 Ext/Icons/Finals/plockb.png "${PN}.png"
+ newicon -s 256 -t gnome -c mimetypes Ext/Icons/Finals/plockb.png "application-x-${PN}2.png"
+
+ # Create a desktop entry and associate it with the KeePass mime type
+ make_desktop_entry ${PN} ${MY_PN} ${PN} "System;Security" "MimeType=application/x-keepass2;"
+
+ # MIME descriptor for .kdbx files
+ insinto /usr/share/mime/packages/
+ doins "${FILESDIR}/${PN}.xml"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+
+ elog "Optional dependencies:"
+ elog " x11-misc/xdotool (enables autotype)"
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
diff --git a/app-admin/keepass/metadata.xml b/app-admin/keepass/metadata.xml
new file mode 100644
index 000000000000..9db56bc586ef
--- /dev/null
+++ b/app-admin/keepass/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ale@clearmind.me</email>
+ <description>Maintainer. Assign bugs to him.</description>
+ </maintainer>
+ <maintainer>
+ <email>kensington@gentoo.org</email>
+ <description>Proxy maintainer. CC him on bugs.</description>
+ </maintainer>
+ <use>
+ <flag name="aot">Generate native code at build time, rather than runtime.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">keepass</remote-id>
+ <bugs-to>http://sourceforge.net/tracker/?group_id=95013</bugs-to>
+ </upstream>
+</pkgmetadata>