summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-09-05 16:53:20 +1000
committerDamien Miller <djm@mindrot.org>2002-09-05 16:53:20 +1000
commit005d4560ed000be8a667f876967348a99a7a8897 (patch)
tree289d816a02c57f3a153beb39513c36866a19c5e3 /contrib
parent44d5b60336e2233813083e254a9ca751b7f3c172 (diff)
- (djm) Add support for building gtk2 password requestor from Redhat beta
Diffstat (limited to 'contrib')
-rw-r--r--contrib/redhat/openssh.spec25
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index e4bef55a..14be171f 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -20,6 +20,9 @@
# Do we want smartcard support (1=yes 0=no)
%define scard 0
+# Use GTK2 instead of GNOME in gnome-ssh-askpass
+%define gtk2 0
+
# Is this build for RHL 6.x?
%define build6x 0
@@ -220,6 +223,28 @@ make
popd
%endif
+# Define a variable to toggle gnome1/gtk2 building. This is necessary
+# because RPM doesn't handle nested %if statements.
+%if %{gtk2}
+ gtk2=yes
+%else
+ gtk2=no
+%endif
+
+%if ! %{no_gnome_askpass}
+pushd contrib
+if [ $gtk2 = yes ] ; then
+ gcc $RPM_OPT_FLAGS `pkg-config --cflags gtk+-2.0` \
+ gnome-ssh-askpass2.c -o gnome-ssh-askpass \
+ `pkg-config --libs gtk+-2.0`
+else
+ gcc $RPM_OPT_FLAGS `gnome-config --cflags gnome gnomeui` \
+ gnome-ssh-askpass1.c -o gnome-ssh-askpass \
+ `gnome-config --libs gnome gnomeui`
+fi
+popd
+%endif
+
%if ! %{no_gnome_askpass}
pushd contrib
gcc $RPM_OPT_FLAGS `gnome-config --cflags gnome gnomeui` \