1 |
commit: 0df0bc898208d08011c4cdad1c8321fc859261bf |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 11 11:19:35 2020 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 11 11:19:35 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0df0bc89 |
7 |
|
8 |
app-admin/keepass: version bump 2.45 |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org> |
12 |
|
13 |
app-admin/keepass/Manifest | 1 + |
14 |
app-admin/keepass/keepass-2.45.ebuild | 117 ++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 118 insertions(+) |
16 |
|
17 |
diff --git a/app-admin/keepass/Manifest b/app-admin/keepass/Manifest |
18 |
index 022fd5fc18a..847d764b1bc 100644 |
19 |
--- a/app-admin/keepass/Manifest |
20 |
+++ b/app-admin/keepass/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST KeePass-2.44-Source.zip 5182922 BLAKE2B 092d1b982d748ea1b13f26fe5423a491855cb491c80cae7632429d488f80fd730df5d2f1613bab528d55a3aadcf0cb4f4055a637d2b14b68a468e4baf9ab1837 SHA512 ef2ca69e40c0787b63fc30a2b222dd77fd9f0addf8593511dcd0a47580cc8de5e0900c7d4e6f77c0e5a49d1728286cf1b5856cdc65ef175e4acfdd1ffc54b55e |
23 |
+DIST KeePass-2.45-Source.zip 5011684 BLAKE2B cf7fafb2666f2e0005533e441f1855006aa64aca69b4829fa66117da88f92e6aa65d58b303a099221e796a500bc5abab5c3d0654e6fa53c3fe6f36d3cb18e381 SHA512 3f9b14e57fce047f8d8ae7c289fffd954545c5638fa20392e7864301073452a4353f487832730fb600e1729b1333360c1bce7e66fc8629788e666418a2afbf9a |
24 |
|
25 |
diff --git a/app-admin/keepass/keepass-2.45.ebuild b/app-admin/keepass/keepass-2.45.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..db354f61366 |
28 |
--- /dev/null |
29 |
+++ b/app-admin/keepass/keepass-2.45.ebuild |
30 |
@@ -0,0 +1,117 @@ |
31 |
+# Copyright 1999-2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+inherit desktop eutils xdg-utils |
37 |
+ |
38 |
+MY_PN="KeePass" |
39 |
+DESCRIPTION="A free, open source, light-weight and easy-to-use password manager" |
40 |
+HOMEPAGE="https://keepass.info/" |
41 |
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-${PV}-Source.zip" |
42 |
+ |
43 |
+LICENSE="GPL-2" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~amd64 ~x86" |
46 |
+IUSE="aot" |
47 |
+ |
48 |
+COMMON_DEPEND="dev-lang/mono" |
49 |
+DEPEND="${COMMON_DEPEND} |
50 |
+ app-arch/unzip |
51 |
+" |
52 |
+RDEPEND="${COMMON_DEPEND} |
53 |
+ dev-dotnet/libgdiplus[cairo] |
54 |
+" |
55 |
+ |
56 |
+S="${WORKDIR}" |
57 |
+PATCHES=( "${FILESDIR}/${PN}-2.36-xsl-path-detection.patch" ) |
58 |
+ |
59 |
+# bug #687052 |
60 |
+# file generated by mono --aot where *FLAGS don't make sense |
61 |
+QA_PREBUILT="usr/lib64/keepass/KeePass.exe.so" |
62 |
+ |
63 |
+src_prepare() { |
64 |
+ # KeePass looks for some XSL files in the same folder as the executable, |
65 |
+ # we prefer to have it in /usr/share/KeePass. Apply patch using base function. |
66 |
+ # This XSL file will not be upstreamed since the KeePass creator said that |
67 |
+ # including this patch would break the Portable USB version of KeePass |
68 |
+ # (which keeps/looks for xsl files in its own folder) |
69 |
+ default |
70 |
+ |
71 |
+ # Switch into build dir so the mono prepration script works correctly |
72 |
+ pushd Build || die |
73 |
+ source PrepMonoDev.sh || die |
74 |
+ popd || die |
75 |
+} |
76 |
+ |
77 |
+src_compile() { |
78 |
+ export MONO_REGISTRY_PATH=/dev/null # bug 659808 |
79 |
+ |
80 |
+ # Build with Release target |
81 |
+ xbuild /target:KeePass /property:Configuration=Release || die |
82 |
+ |
83 |
+ # Run Ahead Of Time compiler on the binary |
84 |
+ if use aot; then |
85 |
+ cp Ext/KeePass.exe.config Build/KeePass/Release/ || die |
86 |
+ mono --aot -O=all Build/KeePass/Release/KeePass.exe || die |
87 |
+ fi |
88 |
+} |
89 |
+ |
90 |
+src_install() { |
91 |
+ # Wrapper script to launch mono |
92 |
+ make_wrapper "${PN}" "mono /usr/$(get_libdir)/${PN}/KeePass.exe" |
93 |
+ |
94 |
+ # Some XSL files |
95 |
+ insinto "/usr/share/${PN}/XSL" |
96 |
+ doins Ext/XSL/* |
97 |
+ |
98 |
+ insinto "/usr/$(get_libdir)/${PN}" |
99 |
+ exeinto "/usr/$(get_libdir)/${PN}" |
100 |
+ |
101 |
+ doins Ext/KeePass.exe.config |
102 |
+ |
103 |
+ # Default configuration, simply says to use user-specific configuration |
104 |
+ doins Ext/KeePass.config.xml |
105 |
+ |
106 |
+ # The actual executable |
107 |
+ doexe Build/KeePass/Release/KeePass.exe |
108 |
+ |
109 |
+ # Copy the AOT compilation result |
110 |
+ if use aot; then |
111 |
+ doexe Build/KeePass/Release/KeePass.exe.so |
112 |
+ fi |
113 |
+ |
114 |
+ # Prepare the icons |
115 |
+ newicon -s 256 Ext/Icons_04_CB/Finals/plockb.png "${PN}.png" |
116 |
+ newicon -s 256 -t gnome -c mimetypes Ext/Icons_04_CB/Finals/plockb.png "application-x-${PN}2.png" |
117 |
+ |
118 |
+ # Create a desktop entry and associate it with the KeePass mime type |
119 |
+ make_desktop_entry "${PN}" "${MY_PN}" "${PN}" "System;Security" "MimeType=application/x-keepass2;\nStartupWMClass=KeePass2;" |
120 |
+ |
121 |
+ # MIME descriptor for .kdbx files |
122 |
+ insinto /usr/share/mime/packages |
123 |
+ doins "${FILESDIR}/${PN}.xml" |
124 |
+ |
125 |
+ # sed, because patching this really sucks |
126 |
+ sed -i 's/mono/mono --verify-all/g' "${D}/usr/bin/keepass" || die |
127 |
+} |
128 |
+ |
129 |
+pkg_postinst() { |
130 |
+ xdg_icon_cache_update |
131 |
+ xdg_desktop_database_update |
132 |
+ xdg_mimeinfo_database_update |
133 |
+ |
134 |
+ if ! has_version x11-misc/xdotool ; then |
135 |
+ elog "Optional dependencies:" |
136 |
+ elog " x11-misc/xdotool (enables autotype/autofill)" |
137 |
+ fi |
138 |
+ |
139 |
+ elog "Some systems may experience issues with copy and paste operations." |
140 |
+ elog "If you encounter this, please install x11-misc/xsel." |
141 |
+} |
142 |
+ |
143 |
+pkg_postrm() { |
144 |
+ xdg_icon_cache_update |
145 |
+ xdg_desktop_database_update |
146 |
+ xdg_mimeinfo_database_update |
147 |
+} |