forked from openconnect/openconnect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mingw-openconnect.spec.in
137 lines (111 loc) · 3.91 KB
/
mingw-openconnect.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
%?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
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.html
%if 0%{?gitsnapshot}
Source0: https://github.com/openconnect/%{name}/archive/%{snapcommit}/openconnect-%{shortcommit}.tar.gz
%else
Source0: ftp://ftp.infradead.org/pub/%{name}/openconnect-%{version}.tar.gz
%endif
Source2: gpgkey-BE07D9FD54809AB2C4B0FF5F63762CDA67E2F359.asc
Source3: macros.gpg
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-zlib
BuildRequires: mingw32-lz4
BuildRequires: mingw32-stoken
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-zlib
BuildRequires: mingw64-lz4
BuildRequires: mingw64-stoken
BuildRequires: wine-core(x86-64)
BuildRequires: pkgconfig automake autoconf libtool
BuildRequires: gettext-devel
%description
The OpenConnect multiprotocol VPN client library, cross-compiled for MinGW.
%?mingw_debug_package
# Win32
%package -n mingw32-openconnect
Summary: OpenConnect VPN client library
Requires: pkgconfig
%description -n mingw32-openconnect
The OpenConnect multiprotocol VPN client library, cross-compiled for MinGW.
# Win32
%package -n mingw64-openconnect
Summary: OpenConnect VPN client library
Requires: pkgconfig
%description -n mingw64-openconnect
The OpenConnect multiprotocol VPN client library, cross-compiled for MinGW.
%include %SOURCE3
%prep
%if 0%{?gitsnapshot}
%setup -q -n openconnect-%{shortcommit}
NOCONFIGURE=x ./autogen.sh
%else
%gpg_verify
%setup -q
if [ ! -x configure ]; then
NOCONFIGURE=x ./autogen.sh
fi
%endif
%mingw_configure --with-vpnc-script=vpnc-script-win.js \
--without-gnutls-version-check --disable-dsa-tests \
--sbindir='${exec_prefix}/bin'
%mingw_make %{?_smp_mflags} V=1
%install
%mingw_make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%{mingw32_libdir}/libopenconnect.la
rm -rf $RPM_BUILD_ROOT/%{mingw32_libexecdir}/openconnect
rm -rf $RPM_BUILD_ROOT/%{mingw32_mandir}/man8/openconnect.8*
rm -rf $RPM_BUILD_ROOT/%{mingw32_docdir}/openconnect
rm -rf $RPM_BUILD_ROOT/%{mingw32_datadir}/bash-completion
rm -f $RPM_BUILD_ROOT/%{mingw64_libdir}/libopenconnect.la
rm -rf $RPM_BUILD_ROOT/%{mingw64_libexecdir}/openconnect
rm -rf $RPM_BUILD_ROOT/%{mingw64_mandir}/man8/openconnect.8*
rm -rf $RPM_BUILD_ROOT/%{mingw64_docdir}/openconnect
rm -rf $RPM_BUILD_ROOT/%{mingw64_datadir}/bash-completion
%mingw_find_lang openconnect
# Surely this is supposed to happen automatically... but it doesn't seem to.
%mingw_debug_install_post
#Win32
%files -n mingw32-openconnect -f mingw32-openconnect.lang
%license COPYING.LGPL
%{mingw32_bindir}/libopenconnect*.dll
%{mingw32_bindir}/openconnect.exe
%{mingw32_includedir}/openconnect.h
%{mingw32_libdir}/libopenconnect*.dll.a
%{mingw32_libdir}/pkgconfig/openconnect.pc
#Win64
%files -n mingw64-openconnect -f mingw64-openconnect.lang
%license COPYING.LGPL
%{mingw64_bindir}/libopenconnect*.dll
%{mingw64_bindir}/openconnect.exe
%{mingw64_includedir}/openconnect.h
%{mingw64_libdir}/libopenconnect*.dll.a
%{mingw64_libdir}/pkgconfig/openconnect.pc
%changelog
* Mon Apr 27 2020 David Woodhouse <[email protected]> - %{version}-%{release}
- Autopackaging for COPR