Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 5d5cde2d1f0bdaaedf4eb8bf8ad54455 > files > 5

pfe-0.32.94-1mdk.src.rpm

%define name    pfe
%define version 0.32.94
%define release 1mdk

Summary:	Portable Forth Environment
Name:		%name
Version:	%version
Release:	%release
License:	LGPL
Group:		Development/Other
URL:		http://sourceforge.net/projects/pfe
Source0:	%{name}-%{version}.tar.bz2
Source16:       %name.16.png.bz2
Source32:       %name.32.png.bz2
Source48:       %name.48.png.bz2
Buildprereq:	gcc2.96
BuildRoot:	%_tmppath/%{name}-%{version}-%{release}

%description
The Portable Forth Environment is a Forth Engine completly written in C.
It has a module concept so it can be extended with C modules. It is
completly multithreaded, and implements the DPANS94, the proposed ANSI
standard on Forth.

%package doc
Summary:        PFE Documentation
Group:          Development/Other

%description doc
The Portable Forth Environment.
The documentation, mostly autogenerated.

%package devel
Summary:        PFE Development Headers
Group:          Development/Other
Requires:       pfe

%description devel
The Portable Forth Environment.
The header file for compiling extension modules for
use by the forth engine, or for compiling applications
that use the forth library as a scripting engine.

The headers are namespace clean, i.e. all symbols
have a prefix to distinguish them from other symbols.

%package regs
Summary:        PFE Documentation
Group:          Development/Other

%description regs
The Portable Forth Environment - regs=all variant.

%package fig 
Summary:        PFE Documentation
Group:          Development/Other

%description fig
The Portable Forth Environment - fig=1 variant.

%package forth
Summary:        PFE Documentation
Group:          Development/Other
Requires:       pfe-regs

%description forth
The Portable Forth Environment - without-modules variant.

%package call
Summary:        PFE Documentation
Group:          Development/Other

%description call
The Portable Forth Environment - --with-call-threading variant

%package calls
Summary:        PFE Documentation
Group:          Development/Other

%description calls
The Portable Forth Environment - --with-sbr-threading variant

%package fast
Summary:        PFE Documentation
Group:          Development/Other

%description fast
The Portable Forth Environment - --with-sbrx-threading variant


%prep
rm -rf $RPM_BUILD_ROOT

%setup

%define GCC2 CC="gcc-2.96"

CFLAGS="$RPM_OPT_FLAGS" sh configure %GCC2 --prefix=%_prefix --mandir=%_mandir --datadir=%_datadir --enable-all

%build

%make %GCC2
%make %GCC2 docs

%install

make install DESTDIR=$RPM_BUILD_ROOT
make install-doc DESTDIR=$RPM_BUILD_ROOT


# icon section
install -d %buildroot/%_miconsdir
install -d %buildroot/%_iconsdir
install -d %buildroot/%_liconsdir
bzcat %SOURCE16 > %buildroot/%_miconsdir/%name.png
bzcat %SOURCE32 > %buildroot/%_iconsdir/%name.png
bzcat %SOURCE48 > %buildroot/%_liconsdir/%name.png

# debian menu file
install -d %buildroot/%_menudir
cat << EOF > %buildroot/%_menudir/%name
?package(%name):command="/usr/bin/pfe" \
icon="%name.png"  needs="X11" section="Applications/Development/Interpreters" \
title="Pfe" longtitle="Portable Forth Environment"  
EOF

%post -p /sbin/ldconfig
%update_menus

%postun -p /sbin/ldconfig
%clean_menus

%post -n %name-fig -p /sbin/ldconfig
%postun -n %name-fig -p /sbin/ldconfig

%post -n %name-regs -p /sbin/ldconfig
%postun -n %name-regs -p /sbin/ldconfig

%post -n %name-forth -p /sbin/ldconfig
%postun -n %name-forth -p /sbin/ldconfig

%post -n %name-call -p /sbin/ldconfig
%postun -n %name-call -p /sbin/ldconfig

%post -n %name-fast -p /sbin/ldconfig
%postun -n %name-fast -p /sbin/ldconfig

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc ChangeLog INSTALL README TODO
%_bindir/%name
%_libdir/lib%{name}-0.so.*
%dir %_libdir/%{name}
%_libdir/%{name}/*
%dir %_datadir/%{name}
%_datadir/%{name}/*
%_mandir/man1/*
%_iconsdir/*.png
%_liconsdir/*
%_miconsdir/*
%_menudir/*

#%files doc 
#%defattr(-,root,root)
#    %config(noreplace) %{prefix}/%{name}.conf

%files devel
%defattr(-,root,root)
%_bindir/*-config
%dir %_prefix/include/%{name}
%_prefix/include/%{name}/*
%_prefix/include/%{name}-*
%_libdir/lib%{name}.so
%_libdir/*.la
%_libdir/*.a

%files fig
%defattr(-,root,root)
%_bindir/%{name}-fig
%_bindir/%{name}-config-fig
%_libdir/lib%{name}*-fig*
%dir %_libdir/%{name}-fig
%_libdir/%{name}-fig/*

%files regs
%defattr(-,root,root)
%_bindir/%{name}-regs
%_bindir/%{name}-config-regs
%_libdir/lib%{name}*-regs*
%dir %_libdir/%{name}-regs
%_libdir/%{name}-regs/*

%files forth
%defattr(-,root,root)
%_bindir/%{name}-regs-forth
%_bindir/%{name}-config-regs-forth
     
%files call
%defattr(-,root,root)
%_bindir/%{name}-call
%_bindir/%{name}-config-call
%_libdir/lib%{name}*-call*
%dir %_libdir/%{name}-call
%_libdir/%{name}-call/*

%files calls
%defattr(-,root,root)
%_bindir/%{name}-calls
%_bindir/%{name}-config-calls

%files fast
%defattr(-,root,root)
%_bindir/%{name}-fast
%_bindir/%{name}-config-fast
%_libdir/lib%{name}*-fast*
%dir %_libdir/%{name}-fast
%_libdir/%{name}-fast/*
	       
%changelog
* Mon Mar 17 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.32.94-1mdk
- 0.32.94
- repackage it following Guido Draheim advice (ie not break it...)

* Sat Feb 01 2003 Lenny Cartier <lenny@mandrakesoft.com> 0.32.93-2mdk
- rebuild

* Mon Nov 18 2002 Lenny Cartier <lenny@mandrakesoft.com> 0.32.93-1mdk
- 0.32.93