]>
Commit | Line | Data |
---|---|---|
b8ee488c | 1 | # TODO: use system libassuan 2 instead of included libassuan 1 |
62fef781 | 2 | # |
eab145d8 | 3 | # Conditional build: |
b0dc1498 JB |
4 | %bcond_without gtk # without GTK+ 1.x dialog |
5 | %bcond_without gtk2 # without GTK+ 2 dialog | |
38baca31 | 6 | %bcond_without qt # without Qt dialog |
0a2f23f9 | 7 | %bcond_without qt4 # without Qt4 dialog |
62fef781 | 8 | # |
62fef781 | 9 | Summary: Simple PIN or passphrase entry dialogs |
1aab1ca9 | 10 | Summary(pl.UTF-8): Proste kontrolki dialogowe do wpisywania PIN-ów lub haseł |
62fef781 | 11 | Name: pinentry |
baebdc9c | 12 | Version: 0.8.4 |
57d1a0c0 | 13 | Release: 2 |
067c4774 | 14 | License: GPL v2+ |
62fef781 | 15 | Group: Applications |
f5f63635 | 16 | Source0: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.bz2 |
baebdc9c | 17 | # Source0-md5: e2b6f94471ba1e978f6e5bf6b275189b |
103c95f9 | 18 | Patch0: %{name}-system-assuan.patch |
b0dc1498 | 19 | Patch1: %{name}-info.patch |
c9d6e302 | 20 | Patch2: %{name}-am.patch |
baebdc9c | 21 | Patch3: %{name}-doc.patch |
57d1a0c0 | 22 | Patch4: %{name}-activate.patch |
71ac4b65 | 23 | URL: http://www.gnupg.org/ |
d7f63b90 | 24 | %{?with_qt4:BuildRequires: QtGui-devel} |
38baca31 | 25 | BuildRequires: autoconf >= 2.57 |
f5f63635 | 26 | BuildRequires: automake >= 1:1.10 |
d7f63b90 | 27 | BuildRequires: gettext-devel |
38baca31 | 28 | %{?with_gtk:BuildRequires: gtk+-devel >= 1.2.0} |
b0dc1498 | 29 | %{?with_gtk2:BuildRequires: gtk+2-devel >= 2:2.4.0} |
b8ee488c | 30 | #BuildRequires: libassuan-devel |
eab145d8 JB |
31 | BuildRequires: libcap-devel |
32 | BuildRequires: libstdc++-devel | |
33 | BuildRequires: ncurses-devel | |
b0dc1498 | 34 | BuildRequires: pkgconfig |
38baca31 | 35 | %{?with_qt:BuildRequires: qt-devel} |
d7f63b90 | 36 | %{?with_qt4:BuildRequires: qt4-build} |
06695e14 | 37 | BuildRequires: texinfo |
62fef781 | 38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | %description | |
41 | This is a collection of simple PIN or passphrase entry dialogs which | |
42 | utilize the Assuan protocol as described by the aegypten project; see | |
eab145d8 JB |
43 | http://www.gnupg.org/aegypten/ for details. Base package contains |
44 | curses-based dialog. | |
62fef781 | 45 | |
f278f9cd JR |
46 | %description -l pl.UTF-8 |
47 | Jest to zestaw prostych kontrolek dialogowych do wpisywania PIN-ów lub | |
48 | haseł, używające protokołu Assuan opisanego w projekcie aegypten; | |
49 | więcej szczegółów pod adresem http://www.gnupg.org/aegypten/. | |
50 | Podstawowy pakiet zawiera kontrolkę opartą na curses. | |
eab145d8 JB |
51 | |
52 | %package gtk | |
b0dc1498 | 53 | Summary: Simple PIN or passphrase entry dialog for GTK+ 1.x |
1aab1ca9 | 54 | Summary(pl.UTF-8): Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla GTK+ 1.x |
eab145d8 JB |
55 | Group: X11/Applications |
56 | ||
57 | %description gtk | |
b0dc1498 | 58 | Simple PIN or passphrase entry dialog for GTK+ 1.x. |
eab145d8 | 59 | |
f278f9cd | 60 | %description gtk -l pl.UTF-8 |
941fba96 | 61 | Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla GTK+ |
62 | 1.x. | |
b0dc1498 JB |
63 | |
64 | %package gtk2 | |
65 | Summary: Simple PIN or passphrase entry dialog for GTK+ 2 | |
1aab1ca9 | 66 | Summary(pl.UTF-8): Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla GTK+ 2 |
b0dc1498 JB |
67 | Group: X11/Applications |
68 | Requires: gtk+2 >= 2:2.4.0 | |
69 | ||
70 | %description gtk2 | |
71 | Simple PIN or passphrase entry dialog for GTK+ 2. | |
72 | ||
f278f9cd JR |
73 | %description gtk2 -l pl.UTF-8 |
74 | Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla GTK+ 2. | |
eab145d8 JB |
75 | |
76 | %package qt | |
77 | Summary: Simple PIN or passphrase entry dialog for Qt | |
1aab1ca9 | 78 | Summary(pl.UTF-8): Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla Qt |
eab145d8 JB |
79 | Group: X11/Applications |
80 | ||
81 | %description qt | |
82 | Simple PIN or passphrase entry dialog for Qt. | |
83 | ||
f278f9cd JR |
84 | %description qt -l pl.UTF-8 |
85 | Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla Qt. | |
71ac4b65 | 86 | |
0a2f23f9 AM |
87 | %package qt4 |
88 | Summary: Simple PIN or passphrase entry dialog for Qt4 | |
89 | Summary(pl.UTF-8): Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla Qt4 | |
90 | Group: X11/Applications | |
91 | ||
92 | %description qt4 | |
93 | Simple PIN or passphrase entry dialog for Qt4. | |
94 | ||
95 | %description qt4 -l pl.UTF-8 | |
96 | Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla Qt4. | |
97 | ||
62fef781 | 98 | %prep |
067c4774 | 99 | %setup -q |
b8ee488c | 100 | #patch0 -p1 |
b0dc1498 | 101 | %patch1 -p1 |
7cabb71c | 102 | %patch2 -p1 |
c9d6e302 | 103 | %patch3 -p1 |
57d1a0c0 | 104 | %patch4 -p1 |
0a2f23f9 | 105 | |
d7f63b90 | 106 | %if %{with qt4} |
0a2f23f9 AM |
107 | cd qt4 |
108 | %{_bindir}/moc-qt4 pinentrydialog.h -o pinentrydialog.moc | |
baebdc9c | 109 | %{_bindir}/moc-qt4 pinentryconfirm.h -o pinentryconfirm.moc |
0a2f23f9 AM |
110 | %{_bindir}/moc-qt4 qsecurelineedit.h -o qsecurelineedit.moc |
111 | cd .. | |
d7f63b90 | 112 | %endif |
0a2f23f9 | 113 | |
f5f63635 | 114 | #%{__rm} assuan/*.h |
62fef781 | 115 | |
116 | %build | |
b0dc1498 | 117 | %{__aclocal} -I m4 |
38baca31 JB |
118 | %{__autoconf} |
119 | %{__autoheader} | |
120 | %{__automake} | |
941fba96 | 121 | CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" |
62fef781 | 122 | %configure \ |
3c1f46c7 | 123 | --enable-maintainer-mode \ |
eab145d8 JB |
124 | --enable-fallback-curses \ |
125 | --enable-pinentry-curses \ | |
f5f63635 JB |
126 | --enable-pinentry-gtk%{!?with_gtk:=no} \ |
127 | --enable-pinentry-gtk2%{!?with_gtk2:=no} \ | |
128 | --enable-pinentry-qt%{!?with_qt:=no} \ | |
129 | --enable-pinentry-qt4%{!?with_qt4:=no} \ | |
84e76dba | 130 | --enable-pinentry-tty \ |
d7f63b90 | 131 | --with-qt-includes=%{_includedir}/qt |
eab145d8 | 132 | |
62fef781 | 133 | %{__make} |
134 | ||
135 | %install | |
136 | rm -rf $RPM_BUILD_ROOT | |
62fef781 | 137 | |
38baca31 JB |
138 | %{__make} install \ |
139 | DESTDIR=$RPM_BUILD_ROOT | |
62fef781 | 140 | |
f5f63635 | 141 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/pinentry |
02694514 JB |
142 | cat >$RPM_BUILD_ROOT%{_bindir}/pinentry <<'EOF' |
143 | #!/bin/sh | |
144 | ||
7499c65d JB |
145 | if [ -n "$PINENTRY_PROGRAM" ]; then |
146 | exec $PINENTRY_PROGRAM "$@" | |
147 | elif [ -z "$DISPLAY" ]; then | |
02694514 JB |
148 | exec %{_bindir}/pinentry-curses "$@" |
149 | elif [ -x %{_bindir}/pinentry-gtk-2 ]; then | |
150 | exec %{_bindir}/pinentry-gtk-2 "$@" | |
151 | elif [ -x %{_bindir}/pinentry-gtk ]; then | |
152 | exec %{_bindir}/pinentry-gtk "$@" | |
651af089 AM |
153 | elif [ -x %{_bindir}/pinentry-qt4 ]; then |
154 | exec %{_bindir}/pinentry-qt4 "$@" | |
02694514 JB |
155 | elif [ -x %{_bindir}/pinentry-qt ]; then |
156 | exec %{_bindir}/pinentry-qt "$@" | |
157 | else | |
158 | exec %{_bindir}/pinentry-curses "$@" | |
f37d66a6 | 159 | fi |
02694514 JB |
160 | EOF |
161 | ||
62fef781 | 162 | %clean |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
b8975ffb | 165 | %post -p /sbin/postshell |
8685d250 | 166 | -/usr/sbin/fix-info-dir -c %{_infodir} |
3c1f46c7 | 167 | |
b8975ffb | 168 | %postun -p /sbin/postshell |
8685d250 | 169 | -/usr/sbin/fix-info-dir -c %{_infodir} |
3c1f46c7 | 170 | |
62fef781 | 171 | %files |
172 | %defattr(644,root,root,755) | |
eab145d8 | 173 | %doc AUTHORS ChangeLog NEWS README THANKS TODO |
02694514 | 174 | %attr(755,root,root) %{_bindir}/pinentry |
eab145d8 | 175 | %attr(755,root,root) %{_bindir}/pinentry-curses |
84e76dba | 176 | %attr(755,root,root) %{_bindir}/pinentry-tty |
3c1f46c7 | 177 | %{_infodir}/pinentry.info* |
eab145d8 | 178 | |
38baca31 | 179 | %if %{with gtk} |
eab145d8 JB |
180 | %files gtk |
181 | %defattr(644,root,root,755) | |
182 | %attr(755,root,root) %{_bindir}/pinentry-gtk | |
38baca31 | 183 | %endif |
eab145d8 | 184 | |
b0dc1498 JB |
185 | %if %{with gtk2} |
186 | %files gtk2 | |
187 | %defattr(644,root,root,755) | |
188 | %attr(755,root,root) %{_bindir}/pinentry-gtk-2 | |
189 | %endif | |
190 | ||
38baca31 | 191 | %if %{with qt} |
eab145d8 JB |
192 | %files qt |
193 | %defattr(644,root,root,755) | |
194 | %attr(755,root,root) %{_bindir}/pinentry-qt | |
38baca31 | 195 | %endif |
0a2f23f9 AM |
196 | |
197 | %if %{with qt4} | |
198 | %files qt4 | |
199 | %defattr(644,root,root,755) | |
200 | %attr(755,root,root) %{_bindir}/pinentry-qt4 | |
201 | %endif |