%define major 2 %define libname %mklibname %name %major %define develname %mklibname %name -d %define lessdoxdir %{_docdir}/%{name} Summary: A free Motif clone Name: lesstif Version: 0.95.0 Release: %mkrel 6 License: LGPL URL: http://www.lesstif.org/ Group: System/Libraries Source: http://prdownloads.sourceforge.net/%name/%name-%version.tar.gz Source2: mwm.png.bz2 Source3: mwm32.png.bz2 Source4: lesstif-mwm-menu-xdg Patch1: lesstif-0.93.94-libdir.patch Patch2: lesstif-0.93.94-libtool.patch # Slightly ugly hack to disable libDtPrint build. It seems to be # completely useless, I don't think any apps use it. Debian doesn't # ship it. - AdamW 2007/07 Patch3: lesstif-0.95.0-disable-dtprint.patch BuildRoot: %{_tmppath}/%name-%version-root BuildRequires: flex X11-devel bison xpm-devel fontconfig-devel BuildRequires: imake x11-util-cf-files BuildRequires: autoconf %description Lesstif is an API compatible clone of the Motif toolkit. It implements the Motif 2.1 API. Many Motif applications compile and run out-of-the-box with LessTif, and we want to hear about those that don't. %package -n %libname Summary: Lesstif libraries Group: System/Libraries Requires: lesstif = %version Obsoletes: %{mklibname lesstif 1} %description -n %libname Lesstif is an API compatible clone of the Motif toolkit. It implements the Motif 2.1 API. 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: desktop-common-data Conflicts: openmotif %description mwm MWM is a window manager that adheres largely to the Motif mwm specification. %package clients Summary: Lesstif clients Group: Graphical desktop/Other Requires: lesstif = %version Conflicts: openmotif libopenmotif-devel %description clients Uil and xmbind clients for Lesstif. %package -n %develname Group: Development/C Summary: Static library and header files for Lesstif/Motif development Requires: %libname = %version Obsoletes: %{name}-devel < %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Conflicts: libopenmotif-devel %description -n %develname This package contains the lesstif static library and header files required to develop motif-based applications. This package also contains development documentation in html (Lessdox), and mxmkmf for Lesstif. %prep %setup -q -n lesstif-%{version} %patch1 -p1 -b .libdir %patch2 -p1 -b .libtool %patch3 -p0 -b .dtprint autoconf LESSTIFTOP=$PWD %build CFLAGS="%{optflags} -DMWM_DDIR=\\\"%{_datadir}/X11/mwm\\\"" \ LDFLAGS="%{ldflags}" \ ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ -mandir=%{_mandir} \ -includedir=%{_includedir} \ -enable-shared \ -enable-static \ -disable-maintainer-mode \ -disable-debug \ -enable-production perl -pi -e '\ s@^(appdir = ).*(/X11/app-defaults)@$1/usr/share$2@;\ s@^(mwmddir = ).*(/X11/mwm)@$1/usr/share$2@'\ clients/Motif-2.1/mwm/Makefile perl -pi -e 's@^(configdir = ).*@$1 = %{_datadir}/X11/config@' lib/config/Makefile perl -pi -e 's@^(rootdir = ).*@$1%{lessdoxdir}@' `find doc -name Makefile` perl -pi -e 's@/X11R6/@/@g' `find . -name Makefile` scripts/motif-config.in %make perl -pi -e '\ s@-L/usr(/X11R6)?/%{_lib} @@g;\ s@-I/usr(/X11R6)?/include @@g'\ scripts/motif-config %install rm -rf %{buildroot} %makeinstall_std install -d %{buildroot}%{lessdoxdir}/Lessdox install -c -m 644 doc/lessdox/*/*.html %{buildroot}%{lessdoxdir}/Lessdox || : # generate config files mkdir -p %{buildroot}%{_datadir}/X11/config cd %{buildroot}%{_datadir}/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 $_; } ' < %{_datadir}/X11/config/Imake.tmpl > Imake-lesstif.tmpl cd %{buildroot}%{_bindir} sed -e 's/imake $args/imake -T Imake-lesstif.tmpl $args/' < `which xmkmf` > mxmkmf # menu support mkdir -p %{buildroot}/%{_menudir} install -m 0755 %{SOURCE4} %{buildroot}%{_menudir}/lesstif-mwm #icons mkdir -p %{buildroot}%{_iconsdir}/hicolor/{16x16,32x32}/apps bzcat %{SOURCE2} >%{buildroot}%{_iconsdir}/hicolor/16x16/apps/mwm.png bzcat %{SOURCE3} >%{buildroot}%{_iconsdir}/hicolor/32x32/apps/mwm.png rm -f %{buildroot}%{_datadir}/X11/config/host.def # remove unpackaged files rm -fr %{buildroot}/%{_prefix}/LessTif %if %mdkversion < 200900 %post -n %libname -p /sbin/ldconfig %endif %if %mdkversion < 200900 %postun -n %libname -p /sbin/ldconfig %endif %post mwm %update_menus %postun mwm %clean_menus %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS BUG-REPORTING COPYING COPYING.LIB CREDITS %doc ChangeLog NEWS %doc README ReleaseNotes.txt ReleaseNotes.html %doc doc/www.lesstif.org/FAQ.html %{_mandir}/man1/lesstif.1* %files -n %libname %defattr(-,root,root,-) %{_libdir}/*.so.%{major}* %files mwm %defattr(-,root,root,-) %doc clients/Motif-2.1/mwm/{COPYING,README} %{_menudir}/%{name}-mwm %{_datadir}/X11/mwm %{_datadir}/X11/app-defaults/Mwm %{_mandir}/man1/mwm.1* %{_mandir}/man5/mwmrc.5* %{_bindir}/mwm %{_iconsdir}/hicolor/16x16/apps/mwm.png %{_iconsdir}/hicolor/32x32/apps/mwm.png %files clients %defattr(-,root,root,-) %doc doc/UIL.txt %{_bindir}/uil %{_bindir}/xmbind %{_mandir}/man1/xmbind.1* %files -n %develname %defattr(-,root,root,755) %doc %{lessdoxdir} %{_includedir}/* %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so %{_bindir}/motif-config %{_bindir}/mxmkmf %{_datadir}/X11/config/* %{_datadir}/aclocal/ac_find_motif.m4 %{_mandir}/man1/* %{_mandir}/man3/* %{_mandir}/man5/* %changelog * Sun Dec 21 2008 Oden Eriksson <oeriksson@mandriva.com> 0.95.0-6mdv2009.1 + Revision: 316982 - rediffed fuzzy patches - safer fix to disable libDtPrint (P3) - use %%ldflags * Fri Jul 04 2008 Anssi Hannula <anssi@mandriva.org> 0.95.0-5mdv2009.0 + Revision: 231746 - move headers back to /usr/include where they are expected by other software and where they are on other distributions - ensure major correctness in file list * Tue Jun 17 2008 Thierry Vignaud <tvignaud@mandriva.com> 0.95.0-4mdv2009.0 + Revision: 222406 - rebuild + Pixel <pixel@mandriva.com> - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers - fix pcpa typo + Paulo Andrade <pcpa@mandriva.com.br> - Don't directly use files from /usr/X11R6, neither advertise them. Install Motif headers unders /usr/include/X11. * Wed Feb 13 2008 Adam Williamson <awilliamson@mandriva.com> 0.95.0-2mdv2008.1 + Revision: 166850 - don't run update_menus and clean_menus for mwm, it has no menu entry * Fri Dec 21 2007 Olivier Blin <oblin@mandriva.com> 0.95.0-1mdv2008.1 + Revision: 136535 - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request - buildrequires X11-devel instead of XFree86-devel + Pixel <pixel@mandriva.com> - add various explicit conflicts with openmotif and its subpackages * Wed Jul 18 2007 Adam Williamson <awilliamson@mandriva.com> 0.95.0-1mdv2008.0 + Revision: 53167 - correct paths for x86-64 - fd.o icons - drop old menu entry - drop old patch3 (merged upstream) - rediff patches 1 and 2 - improve description - new patch3: disable libDtPrint (useless) - drop 1.x compatible build (as per upstream) - new release 0.95.0 * Tue Aug 29 2006 Thierry Vignaud <tvignaud@mandriva.com> 0.93.94-12mdv2007.0 - lesstif doesn't need %%post/%%postun ldconfig, but the %%libname1 and %%libname2 packages sure do (vdanen) - use --enable-production: security fix for CVE-2006-4124 (stew) * Mon Jul 17 2006 Frederic Crozat <fcrozat@mandriva.com> 0.93.94-11mdv2007.0 - Final switch to XDG menu * Fri Jul 14 2006 Olivier Thauvin <nanardon@mandriva.org> 0.93.94-10mdv2007.0 - fix path for lib64 * Sun Jun 25 2006 Götz Waschk <waschk@mandriva.org> 0.93.94-9mdv2007.0 - fix buildrequires * Sat Jun 24 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.93.94-8 - add BuildRequires: x11-util-cf-files * Sun Jun 11 2006 Olivier Thauvin <nanardon@mandriva.org> 0.93.94-7mdv2007.0 - fix prefix (aka /usr instead /usr/X11R6) - %%mkrel * Thu May 04 2006 Frederic Crozat <fcrozat@mandriva.com> 0.93.94-6mdk - Update source1, patch0, we are Mandriva Linux now - Add XDG menu script, patch0 will need to be update again when old menu system is replaced by new XDG based scripts * Sat Dec 31 2005 Mandriva Linux Team <http://www.mandrivaexpert.com/> 0.93.94-5mdk - Rebuild * Mon Mar 14 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.93.94-4mdk - fix ordering of packages on upgrade (#14537) * Thu Feb 24 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.93.94-3mdk - first round of 64-bit fixes * Tue Feb 22 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.93.94-2mdk - libification * Mon Dec 01 2003 Götz Waschk <waschk@linux-mandrake.com> 0.93.94-1mdk - bzip2 source1 - rediff patches - new version * Fri Nov 14 2003 Götz Waschk <waschk@linux-mandrake.com> 0.93.91-1mdk - new version