Browse Source

[redhat quagga.spec] Detect fedora release automatically

2006-06-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

	* redhat/quagga.spec.in: Get default distro automatically
	  by using rpm to query the fedora-release version.
	  And fix a typo (should be default_dist, not dist_default).
Andrew J. Schorr 14 years ago
parent
commit
2cb8716236
2 changed files with 8 additions and 2 deletions
  1. 6 0
      ChangeLog
  2. 2 2
      redhat/quagga.spec.in

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2006-06-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+	* redhat/quagga.spec.in: Get default distro automatically
+	  by using rpm to query the fedora-release version.
+	  And fix a typo (should be default_dist, not dist_default).
+
 2006-05-28 Paul Jakma <paul.jakma@sun.com>
 
 	* configure.ac: Update SOS CFLAGS, Xt shouldn't be used and

+ 2 - 2
redhat/quagga.spec.in

@@ -39,8 +39,8 @@
 ############################################################################
 
 ####################### distro specific tweaks #############################
-# default distro. Override with rpmbuild -D "dist_default XXX" 
-%define			dist_default		fc4
+# default distro. Override with rpmbuild -D "dist XXX" 
+%{expand: %%define default_dist %(rpm -q --qf 'fc%%{VERSION}' fedora-release | grep -v 'not installed')}
 %{!?dist:		%define		dist	%{default_dist}}
 
 # as distros change packages we depend on, our Requires have to change, sadly.