Hi All! :-)

I am new to this list, so please let me introduce myself.  My friends
all call me crazy pete and have for as long as i can remember,
I am a 38 year old C++ linux programmer, primarily interested in
GPL and LGPL code.  I use RPM oriented systems (mandrake, redhat,
suse) exclusively.

I hope it is allright to post attachments to this list, as i have
attached a patch to update the rpm spec file from lesstif.92.32
to lesstif.92.95.  This patch was created with:

diff -u lesstif.92.32.spec lesstif.spec

where lesstif.spec is the updated spec file for creating lesstif
V92.95 RPMS.  (Please let me know if a different diff format is
preferred on the lesstif project.)

There are a few things to which i would like to call attention,
and perhaps apologise.  I have disabled the building of Xlt and
Xbae in this specfile, primarily because they do not seem to be
in the lesstif-0.92.95.tar.gz i downloaded.  Secondly, and i DO
apologise for this, since i am sure it was discussed thoroughly
before i came to this list, it seems to me that Xbae and Xlt should
be separate packages.  Both (AFAIK) can be built with motifs other
than lesstif, and in fact, Xbae often is.  If Xbae and Xlt are not
made as separate SOURCE rpms, they should at least be separate BINARY
rpms created when the lesstif-nnnn.src.rpm is built.  Since rpm files
provide very explicit dependency information, having Xlt and Xbae
as separate binary packages makes it easier to determine whether or
not these are installed.  It also makes it easier to write client
application RPMs that require Xbae or Xlt but can be built with
any motif.  Again, i apologise, as i am sure this has been talked
over in the past, and i do not mean to reopen an old can of worms.

I have also re-enable the build of the static package.  Partially i
did this simply so that the spec file i am using is the same as the
patch I am sending, just for the sake of consistency.  However, while
i understand that people should be discouraged from installing the
static package, this doesn't INSTALL any packages, merely creates
them, and leaves it up to the end-user whether or not to install
the static package.  Again i apologise if this is problematic.

I have also uncommented the clean directive since i think NOT
removing the install directory ($RPM_BUILD_ROOT) is primarily
useful for testing, and there are rpm switches that may be more
useful for testing (e.g. rpm -bi --short-circuit).

Lastly i have also changed the hardcoded version and release numbers,
as well as the /usr/doc prefix to RPM macros, as this should make
future maintainance much easier.  (Hopefully THIS change will not
bother anyone!)

i would like to thank everyone for developing lesstif, and i would
like to apologise again if the alterations i have made in updating
the spec file have upset anyone

Best Wishes,

Crazy Pete


p.s.  Lesstif 92.95 built great! :-)



________________________________________
Dreaming of a Swiss Account? Get it here: http://freemail.swissinfo.org


--- lesstif.92.32.spec  Sat Jun  2 15:02:07 2001
+++ lesstif.spec        Fri Jul 20 09:10:29 2001
@@ -1,38 +1,43 @@
-Summary:   lesstif
-Name:      lesstif
-Version:   0.92.32
-Release:   1
+
+%define name   lesstif
+%define version        0.92.95
+%define release 1
+
+Summary:   Lesstif is an API compatible clone of the Motif toolkit.
+Name:      %{name}
+Version:   %{version}
+Release:   %{release}
 Copyright: LGPL
 Packager:  LessTif Releasemeister <[EMAIL PROTECTED]>
 Group:     System Environment/Libraries
-Prefixes:  /usr/X11R6 /usr/doc
-Source:    ftp://ftp.hungry.com/pub/hungry/lesstif/lesstif-0.92.32.tar.gz
-BuildRoot: /tmp/lesstif_0.92.32-root
+Prefixes:  /usr/X11R6 %{_defaultdocdir}
+Source:    ftp://ftp.hungry.com/pub/hungry/lesstif/%{name}-%{version}.tar.gz
+BuildRoot: /tmp/lesstif_%{version}-root
+Provides:  motif
 
 %description
 Lesstif is an API compatible clone of the Motif toolkit.
-Most of the Motif 1.2 API is in place,
-we're working on improving it and adding Motif 2.1 functionality.
-Many Motif applications compile and run out-of-the-box with LessTif,
-and we want to hear about those that don't.
+Most of the Motif 1.2 API is in place, we're working on improving it and
+adding Motif 2.1 functionality.  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: User Interface/Desktops
-Prefixes:  /usr/X11R6 /usr/doc /etc
+Prefixes:  /usr/X11R6 %{_defaultdocdir} /etc
 %description mwm
 MWM is a window manager that adheres largely to the Motif mwm specification.
 
 %package clients
 Summary: lesstif clients
 Group: Development/Tools
-Prefixes:  /usr/X11R6 /usr/doc
+Prefixes:  /usr/X11R6 %{_defaultdocdir}
 %description clients
 Uil and xmbind.
 
 %package devel
 Group: Development/Libraries
-Prefixes:  /usr/X11R6 /usr/doc
+Prefixes:  /usr/X11R6 %{_defaultdocdir}
 Summary: header files for Lesstif/Motif-1.2 development
 Requires: lesstif
 %description devel
@@ -41,24 +46,35 @@
 Package also contains development documentation in html (Lessdox), and
 mxmkmf for Lesstif.
 
-# %package static
-# Group: Development/Libraries
-# Prefixes:  /usr/X11R6
-# Summary: static libraries for Lesstif/Motif-1.2 development
-# Requires: lesstif
-# %description static
-# This package contains the lesstif static libraries
-# required to develop motif-based applications.
+%package static
+Group: Development/Libraries
+Prefixes:  /usr/X11R6
+Summary: static libraries for Lesstif/Motif-1.2 development
+Requires: lesstif
+%description static
+This package contains the lesstif static libraries
+required to develop motif-based applications.
 
 %prep
-%setup -n lesstif-0.92.32
+%setup -n lesstif-%{version}
 
 LESSTIFTOP=$PWD
 
-CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr/X11R6 --enable-shared 
--disable-static --enable-build-12 --disable-build-20 --enable-build-21 
--disable-maintainer-mode --enable-build-Xlt --enable-build-Xbae --enable-default-21 
--disable-debug
+CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr/X11R6 --enable-shared 
+--enable-static --enable-build-12 --disable-build-20 --enable-build-21 
+--disable-maintainer-mode --enable-default-21 --disable-debug
 
 %build
-make -j2
+if [ -x /usr/bin/getconf ] ;
+then
+    numprocs=$(/usr/bin/getconf _NPROCESSORS_ONLN)
+    if [ $numprocs -eq 0 ];
+    then
+        numprocs=1
+    fi
+else
+    numprocs=1
+fi
+
+make -j$numprocs
 
 %install
 chmod a-x [A-Z]*
@@ -69,7 +85,6 @@
 strip $RPM_BUILD_ROOT/usr/X11R6/bin/xmbind
 strip $RPM_BUILD_ROOT/usr/X11R6/lib/libXm.so*
 strip $RPM_BUILD_ROOT/usr/X11R6/lib/libMrm.so*
-strip $RPM_BUILD_ROOT/usr/X11R6/lib/libXlt.so*
 strip $RPM_BUILD_ROOT/usr/X11R6/lib/libDtPrint.so*
 
 install -d $RPM_BUILD_ROOT/etc/X11
@@ -97,7 +112,10 @@
 
 %clean
 #do this manually; it's a better idea
-#rm -rf $RPM_BUILD_ROOT
+# No, it is not, all other RPM packages automatically clean their install
+# trees.  If you don't want the install tree cleaned for testing purpose,
+# use rpm -bi --short-circuit!
+rm -rf $RPM_BUILD_ROOT
 
 %files
 #%attr(755, root, root) %doc
@@ -119,10 +137,6 @@
 %attr(755, root, root) /usr/X11R6/LessTif/Motif1.2/lib/*.la
 %attr(755, root, root) /usr/X11R6/LessTif/Motif2.1/lib/*.so*
 %attr(755, root, root) /usr/X11R6/LessTif/Motif2.1/lib/*.la
-%attr(755, root, root) /usr/X11R6/lib/libXbae.la
-%attr(755, root, root) /usr/X11R6/lib/libXbae.so*
-%attr(755, root, root) /usr/X11R6/lib/libXlt.la
-%attr(755, root, root) /usr/X11R6/lib/libXlt.so*
 %attr(755, root, root) /usr/X11R6/lib/libXm.so*
 %attr(755, root, root) /usr/X11R6/lib/libXm.la
 %attr(755, root, root) /usr/X11R6/lib/libMrm.so*
@@ -159,34 +173,53 @@
 # %doc doc/lessdox/*
 %attr(755, root, root) %dir /usr/X11R6/include/Mrm
 %attr(755, root, root) %dir /usr/X11R6/include/Xm
-%attr(755, root, root) %dir /usr/X11R6/include/Xlt
-%attr(755, root, root) %dir /usr/X11R6/include/Xbae
 %attr(755, root, root) %dir /usr/X11R6/include/Dt
 %attr(755, root, root) %dir /usr/X11R6/include/uil
 %attr(755, root, root) %dir /usr/X11R6/LessTif/Motif1.2/include
+%attr(755, root, root) %dir /usr/X11R6/LessTif/Motif1.2/include/Xm
+%attr(755, root, root) %dir /usr/X11R6/LessTif/Motif1.2/include/Mrm
 %attr(644, root, root) /usr/X11R6/LessTif/Motif1.2/include/Xm/*
 %attr(644, root, root) /usr/X11R6/LessTif/Motif1.2/include/Mrm/*
 %attr(755, root, root) %dir /usr/X11R6/LessTif/Motif2.1/include
+%attr(755, root, root) %dir /usr/X11R6/LessTif/Motif2.1/include/Xm
+%attr(755, root, root) %dir /usr/X11R6/LessTif/Motif2.1/include/Mrm
+%attr(755, root, root) %dir /usr/X11R6/LessTif/Motif2.1/include/Dt
+%attr(755, root, root) %dir /usr/X11R6/LessTif/Motif2.1/include/uil
 %attr(644, root, root) /usr/X11R6/LessTif/Motif2.1/include/Xm/*
 %attr(644, root, root) /usr/X11R6/LessTif/Motif2.1/include/Mrm/*
 %attr(644, root, root) /usr/X11R6/LessTif/Motif2.1/include/Dt/*
 %attr(644, root, root) /usr/X11R6/LessTif/Motif2.1/include/uil/*
 %attr(755, root, root) /usr/X11R6/bin/mxmkmf
-%attr(644, root, root) /usr/X11R6/include/Xlt/*
-%attr(644, root, root) /usr/X11R6/include/Xbae/*
 #%attr(644, root, root) %config /usr/X11R6/lib/X11/config/*
 
-# %files static
-# %attr(644, root, root) /usr/X11R6/lib/libMrm.a
-# %attr(644, root, root) /usr/X11R6/lib/libXm.a
-# %attr(644, root, root) /usr/X11R6/lib/libXlt.a
-# %attr(644, root, root) /usr/X11R6/lib/libXbae.a
-# %attr(644, root, root) /usr/X11R6/lib/libDtPrint.a
-# %attr(644, root, root) /usr/X11R6/lib/libUil.a
-# %attr(644, root, root) /usr/X11R6/LessTif/Motif1.2/lib/*.a
-# %attr(644, root, root) /usr/X11R6/LessTif/Motif2.1/lib/*.a
+%files static
+%attr(644, root, root) /usr/X11R6/lib/libMrm.a
+%attr(644, root, root) /usr/X11R6/lib/libXm.a
+%attr(644, root, root) /usr/X11R6/lib/libDtPrint.a
+%attr(644, root, root) /usr/X11R6/lib/libUil.a
+%attr(644, root, root) /usr/X11R6/LessTif/Motif1.2/lib/*.a
+%attr(644, root, root) /usr/X11R6/LessTif/Motif2.1/lib/*.a
 
 %changelog
+* Fri Jul 20 2001 Crazy Pete <[EMAIL PROTECTED]>
+- Added name, release and version macros and changed the spec file to
+  use these instead of hardcoding the version number.
+- Removed the references to Xbae and Xlt, not only should these be
+  separate packages, but the version 92.95 did not even seem to build
+  Xbae!
+- Added Provides motif so that RPM packages requiring motif will build
+  with lesstif
+- Changed the build command to check the number of processors, X, and then
+  use "make -jX" so that make will launch a parallel process for each CPU.
+- Re-enabled building the static package, if the user doesn't want the
+  static package, then they won't install it!
+- Re-enabled the clean directive, the only reason not to clean the
+  installation tree is for testing this spec file, and RPM provides special
+  switches to do just that.  (E.g. rpm -bb --short-circuit)
+- Added directory entries in the files list for the Motif1.2/include/... and
+  Motif2.1/include/Xxx directories so that we do not get the:
+  cannot remove /usr/X11R6/LessTif/Motif1.2/include - directory not empty
+  and similiar errors when deleting the lesstif packages.
 * Fri Mar 30 2001 Danny Backx <[EMAIL PROTECTED]>
 - Rename Dt library to DtPrint
 - Fix the toplevel documentation ownership.

Reply via email to