3 %bcond_with doc # don't build doc
5 %include /usr/lib/rpm/macros.mono
6 Summary: Password manager
11 Group: X11/Applications
13 # 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
14 Source0: http://pkgs.fedoraproject.org/repo/pkgs/keepass/%{name}-%{version}.tar.xz/5a4e243b7f3784db99a3f5e3ede2493b/keepass-%{version}.tar.xz
15 # Source0-md5: 5a4e243b7f3784db99a3f5e3ede2493b
16 # Upstream does not include a .desktop file, etc..
17 Patch0: %{name}-desktop-integration.patch
18 Patch3: %{name}-appdata.patch
19 # Move XSL files to /usr/share/keepass:
20 Patch1: %{name}-fix-XSL-search-path.patch
21 # Locate locally-installed help files:
22 Patch2: %{name}-enable-local-help.patch
23 URL: http://keepass.info/
24 %{?with_doc:BuildRequires: archmage}
25 BuildRequires: desktop-file-utils
26 BuildRequires: mono-devel
27 BuildRequires: python-devel
28 BuildRequires: rpmbuild(macros) >= 1.566
29 BuildRequires: rpmbuild(monoautodeps)
30 BuildRequires: sed >= 4.0
31 BuildRequires: tar >= 1:1.22
33 Requires: hicolor-icon-theme
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 %define _appdir %{_prefix}/lib/%{name}
42 KeePass is a free open source password manager, which helps you to
43 remember your passwords in a secure way. You can put all your
44 passwords in one database, which is locked with one master key or a
45 key file. You only have to remember one single master password or
46 select the key file to unlock the whole database.
49 Summary: Documentation for the KeePass password manager
50 %if "%{_rpmversion}" >= "5"
55 Documentation for KeePass, a free open source password manager.
71 xbuild /target:KeePass /property:Configuration=Release
73 %{__python} -c 'import archmod.CHM; archmod.CHM.CHMDir("Docs").process_templates("Docs/Chm")'
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT{%{_prefix}/lib/%{name}/plugins,%{_datadir}/%{name}/XSL,%{_desktopdir},%{_bindir},%{_datadir}/mime/packages,%{_iconsdir}/hicolor/256x256/apps,%{_mandir}/man1,%{_docdir}/%{name},%{_datadir}/appdata}
80 install -p Build/KeePass/Release/KeePass.exe Ext/KeePass{.config.xml,.exe.config} $RPM_BUILD_ROOT%{_appdir}
81 install -p Ext/XSL/{KDBX_DetailsFull.xsl,KDBX_DetailsLite.xsl,KDBX_PasswordsOnly.xsl,KDBX_Styles.css,KDBX_Tabular.xsl,TableHeader.gif} \
82 $RPM_BUILD_ROOT%{_datadir}/%{name}/XSL
84 install -p -T Ext/Icons/Finals/plockb.png $RPM_BUILD_ROOT%{_iconsdir}/hicolor/256x256/apps/%{name}.png
85 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} dist/%{name}.desktop
86 cp -p dist/%{name}.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages
87 cp -p dist/%{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1
88 cp -p dist/%{name}.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata
89 install -p dist/%{name} $RPM_BUILD_ROOT%{_bindir}
92 rm -rf $RPM_BUILD_ROOT
95 %update_desktop_database
96 %update_icon_cache hicolor
100 %update_desktop_database
101 %update_icon_cache hicolor
102 %update_mime_database
105 %defattr(644,root,root,755)
106 %doc Docs/{History.txt,License.txt}
107 %attr(755,root,root) %{_bindir}/%{name}
108 %{_mandir}/man1/%{name}.1*
109 %dir %{_prefix}/lib/%{name}
110 %attr(755,root,root) %{_prefix}/lib/%{name}/KeePass.exe
111 %{_prefix}/lib/%{name}/KeePass.config.xml
112 %{_prefix}/lib/%{name}/KeePass.exe.config
113 %dir %{_prefix}/lib/%{name}/plugins
115 %{_desktopdir}/%{name}.desktop
116 %{_datadir}/appdata/keepass.appdata.xml
117 %{_datadir}/mime/packages/keepass.xml
118 %{_iconsdir}/hicolor/*/apps/keepass.png
122 %defattr(644,root,root,755)