Build gnome-ssh-askpass against gtk3
This commit is contained in:
parent
bffeef3c12
commit
95d45cee50
32
openssh.spec
32
openssh.spec
@ -17,8 +17,8 @@
|
|||||||
# Do we want to link against a static libcrypto? (1=yes 0=no)
|
# Do we want to link against a static libcrypto? (1=yes 0=no)
|
||||||
%global static_libcrypto 0
|
%global static_libcrypto 0
|
||||||
|
|
||||||
# Use GTK2 instead of GNOME in gnome-ssh-askpass
|
# Use GTK3 instead of GTK2 in gnome-ssh-askpass
|
||||||
%global gtk2 1
|
%global gtk3 1
|
||||||
|
|
||||||
# Build position-independent executables (requires toolchain support)?
|
# Build position-independent executables (requires toolchain support)?
|
||||||
%global pie 1
|
%global pie 1
|
||||||
@ -42,8 +42,8 @@
|
|||||||
|
|
||||||
# Add option to build without GTK2 for older platforms with only GTK+.
|
# Add option to build without GTK2 for older platforms with only GTK+.
|
||||||
# Red Hat Linux <= 7.2 and Red Hat Advanced Server 2.1 are examples.
|
# Red Hat Linux <= 7.2 and Red Hat Advanced Server 2.1 are examples.
|
||||||
# rpm -ba|--rebuild --define 'no_gtk2 1'
|
# rpm -ba|--rebuild --define 'no_gtk3 1'
|
||||||
%{?no_gtk2:%global gtk2 0}
|
%{?no_gtk3:%global gtk3 0}
|
||||||
|
|
||||||
# Options for static OpenSSL link:
|
# Options for static OpenSSL link:
|
||||||
# rpm -ba|--rebuild --define "static_openssl 1"
|
# rpm -ba|--rebuild --define "static_openssl 1"
|
||||||
@ -202,11 +202,11 @@ License: BSD
|
|||||||
Requires: /sbin/nologin
|
Requires: /sbin/nologin
|
||||||
|
|
||||||
%if ! %{no_gnome_askpass}
|
%if ! %{no_gnome_askpass}
|
||||||
%if %{gtk2}
|
|
||||||
BuildRequires: gtk2-devel
|
|
||||||
BuildRequires: libX11-devel
|
BuildRequires: libX11-devel
|
||||||
|
%if %{gtk3}
|
||||||
|
BuildRequires: gtk3-devel
|
||||||
%else
|
%else
|
||||||
BuildRequires: gnome-libs-devel
|
BuildRequires: gtk2-devel
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -459,24 +459,24 @@ perl -pi -e "s|-lcrypto|%{_libdir}/libcrypto.a|g" Makefile
|
|||||||
|
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
# Define a variable to toggle gnome1/gtk2 building. This is necessary
|
# Define a variable to toggle gtk2/gtk3 building. This is necessary
|
||||||
# because RPM doesn't handle nested %%if statements.
|
# because RPM doesn't handle nested %%if statements.
|
||||||
%if %{gtk2}
|
%if %{gtk3}
|
||||||
gtk2=yes
|
gtk3=yes
|
||||||
%else
|
%else
|
||||||
gtk2=no
|
gtk3=no
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if ! %{no_gnome_askpass}
|
%if ! %{no_gnome_askpass}
|
||||||
pushd contrib
|
pushd contrib
|
||||||
if [ $gtk2 = yes ] ; then
|
if [ $gtk3 = yes ] ; then
|
||||||
|
CFLAGS="$CFLAGS %{?__global_ldflags}" \
|
||||||
|
make gnome-ssh-askpass3
|
||||||
|
mv gnome-ssh-askpass3 gnome-ssh-askpass
|
||||||
|
else
|
||||||
CFLAGS="$CFLAGS %{?__global_ldflags}" \
|
CFLAGS="$CFLAGS %{?__global_ldflags}" \
|
||||||
make gnome-ssh-askpass2
|
make gnome-ssh-askpass2
|
||||||
mv gnome-ssh-askpass2 gnome-ssh-askpass
|
mv gnome-ssh-askpass2 gnome-ssh-askpass
|
||||||
else
|
|
||||||
CFLAGS="$CFLAGS %{?__global_ldflags}"
|
|
||||||
make gnome-ssh-askpass1
|
|
||||||
mv gnome-ssh-askpass1 gnome-ssh-askpass
|
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user