]> git.pld-linux.org Git - packages/keepass.git/blob - keepass.spec
add dir for plugins
[packages/keepass.git] / keepass.spec
1 #
2 # Conditional build:
3 %bcond_with     doc             # don't build doc
4
5 %include        /usr/lib/rpm/macros.mono
6 Summary:        Password manager
7 Name:           keepass
8 Version:        2.27
9 Release:        1
10 License:        GPL v2+
11 Group:          X11/Applications
12 # Created with, e.g.:
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
32 BuildRequires:  xz
33 Requires:       hicolor-icon-theme
34 Requires:       libgdiplus
35 Requires:       xdotool
36 Requires:       xsel
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         _appdir %{_prefix}/lib/%{name}
40
41 %description
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.
47
48 %package doc
49 Summary:        Documentation for the KeePass password manager
50 %if "%{_rpmversion}" >= "5"
51 BuildArch:      noarch
52 %endif
53
54 %description doc
55 Documentation for KeePass, a free open source password manager.
56
57 %prep
58 %setup -q
59 %patch0 -p1
60 %patch1 -p1
61 %patch2 -p1
62 %patch3 -p1
63
64 %undos Docs/*.txt
65
66 %build
67 cd Build
68 sh PrepMonoDev.sh
69 cd -
70
71 xbuild /target:KeePass /property:Configuration=Release
72 %if %{with doc}
73 %{__python} -c 'import archmod.CHM; archmod.CHM.CHMDir("Docs").process_templates("Docs/Chm")'
74 %endif
75
76 %install
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}
79
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
83
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}
90
91 %clean
92 rm -rf $RPM_BUILD_ROOT
93
94 %post
95 %update_desktop_database
96 %update_icon_cache hicolor
97 %update_mime_database
98
99 %postun
100 %update_desktop_database
101 %update_icon_cache hicolor
102 %update_mime_database
103
104 %files
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
114 %{_datadir}/%{name}
115 %{_desktopdir}/%{name}.desktop
116 %{_datadir}/appdata/keepass.appdata.xml
117 %{_datadir}/mime/packages/keepass.xml
118 %{_iconsdir}/hicolor/*/apps/keepass.png
119
120 %if %{with doc}
121 %files doc
122 %defattr(644,root,root,755)
123 %doc Docs/Chm/*
124 %endif
This page took 0.067478 seconds and 3 git commands to generate.