# xbae wasn't in fedora with monolithic X (fedora < 5), but it # could be possible to do the needed conditionals # motif switched to lesstif in fedora 6 and fedora extras 5 is not # maintained anymore, it could be possible to add the conditionals %if 0%{?rhel} %if 0%rhel <= 4 %define monolithic_X 1 %endif %endif Name: xbae Version: 4.60.4 Release: 10%{?dist} Summary: Motif matrix, caption and text input widgets Group: System Environment/Libraries # all the files are covered by the MIT license, except DebugUtil.c LGPLv2+ License: LGPLv2+ URL: http://xbae.sourceforge.net/ Source0: http://downloads.sourceforge.net/xbae/xbae-%{version}.tar.gz # this fixes the link of the example using Wcl, it shouldn't be of use # now that Wcl isn't buildrequired, but it is still better. Patch0: xbae-link_Mri_with_lXmp.diff Patch1: xbae-4.60.4-multilib.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if 0%{?monolithic_X} # this could certainly be left out since it is an openmotif-devel # dependency, but it is also a direct dependency BuildRequires: xorg-x11-devel %else # libXp-devel and libXext-devel are required by openmotif-devel or # lesstif-devel BuildRequires: libXpm-devel # needed for examples BuildRequires: libXmu-devel %endif %if 0%{?rhel} BuildRequires: openmotif-devel %else BuildRequires: lesstif-devel # to be sure that we link against lesstif even if openmotif provides the same # soname Requires: lesstif %endif # Wcl-devel should only needed by an example, which adds the Xbae widgets # to Wcl, so there is no real need for it. #BuildRequires: Wcl-devel # name with capitalized X was used for the xbae package shipped up to FC-1 Provides: Xbae = %{version}-%{release} Obsoletes: Xbae < %{version}-%{release} %description XbaeMatrix is a free Motif(R) table widget (also compatible with the free LessTif) which presents an editable array of string data to the user in a scrollable table similar to a spreadsheet. The rows and columns of the Matrix may optionally be labelled. A number of "fixed" and "trailing fixed" rows or columns may be specified. The XbaeCaption widget is a simple Motif manager widget that associates a label with a child. In addition the XbaeInput widget is being distributed, a text input field that provides generic customised data entry and formatting for strings. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %if 0%{?rhel} Requires: openmotif-devel %else Requires: lesstif-devel %endif %if 0%{?monolithic_X} Requires: xorg-x11-devel %else Requires: libXpm-devel %endif # for the aclocal directory Requires: automake Provides: Xbae-devel = %{version}-%{release} Obsoletes: Xbae-devel < %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %setup -q %patch0 -p1 %patch1 -p1 -b .multilib for file in COPYING ChangeLog NEWS; do iconv -f latin1 -t utf8 < $file > $file.utf8 touch -c -r $file $file.utf8 mv $file.utf8 $file done %build %configure --disable-static --disable-dependency-tracking make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} INSTALL='install -p' # fix timestamps for configure generated man pages pushd src for file in XbaeCaption.3 XbaeInput.3 XbaeMatrix.3; do touch -r $file.in $RPM_BUILD_ROOT%{_mandir}/man3/$file done popd # and include file touch -r NEWS $RPM_BUILD_ROOT%{_includedir}/Xbae/patchlevel.h # the configure test doesn't find the aclocal dir, so we install # the .m4 file by hand install -d -m755 $RPM_BUILD_ROOT%{_datadir}/aclocal install -p -m644 ac_find_xbae.m4 $RPM_BUILD_ROOT%{_datadir}/aclocal rm $RPM_BUILD_ROOT%{_libdir}/libXbae.la # prepare the main docs # Use systematically __dist_* to avoid directory name clash. rm -rf __dist_Xbae-docs mv $RPM_BUILD_ROOT%{_datadir}/Xbae/ __dist_Xbae-docs # remove duplicate files already in %%doc rm __dist_Xbae-docs/README rm __dist_Xbae-docs/NEWS # examples for builderXcessory are arch specific, this avoids clash of # doc files between arches mv __dist_Xbae-docs/examples/builderXcessory __dist_Xbae-docs/examples/builderXcessory-%{_arch} # first clean examples rm -rf __dist_examples cp -pr examples __dist_examples make -C __dist_examples clean find __dist_examples -name '*akefile*' -exec rm {} \; rm __dist_examples/extest rm __dist_examples/testall for file in __dist_examples/*/*.c __dist_examples/README; do iconv -f latin1 -t utf8 < $file > $file.utf8 touch -c -r $file $file.utf8 mv $file.utf8 $file done # the builderXcessory directory is duplicated in the main doc and in the # example code. The master dir is considered to be in the main doc. # the README is better with the main examples doc, not in code examples mv __dist_examples/builderXcessory/README __dist_Xbae-docs/examples/builderXcessory-%{_arch}/ # remove the duplicate dir and replace it with a link rm -rf __dist_examples/builderXcessory/ ln -s ../examples/builderXcessory-%{_arch}/ __dist_examples/builderXcessory-%{_arch} # then put the examples in a code_examples directory rm -rf __dist_code_examples mkdir __dist_code_examples mv __dist_examples __dist_code_examples/code_examples %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog NEWS COPYING README %{_libdir}/libXbae.so.* %files devel %defattr(-,root,root,-) %doc __dist_Xbae-docs/* __dist_code_examples/code_examples %{_includedir}/Xbae/ %{_libdir}/libXbae.so %{_mandir}/man*/Xbae* %{_datadir}/aclocal/* %changelog * Sat Sep 20 2008 Patrice Dumas 4.60.4-10 - use %%patch0 instead of %%patch (#463002) * Tue Feb 19 2008 Fedora Release Engineering - 4.60.4-9 - Autorebuild for GCC 4.3 * Wed Aug 22 2007 Patrice Dumas 4.60.4-8 - fix license and source url * Wed Jul 25 2007 Patrice Dumas 4.60.4-7 - add rhel conditionals * Sat May 12 2007 Patrice Dumas 4.60.4-6 - keep timestamps - examples/builderXcessory is arch specific * Sun Dec 10 2006 Patrice Dumas 4.60.4-5 - Requires automake is for -devel (#219047) * Sat Sep 9 2006 Patrice Dumas 4.60.4-4 - add BuildRequires libXmu-devel for examples * Thu Aug 31 2006 Patrice Dumas 4.60.4-3 - rebuild against lesstif - add Obsolete/Provides for Xbae * Fri Aug 25 2006 Patrice Dumas 4.60.4-2 - remove dependency on Wcl-devel (was only of use for an example) - clean docs * Thu May 18 2006 Patrice Dumas 4.60.4-1 - Packaged for fedora extras