~x2go/x2go/pinentry-x2go_master

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Name:           pinentry-x2go
Version:        0.7.5.11
Release:        0.0x2go1%{?dist}
Group:          Applications/Communications
Summary:        Qt5-based PIN or pass-phrase entry dialog for x2goclient
License:        GPL-2.0
URL:            http://www.x2go.org/
Source0:        http://code.x2go.org/releases/source/%name/%name-%version.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf >= 2.57, automake >= 1.7.6
BuildRequires:  ncurses-devel
%if 0%{?suse_version}
BuildRequires:  libqt5-qtbase-devel
BuildRequires:  libqt5-linguist
%else
BuildRequires:  qt5-qtbase-devel
BuildRequires:  qt5-linguist
BuildRequires:  qt5-rpm-macros
%endif

%if 0%{?fedora} || 0%{?rhel}
# For some reason qt(4)-dev doesn't depend upon redhat-rpm-config,
# but the GCC spec file is still used, which leads to gcc failing
# due to a missing annobin plugin during compilation.
# Let's build-depend upon redhat-rpm-config for now manually.
BuildRequires:  redhat-rpm-config
%endif

%description
This package contains a program that allows for entry of PINs or pass
phrases. Based on original pinentry-qt software, modified for
x2goclient.

%prep
%setup -q

%build
if [ ! -e configure ]; then
	autoreconf -fi
fi
%configure
make %{?_smp_mflags}

%install
pushd pinentry-x2go/
# Why on earth does every goddamn build system have to use different names
# for DESTDIR, and force strip on us?
make install DESTDIR="%{buildroot}" INSTALL_ROOT="%{buildroot}" STRIP="true"
install -d -m 755 '%{buildroot}/%{_mandir}/man1/'
install -m 644 'pinentry-x2go.1' '%{buildroot}/%{_mandir}/man1/'
popd

%files
%defattr(-,root,root)
%{_bindir}/pinentry-x2go
%{_mandir}/man1/pinentry-x2go.1*

%changelog