forked from openconnect/openconnect-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mingw-openconnect-gui.spec.in
163 lines (126 loc) · 5.25 KB
/
mingw-openconnect-gui.spec.in
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
%?mingw_package_header
%global gitsnapshot @ISSNAP@
%if 0%{?gitsnapshot}
%global snapcommit @SNAPCOMMIT@
%global snapcount @SNAPCOUNT@
%global shortcommit %(c=%{snapcommit}; echo ${c:0:7})
%global snapver .git.%{snapcount}.%{shortcommit}
%endif
%global tagver @VERSION@
Name: mingw-openconnect-gui
Version: %{tagver}%{?snapver}
Release: 0%{?dist}
Summary: Open client for Cisco AnyConnect VPN, Juniper Network Connect/Pulse, PAN GlobalProtect
License: LGPLv2
URL: http://www.infradead.org/openconnect-gui.html
%if 0%{?gitsnapshot}
Source0: https://github.com/openconnect-gui/%{name}/archive/%{snapcommit}/openconnect-gui-%{shortcommit}.tar.gz
%else
Source0: ftp://ftp.infradead.org/pub/%{name}/openconnect-gui-%{version}.tar.gz
%endif
Source2: gpgkey-BE07D9FD54809AB2C4B0FF5F63762CDA67E2F359.asc
Source3: macros.gpg
BuildRequires: cmake git
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-gettext
BuildRequires: mingw32-gnutls
BuildRequires: mingw32-p11-kit
BuildRequires: mingw32-libxml2
BuildRequires: mingw32-libxml2
BuildRequires: mingw32-openconnect
BuildRequires: mingw32-spdlog
BuildRequires: mingw32-qt5-qtbase
BuildRequires: wine-core(x86-32)
BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc
BuildRequires: mingw64-gcc-c++
BuildRequires: mingw64-gettext
BuildRequires: mingw64-gnutls
BuildRequires: mingw64-p11-kit
BuildRequires: mingw64-libxml2
BuildRequires: mingw64-openconnect
BuildRequires: mingw64-spdlog
BuildRequires: mingw64-qt5-qtbase
BuildRequires: wine-core(x86-64)
BuildRequires: mingw32-nsis
BuildRequires: pkgconfig automake autoconf libtool
BuildRequires: gettext-devel
%description
The Qt-based OpenConnect-GUI, cross-compiled for MinGW.
%?mingw_debug_package
# Win32
%package -n mingw32-openconnect-gui
Summary: OpenConnect VPN client GUI
%description -n mingw32-openconnect-gui
The OpenConnect multiprotocol VPN client GUI, cross-compiled for MinGW.
%package -n mingw32-openconnect-gui-installer
Summary: OpenConnect VPN client GUI installer
%description -n mingw32-openconnect-gui-installer
The OpenConnect multiprotocol VPN client GUI installer for 32-bit Windows.
# Win64
%package -n mingw64-openconnect-gui
Summary: OpenConnect VPN client GUI
Requires: pkgconfig
%description -n mingw64-openconnect-gui
The OpenConnect multiprotocol VPN client GUI, cross-compiled for MinGW.
%package -n mingw64-openconnect-gui-installer
Summary: OpenConnect VPN client GUI installer
%description -n mingw64-openconnect-gui-installer
The OpenConnect multiprotocol VPN client GUI for 64-bit Windows.
%include %SOURCE3
%prep
%if 0%{?gitsnapshot}
%setup -q -n openconnect-gui-%{shortcommit}
%else
%gpg_verify
%setup -q -n openconnect-gui-%{version}
%endif
%mingw_cmake .
# The dependencies for this are utterly hosed, and because it's using
# the "pointless new build system du jour" of five years ago, I have
# no idea how to fix them. Simply using add_dependencies() to try to
# make openconnect-gui depend on qt-solutions::qtsingleapplication
# doesn't appear to suffice. So just manually build it first.
make %{?_smp_mflags} V=1 -C build_win32 qt-solutions-master
make %{?_smp_mflags} V=1 -C build_win64 qt-solutions-master
%mingw_make %{?_smp_mflags} V=1
%install
# The project's "make install" is fairly hosed too, so just install
# openconnect-gui.exe manually.
mkdir -p $RPM_BUILD_ROOT/%{mingw32_bindir}
install -m0755 build_win32/bin/openconnect-gui.exe $RPM_BUILD_ROOT/%{mingw32_bindir}/openconnect-gui.exe
mkdir -p $RPM_BUILD_ROOT/%{mingw64_bindir}
install -m0755 build_win64/bin/openconnect-gui.exe $RPM_BUILD_ROOT/%{mingw64_bindir}/openconnect-gui.exe
#mingw_make install DESTDIR=$RPM_BUILD_ROOT
#install -m 0644 build_win32/openconnect-gui-installer.exe $RPM_BUILD_ROOT/%{mingw32_bindir}/openconnect-gui-installer-%{version}-%{release}.exe
#install -m 0644 build_win64/openconnect-gui-installer.exe $RPM_BUILD_ROOT/%{mingw64_bindir}/openconnect-gui-installer-%{version}-%{release}.exe
#rm -f $RPM_BUILD_ROOT/%{mingw32_libdir}/libopenconnect-gui.la
#rm -rf $RPM_BUILD_ROOT/%{mingw32_libexecdir}/openconnect-gui
#rm -rf $RPM_BUILD_ROOT/%{mingw32_mandir}/man8/openconnect-gui.8*
#rm -rf $RPM_BUILD_ROOT/%{mingw32_docdir}/openconnect-gui
#rm -rf $RPM_BUILD_ROOT/%{mingw32_datadir}/bash-completion
#rm -f $RPM_BUILD_ROOT/%{mingw64_libdir}/libopenconnect-gui.la
#rm -rf $RPM_BUILD_ROOT/%{mingw64_libexecdir}/openconnect-gui
#rm -rf $RPM_BUILD_ROOT/%{mingw64_mandir}/man8/openconnect-gui.8*
#rm -rf $RPM_BUILD_ROOT/%{mingw64_docdir}/openconnect-gui
#rm -rf $RPM_BUILD_ROOT/%{mingw64_datadir}/bash-completion
#%mingw_find_lang openconnect-gui
# Surely this is supposed to happen automatically... but it doesn't seem to.
%mingw_debug_install_post
#Win32
%files -n mingw32-openconnect-gui
%license LICENSE.txt
%{mingw32_bindir}/openconnect-gui.exe
#%files -n mingw32-openconnect-gui-installer
#{mingw32_bindir}/openconnect-gui-installer-*.exe
#Win64
%files -n mingw64-openconnect-gui
%license LICENSE.txt
%{mingw64_bindir}/openconnect-gui.exe
#%files -n mingw64-openconnect-gui-installer
#{mingw64_bindir}/openconnect-gui-installer-*.exe
%changelog
* Sun May 16 2021 David Woodhouse <[email protected]> - %{version}-%{release}
- Autopackaging for COPR