]> git.pld-linux.org Git - packages/pinentry0.8.git/blob - pinentry.spec
- build also pinentry-tty for dumb terminals
[packages/pinentry0.8.git] / pinentry.spec
1 # TODO: use system libassuan 2 instead of included libassuan 1
2 #
3 # Conditional build:
4 %bcond_without  gtk     # without GTK+ 1.x dialog
5 %bcond_without  gtk2    # without GTK+ 2 dialog
6 %bcond_without  qt      # without Qt dialog
7 %bcond_without  qt4     # without Qt4 dialog
8 #
9 Summary:        Simple PIN or passphrase entry dialogs
10 Summary(pl.UTF-8):      Proste kontrolki dialogowe do wpisywania PIN-ów lub haseł
11 Name:           pinentry
12 Version:        0.8.4
13 Release:        2
14 License:        GPL v2+
15 Group:          Applications
16 Source0:        ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.bz2
17 # Source0-md5:  e2b6f94471ba1e978f6e5bf6b275189b
18 Patch0:         %{name}-system-assuan.patch
19 Patch1:         %{name}-info.patch
20 Patch2:         %{name}-am.patch
21 Patch3:         %{name}-doc.patch
22 Patch4:         %{name}-activate.patch
23 URL:            http://www.gnupg.org/
24 %{?with_qt4:BuildRequires:      QtGui-devel}
25 BuildRequires:  autoconf >= 2.57
26 BuildRequires:  automake >= 1:1.10
27 BuildRequires:  gettext-devel
28 %{?with_gtk:BuildRequires:      gtk+-devel >= 1.2.0}
29 %{?with_gtk2:BuildRequires:     gtk+2-devel >= 2:2.4.0}
30 #BuildRequires: libassuan-devel
31 BuildRequires:  libcap-devel
32 BuildRequires:  libstdc++-devel
33 BuildRequires:  ncurses-devel
34 BuildRequires:  pkgconfig
35 %{?with_qt:BuildRequires:       qt-devel}
36 %{?with_qt4:BuildRequires:      qt4-build}
37 BuildRequires:  texinfo
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
43 http://www.gnupg.org/aegypten/ for details. Base package contains
44 curses-based dialog.
45
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.
51
52 %package gtk
53 Summary:        Simple PIN or passphrase entry dialog for GTK+ 1.x
54 Summary(pl.UTF-8):      Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla GTK+ 1.x
55 Group:          X11/Applications
56
57 %description gtk
58 Simple PIN or passphrase entry dialog for GTK+ 1.x.
59
60 %description gtk -l pl.UTF-8
61 Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla GTK+
62 1.x.
63
64 %package gtk2
65 Summary:        Simple PIN or passphrase entry dialog for GTK+ 2
66 Summary(pl.UTF-8):      Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla GTK+ 2
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
73 %description gtk2 -l pl.UTF-8
74 Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla GTK+ 2.
75
76 %package qt
77 Summary:        Simple PIN or passphrase entry dialog for Qt
78 Summary(pl.UTF-8):      Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla Qt
79 Group:          X11/Applications
80
81 %description qt
82 Simple PIN or passphrase entry dialog for Qt.
83
84 %description qt -l pl.UTF-8
85 Prosta kontrolka dialogowa do wpisywania PIN-ów lub haseł dla Qt.
86
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
98 %prep
99 %setup -q
100 #patch0 -p1
101 %patch1 -p1
102 %patch2 -p1
103 %patch3 -p1
104 %patch4 -p1
105
106 %if %{with qt4}
107 cd qt4
108 %{_bindir}/moc-qt4 pinentrydialog.h  -o pinentrydialog.moc
109 %{_bindir}/moc-qt4 pinentryconfirm.h -o pinentryconfirm.moc
110 %{_bindir}/moc-qt4 qsecurelineedit.h -o qsecurelineedit.moc
111 cd ..
112 %endif
113
114 #%{__rm} assuan/*.h
115
116 %build
117 %{__aclocal} -I m4
118 %{__autoconf}
119 %{__autoheader}
120 %{__automake}
121 CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
122 %configure \
123         --enable-maintainer-mode \
124         --enable-fallback-curses \
125         --enable-pinentry-curses \
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} \
130         --enable-pinentry-tty \
131         --with-qt-includes=%{_includedir}/qt
132
133 %{__make}
134
135 %install
136 rm -rf $RPM_BUILD_ROOT
137
138 %{__make} install \
139         DESTDIR=$RPM_BUILD_ROOT
140
141 %{__rm} $RPM_BUILD_ROOT%{_bindir}/pinentry
142 cat >$RPM_BUILD_ROOT%{_bindir}/pinentry <<'EOF'
143 #!/bin/sh
144
145 if [ -n "$PINENTRY_PROGRAM" ]; then
146         exec $PINENTRY_PROGRAM "$@"
147 elif [ -z "$DISPLAY" ]; then
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 "$@"
153 elif [ -x %{_bindir}/pinentry-qt4 ]; then
154         exec %{_bindir}/pinentry-qt4 "$@"
155 elif [ -x %{_bindir}/pinentry-qt ]; then
156         exec %{_bindir}/pinentry-qt "$@"
157 else
158         exec %{_bindir}/pinentry-curses "$@"
159 fi
160 EOF
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %post   -p /sbin/postshell
166 -/usr/sbin/fix-info-dir -c %{_infodir}
167
168 %postun -p /sbin/postshell
169 -/usr/sbin/fix-info-dir -c %{_infodir}
170
171 %files
172 %defattr(644,root,root,755)
173 %doc AUTHORS ChangeLog NEWS README THANKS TODO
174 %attr(755,root,root) %{_bindir}/pinentry
175 %attr(755,root,root) %{_bindir}/pinentry-curses
176 %attr(755,root,root) %{_bindir}/pinentry-tty
177 %{_infodir}/pinentry.info*
178
179 %if %{with gtk}
180 %files gtk
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_bindir}/pinentry-gtk
183 %endif
184
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
191 %if %{with qt}
192 %files qt
193 %defattr(644,root,root,755)
194 %attr(755,root,root) %{_bindir}/pinentry-qt
195 %endif
196
197 %if %{with qt4}
198 %files qt4
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_bindir}/pinentry-qt4
201 %endif
This page took 0.081735 seconds and 3 git commands to generate.