Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] building a Gtk2 RPM (Was: QT_MIN_VERSION)

From: Christopher Maynard <Christopher.Maynard@xxxxxxxxx>
Date: Tue, 12 Aug 2014 20:05:02 +0000 (UTC)
Jeff Morriss <jeff.morriss.ws@...> writes:

> > 2) I'm unable to create .rpm's using --without-qt. (or with both
> > --without-gtk2 and --without-gtk3 for that matter, but that hasn’t been
> > a problem since I just don’t bother installing the gnome rpm that’s
> > generated.)
> > RHEL6 doesn't have GTK3, so I’m forced to use, at a minimum,
> > --with-gtk2, and of course change wireshark.spec.in as well:
> > %bcond_with    gtk2
> > %bcond_without gtk3
> > %bcond_without qt
> 
> When you're building from the source tree the RPM generation should 
> follow your ./configure options.  So:
> 
> % ./configure --with-gtk2 && make rpm-package
> 
> should do the trick.  It seems that some work is still needed to allow a 
> no-GUI RPM build though (in r53607 I said it worked but it doesn't seem 
> to now).

In case it wasn't clear, I previously ran ./configure --with-gtk2
--without-gtk3 --without-qt && make rpm-package, but that did not do the 
trick.

> Note that the %bcond_with* macros are funny; they don't really do what 
> you'd expect:
> 
> https://lists.fedoraproject.org/pipermail/devel/2011-December/160357.html

Thanks for the link.  Yes, I was mistaken in my understanding of these
macros, but since I explicitly specified the configure options for gtk2,
gtk3 and qt, I don't think it mattered.  Well, I restored wireshark.spec.in
to its original state and tried again with the same negative results as 
before:

./configure --with-gtk2 && make rpm-package

...
RPM build errors:
    File not found:
/home/wireshark/1.12.0/packaging/rpm/BUILDROOT/wireshark-1.12.0-1.x86_64
/usr/local/bin/wireshark-qt
make: *** [rpm-package] Error 1