fix for modular X

This commit is contained in:
Than Ngo 2005-11-16 19:15:30 +00:00
parent fecbb085b3
commit f8afb87a00

View File

@ -1,5 +1,3 @@
%define compatlib 0
Summary: A version of the MIT Athena widget set for X.
Name: Xaw3d
Version: 1.5E
@ -19,16 +17,18 @@ Patch6: Xaw3d-1.5-i18n.patch
Patch7: Xaw3d-1.5-scrollbar2.patch
License: MIT
Prefix: /usr
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Prereq: fileutils
Prereq: /sbin/ldconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: libXmu-devel
BuildRequires: libXt-devel
BuildRequires: libXt-devel
BuildRequires: libSM-devel
BuildRequires: libXext-devel
BuildRequires: libX11-devel
BuildRequires: libXpm-devel
BuildRequires: imake
BuildRequires: imake
%description
Xaw3d is an enhanced version of the MIT Athena Widget set for
@ -44,13 +44,12 @@ Summary: Header files and static libraries for development using Xaw3d.
Group: Development/Libraries
Requires: %{name} = %{version}
Requires: libXmu-devel
Requires: libXt-devel
Requires: libXt-devel
Requires: libSM-devel
Requires: libXext-devel
Requires: libX11-devel
Requires: libXpm-devel
%description devel
Xaw3d is an enhanced version of the MIT Athena widget set for
the X Window System. Xaw3d adds a three-dimensional look to those
@ -71,26 +70,6 @@ ln -s .. X11
%patch -p0 -b .config
popd
%if %{compatlib}
# Xaw3d6, compat libs
mkdir old
pushd old
tar xzf %{SOURCE1}
popd
mv old/xc/lib/Xaw3d xc/lib/Xaw3d6
rm -rf old
pushd xc/lib/Xaw3d6
ln -s .. X11
%patch1 -p4
%patch2 -p3
%patch3 -p4
%patch4 -p3
%patch5 -p4
%patch6 -p4
%patch7 -p4
popd
%endif
%build
# Xaw3d7
pushd xc/lib/Xaw3d
@ -98,25 +77,10 @@ xmkmf
make CDEBUGFLAGS="${RPM_OPT_FLAGS} -DARROW_SCROLLBAR"
popd
%if %{compatlib}
# Xaw3d6, compat libs
cp %{SOURCE2} xc/lib/Xaw3d6
pushd xc/lib/Xaw3d6
xmkmf
make
popd
%endif
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT -C xc/lib/Xaw3d
%if %{compatlib}
cp -aR xc/lib/Xaw3d6/libXaw*so.* $RPM_BUILD_ROOT/usr/X11R6/%{_lib}/
%endif
ln -s X11/Xaw3d $RPM_BUILD_ROOT/usr/X11R6/include
make install DESTDIR=$RPM_BUILD_ROOT SHLIBDIR=%{_libdir} INCDIR=%{_includedir} -C xc/lib/Xaw3d
%clean
rm -rf $RPM_BUILD_ROOT
@ -125,34 +89,19 @@ rm -rf $RPM_BUILD_ROOT
%postun -p /sbin/ldconfig
%post devel
if [ ! -d /usr/X11R6/include/Xaw3d ] ; then
rm -f /usr/X11R6/include/Xaw3d
ln -sf X11/Xaw3d /usr/X11R6/include
fi
%pre devel
if [ -L /usr/X11R6/include/X11/Xaw3d ] ; then
rm -f /usr/X11R6/include/X11/Xaw3d
fi
%triggerpostun -- Xaw3d-devel < 1.5-5
if [ -d /usr/X11R6/include/Xaw3d ] ; then
rm -rf /usr/X11R6/include/Xaw3d
ln -sf X11/Xaw3d /usr/X11R6/include
fi
%files
%defattr(-,root,root)
/usr/X11R6/%{_lib}/*.so.*
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
/usr/X11R6/%{_lib}/*.so
/usr/X11R6/include/X11/Xaw3d
%ghost /usr/X11R6/include/Xaw3d
%{_libdir}/*.so
%{_includedir}/X11/Xaw3d
%changelog
* Wed Nov 16 2005 Than Ngo <than@redhat.com> 1.5E-6
- fix for modular X
* Tue Nov 05 2005 Warren Togami <wtogami@redhat.com> 1.5E-5
- req individual X dependencies
- remove X11R6 references