- make various defines conditional, so that they can be specified from
the rpmbuild commandline, eg rpmbuild --define 'keep_build 1'
diff --git a/redhat/quagga.spec.in b/redhat/quagga.spec.in
index e45ec1f..dce0308 100644
--- a/redhat/quagga.spec.in
+++ b/redhat/quagga.spec.in
@@ -1,21 +1,26 @@
# configure options
-%define with_snmp 1
-%define with_vtysh 1
-%define with_ospf_te 1
-%define with_nssa 1
-%define with_opaque_lsa 1
-%define with_tcp_zebra 0
-%define with_vtysh 1
-%define with_pam 1
-%define with_ipv6 1
-%define with_ospfclient 1
-%define with_ospfapi 1
-%define with_irdp 1
-%define with_isisd 0
-%define with_shared 1
-%define with_multipath 64
-%define quagga_user quagga
-%define vty_group quaggavty
+#
+# Some can be overriden on rpmbuild commandline with:
+# rpmbuild --define 'variable value'
+#
+
+%{!?with_snmp: %define with_snmp 1 }
+%{!?with_vtysh: %define with_vtysh 1 }
+%{!?with_ospf_te: %define with_ospf_te 1 }
+%{!?with_nssa: %define with_nssa 1 }
+%{!?with_opaque_lsa: %define with_opaque_lsa 1 }
+%{!?with_tcp_zebra: %define with_tcp_zebra 0 }
+%{!?with_vtysh: %define with_vtysh 1 }
+%{!?with_pam: %define with_pam 1 }
+%{!?with_ipv6: %define with_ipv6 1 }
+%{!?with_ospfclient: %define with_ospfclient 1 }
+%{!?with_ospfapi: %define with_ospfapi 1 }
+%{!?with_irdp: %define with_irdp 1 }
+%{!?with_isisd: %define with_isisd 0 }
+%{!?with_shared: %define with_shared 1 }
+%{!?with_multipath: %define with_multipath 64 }
+%{!?quagga_user: %define quagga_user quagga }
+%{!?vty_group: %define vty_group quaggavty }
# path defines
%define _sysconfdir /etc/quagga
@@ -30,8 +35,8 @@
%define _localstatedir /var/run/quagga
# misc internal defines
-%define quagga_uid 92
-%define quagga_gid 92
+%{!?quagga_uid: %define quagga_uid 92 }
+%{!?quagga_gid: %define quagga_gid 92 }
%define daemon_list zebra ripd ospfd bgpd
%if %{with_ipv6}
@@ -49,7 +54,7 @@
%define all_daemons %{daemon_list} %{daemonv6_list} %{daemon_other} watchquagga
# allow build dir to be kept
-%define keep_build 0
+%{!?keep_build: %define keep_build 0 }
Summary: Routing daemon
Name: quagga