Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main-src > by-pkgid > f53eb45fa5aad677a80d65f51e8083f4 > files > 3

lesstif-0.91.4-5mdk.src.rpm

%define	prefix	/usr/X11R6

Summary:		A free Motif clone
Name:			lesstif
Version:		0.91.4
Release:		5mdk
Copyright:		LGPL
URL:			http://www.lesstif.org/
Group:			System/Libraries

Source:			ftp://ftp.hungry.com/pub/hungry/lesstif/lesstif-%{version}.tar.bz2
Source1:		mwm-menumethod
Source2:		mwm.xpm.bz2
Source3:		mwm32.xpm.bz2
Patch0:			lesstif-mdk-menu.patch.bz2

BuildRoot:		%{_tmppath}/%name-%version-root
BuildRequires:	flex, XFree86-devel, bison, xpm-devel

%description
Lesstif is an API compatible clone of the Motif toolkit.

Currently Lesstif is partially implemented with most of the API in place.
Having said this, some of the internal functionality is still missing.
Many Motif applications compile and run out-of-the-box with LessTif,
and we want to hear about those that don't.

%package mwm
Summary:	Lesstif Motif window manager clone based on fvwm
Group:		Graphical desktop/Other
Requires:	menu

%description mwm
MWM is a window manager that adheres largely to the Motif mwm specification.

%package clients
Summary:	Lesstif clients
Group:		Graphical desktop/Other

%description clients
Uil and xmbind.

%package devel
Group:		Development/C
Summary:	Static library and header files for Lesstif/Motif-1.2 development
Requires:	lesstif

%description devel
This package contains the lesstif static library and header files required to
develop motif-1.2-based applications.

This package also conntains development documentation in html (Lessdox), and
mxmkmf for Lesstif.

%prep

%setup -n lesstif-%{version}
%patch0 -p0 -b .mdk
LESSTIFTOP=$PWD

%build
CFLAGS="$RPM_OPT_FLAGS" \
	./configure --prefix=%prefix \
				--enable-shared \
				--enable-static \
				--enable-build-12 \
				--enable-build-20 \
				--disable-maintainer-mode \
				--enable-build-Xlt \
				--enable-build-Xbae

%make

%install
make install prefix=$RPM_BUILD_ROOT%prefix

install -d $RPM_BUILD_ROOT/etc/X11
ln -sf ../..%prefix/lib/X11/mwm $RPM_BUILD_ROOT/etc/X11/mwm

install -d $RPM_BUILD_ROOT%prefix/man
install -d $RPM_BUILD_ROOT%prefix/man/man1
install -d $RPM_BUILD_ROOT%prefix/man/man5
install -d $RPM_BUILD_ROOT%prefix/LessTif/doc/Lessdox
install -c -m 644 doc/lessdox/clients/mwmrc.5   $RPM_BUILD_ROOT%prefix/man/man5
install -c -m 644 doc/lessdox/clients/mwm.1     $RPM_BUILD_ROOT%prefix/man/man1
install -c -m 644 doc/lessdox/clients/lesstif.1 $RPM_BUILD_ROOT%prefix/man/man1
install -c -m 644 doc/lessdox/clients/xmbind.1  $RPM_BUILD_ROOT%prefix/man/man1
install -c -m 644 doc/lessdox/*/*.html			$RPM_BUILD_ROOT%prefix/LessTif/doc/Lessdox || :

# generate config files 
cd $RPM_BUILD_ROOT/usr/X11R6/lib/X11/config
mv Imake.tmpl Imake-lesstif.tmpl.orig


perl -ne ' 
    if( /#include <Imake.rules>/ ){              
        print $_;
        print "#include <Motif-lesstif.tmpl>\n";
        print "#include <Motif-lesstif.rules>\n";
    }
    elsif ( /IMAKE_CMD = \$\(IMAKE\)/ ){
        print STDERR "found\n";
        s|\$\(IMAKE\)|\$(IMAKE) -T Imake-lesstif.tmpl|;
        print $_;
    }
    else {
        print $_;
    }
' < %prefix/lib/X11/config/Imake.tmpl > Imake-lesstif.tmpl


mv Motif.rules Motif-lesstif.rules
mv Motif.tmpl  Motif-lesstif.tmpl

cd $RPM_BUILD_ROOT%prefix/bin
sed -e 's/imake $args/imake -T Imake-lesstif.tmpl $args/' < `which xmkmf` > mxmkmf

# cleanup in a preparation for an installation - unify layout

( cd $RPM_BUILD_ROOT%prefix/LessTif ; \
  mv doc/man/man1/* ../man/man1 ; \
  mv doc/man/man3/* ../man/man3 ; \
  mv doc/man/man5/* ../man/man5 ; \
  rm -rf doc/man )

# menu support
mv $RPM_BUILD_ROOT%prefix/lib/X11/mwm/system.mwmrc $RPM_BUILD_ROOT%prefix/lib/X11/mwm/system.mwmrc-menu
mkdir -p $RPM_BUILD_ROOT/etc/menu-methods $RPM_BUILD_ROOT/usr/lib/menu
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/menu-methods/%{name}-mwm
cat > $RPM_BUILD_ROOT/usr/lib/menu/%{name}-mwm << EOF
?package(%{name}-mwm): needs=wm icon=mwm.xpm section=Session/Windowmanagers title=Mwm command=mwm
EOF

#mdk icons
install -d $RPM_BUILD_ROOT%{_miconsdir}
bzcat %{SOURCE2} >$RPM_BUILD_ROOT%{_miconsdir}/mwm.xpm
bzcat %{SOURCE3} >$RPM_BUILD_ROOT%{_iconsdir}/mwm.xpm

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post mwm
%update_menus

%postun mwm
%clean_menus

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc etc/{example.motifbind,motifbind.sun+linux}
%doc AUTHORS BUG-REPORTING COPYING COPYING.LIB CREDITS
%doc CURRENT_NOTES ChangeLog KNOWN_BUGS NEWS NOTES
%doc README RELEASE-POLICY TODO
%doc doc/www.lesstif.org/FAQ
%doc %prefix/LessTif/doc
%prefix/LessTif/Motif1.2/lib/*.so.*
%prefix/LessTif/Motif2.0/lib/*.so.*
%prefix/lib/*.so.*
%prefix/man/man1/lesstif.1*

%files mwm
%defattr(-,root,root,-)
%doc clients/Motif-1.2/mwm/{COPYING,README}
%config(noreplace) /etc/menu-methods/%{name}-mwm
%config(noreplace) /etc/X11/mwm
%prefix/lib/X11/mwm
%prefix/bin/mwm
%prefix/lib/X11/app-defaults/Mwm
%prefix/man/man1/mwm.1*
%prefix/man/man5/mwmrc.5*
%_menudir/%{name}-mwm
%{_iconsdir}

%files clients
%defattr(-,root,root,-)
%doc doc/UIL.txt
%prefix/bin/uil
%prefix/bin/xmbind
%prefix/man/man1/xmbind.1*

%files devel
%defattr(-,root,root,755)
%doc doc/lessdox/*/*.html
%prefix/include/*
%prefix/LessTif/Motif1.2/include
%prefix/LessTif/Motif1.2/lib/*.so
%prefix/LessTif/Motif1.2/lib/*.a
%prefix/LessTif/Motif1.2/lib/*.la
%prefix/lib/*.so
%prefix/lib/*.a
%prefix/lib/*.la
%prefix/LessTif/Motif2.0/include/*
%prefix/LessTif/Motif2.0/lib/*.so
%prefix/LessTif/Motif2.0/lib/*.a
%prefix/LessTif/Motif2.0/lib/*.la
%prefix/bin/mxmkmf
%prefix/lib/X11/config/*
%prefix/man/man3/*

%changelog
* Fri Sep 29 2000 Daouda Lo <daouda@mandrakesoft.com> 0.91.4-5mdk
- add icons to Mwm menuentry

* Thu Sep 26 2000 David BAUDENS <baudens@mandakesoft.com> 0.91.4-4mdk
- Add missing files and clean up %%files section

* Sun Sep 24 2000 David BAUDENS <baudens@mandrakesoft.com> 0.91.4-3mdk
- Allow to build
- Use optimizations
- Fix Summary and Description

* Wed Jul 05 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.91.4-2mdk
- fix postinstall script

* Tue Jul 04 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.91.4-1mdk
- new release
- add a summary
- use some macros

* Mon Jun 26 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.91.3-1mdk
- add url
- new release

* Tue May  9 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.89.9-3mdk
- fixed menu method.

* Wed Apr  5 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.89.9-2mdk
- menu support.
- group fix.

* Sat Feb 12 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.89.9-1mdk
- 0.89.9.
- put *.so in devel package.
- added man pages from section 3 to the devel package.
- bzipped man pages.
- merged spec file from the tar ball.

* Tue Nov 16 1999 Lenny Cartier <lenny@mandrakesoft.com>
- v0.89.4
- use the specfile from www.lesstif.org to fix conflicts problems

* Tue Oct 23 1999 Danny Backx <danny@hungry.com>
- try to integrate Michal's stuff in lesstif.spec.in
- don't treat Xbae, Xlt separately
- compile for 2.0 as well as for 1.2
- compile Xbae, Xlt by default

* Tue Oct 19 1999 Michal Jaegermann <michal@harddata.com> 0.89
- Updated to version 0.89
- Reorganized spec file to follow closer its own descriptions
- Xlt does not require special make anymore.

* Thu Apr 30 1998 C. Scott Ananian <cananian@alumni.princeton.edu> 0.83+
- Updated to lessdoc-current.
- Removes Lessdox package (integrated into lesstif)

* Tue Mar 31 1998 C. Scott Ananian <cananian@alumni.princeton.edu> 0.83+
- Removed pedantic.patch
- Removed lesstif-M12 (Motif 1.2 wrapper)
- Reviewed installation and fixed %files sections.
- Added patch to fix a bug which causes mozilla to crash.
- Added patch to fix the include prefix on install.

* Sun Jul 20 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl> 0.80-2
- added to all %doc %attr macros (this allow build package from normal user
  account),
- some simplification in %files (%doc).

* Wed Jul 9 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
- added using %%{PACKAGE_VERSION} macro in "Source:" and %files,
- added additional parameter "--enable-build-12" to runing configure,
- added %posun and %clear,
- in %post and %postun ldconfig is called as parameter with "-p"
  (this feature is avalable in rpm >= 2.4.3 and you must have this
  version and if you want recompile package from src.rpm you must have new
  version rpm),
- added package lesstif-M12 simpe Motif 1.2 wrapper,
- simplified %install section,
- added %attr macros in %files sections,
- added striping shared libraries,
- added URL field,
- added Lessdox - a html development documentation to lesstif-devel,
- added lesstif-0.80public-nopedantic.patch, this allow compile lesstif on
  sparc by removing "-pedantic" from CFLAGS.