Sisyphus
: 1 2023 | : 18631 | : 30506708
en ru br
ALT
5.1: 3.5c3-alt4
4.1: 3.5c2-alt2
4.0: 3.5a2-alt1
www.altlinux.org/Changes

:: /
: 4th

             Sources      Gear   Bugs and FR  Repocop 

%define _optlevel 3
%define ccomp gcc

%define Name 4tH
Name: 4th
%define lname lib%name
%define ver 3.5a
%define subver 2
Version: %ver%subver
Release: alt1
Summary: Basic framework for creating application specific scripting languages
Summary(uk_UA.CP1251):
Summary(ru_RU.CP1251):
License: LGPL
Group: Development/Other
URL: http://hansoft.come.to/
Source: %name-%version-unix.tar.bz2
Source1: %{name}c.c.gz
Source2: %{name}d.c.gz
Source3: %{name}g.c.gz
Source4: %{name}x.c.gz

%if %ccomp == tcc
BuildRequires: tcc >= 0.9.23-alt3
%endif

%description
%Name is basic framework for creating application specific scripting
languages. It is a library of functions centered around a virtual
machine, which guarantees high performance, ease of use and low
overhead. But in the meanwhile %Name has acquired a reputation as an
educational tool. Its simplicity makes it perfectly suited to learn
Forth, from which it has been derived.
This package is an attempt to suit both audiences. It contains
instructions how to modify the package in order to fit your own
requirements. %Name in its current form is a calculator for simple
teletype applications.

%description -l uk_UA.CP1251
%Name -
. - ,
,
. , , %Name
.
Forth' ( ).
. ³
. %Name -
.

%description -l ru_RU.CP1251
%Name -
. -
, ,
. , ,
%Name .
Forth' ( ).
.
. %Name
-
.


%package examples
Group: Development/Other
Summary: Examples for the %Name
Summary(uk_UA.CP1251): %Name
Summary(ru_RU.CP1251): %Name
Requires: %name = %version

%description examples
%Name is basic framework for creating application specific scripting
languages. It is a library of functions centered around a virtual
machine, which guarantees high performance, ease of use and low
overhead. But in the meanwhile %Name has acquired a reputation as an
educational tool. Its simplicity makes it perfectly suited to learn
Forth, from which it has been derived.

This package contains examples for the %Name.

%description -l uk_UA.CP1251 examples
%Name -
. - ,
,
. , , %Name
.
Forth' ( ).

%Name.

%description -l ru_RU.CP1251 examples
%Name -
. -
, ,
. , ,
%Name .
Forth' ( ).

%Name.


%package -n %lname-devel
Group: Development/C
Summary: Files required to link software that uses %lname
Summary(uk_UA.CP1251): , , %lname
Summary(ru_RU.CP1251): , , %lname
Provides: %lname-devel-static

%description -n %lname-devel
%Name is basic framework for creating application specific scripting
languages. It is a library of functions centered around a virtual
machine, which guarantees high performance, ease of use and low
overhead. All its basic building blocks (compiler, interpreter,
decompiler, loader and saver) can be called with a single line of C. No
initialization necessary.

This package contains %lname.a and headers for development whith %Name.

%description -n %lname-devel -l uk_UA.CP1251
%Name -
. - ,
,
. (, ,
, )
C, .

%lname.a %Name.

%description -n %lname-devel -l ru_RU.CP1251
%Name -
. -
, ,
. , ,
%Name .
Forth' ( ).

%lname.a %Name.


%prep
%setup -q -n %name-%ver
for f in %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4; do
   gzip -dc -- $f > sources/`basename "$f" .gz`
done


%build
%make_build -C sources \
   BINARIES=%_bindir LIBRARIES=%_libdir INCLUDES=%_includedir \
   CFLAGS="%optflags -DUNIX" CC=%__cc all 4thc 4thd 4thx 4thg \
%ifdef ccomp
   CC=%ccomp \
%else
   CC=%__cc \
%endif
   all


%install
install -d -m 0755 %buildroot{%_bindir,%_libdir/%name,%_includedir/%name,%_docdir/%name-%version/examples}
%make_install -C sources \
   BINARIES=%buildroot%_bindir \
   LIBRARIES=%buildroot%_libdir \
   install
install -m 0755 sources/4th[cdgx] %buildroot%_bindir/
install -pD -m 0644 documentation/%name.1 %buildroot%_man1dir/%name.1
ln -s %name.1 %buildroot%_man1dir/%{name}x.1
install -m 0644 sources/*4th.h %buildroot%_includedir/%name/
install -m 0644 lib/* %buildroot%_libdir/%name/
find examples -type f -exec install -pD -m 0644 \{} %buildroot%_docdir/%name-%version/\{} \;
install -m 0644 documentation/euro.txt %buildroot%_docdir/%name-%version/examples/
install -m 0644 README documentation/4tHmanual.txt %buildroot%_docdir/%name-%version/

# menu

%ifdef _desktopdir
install -d %buildroot%_desktopdir
iconv -f cp1251 -t utf-8 > %buildroot%_desktopdir/%name.desktop <<__MENU__
[Desktop Entry]
Encoding=UTF-8
GenericName=%Name
Name=%Name System
Name[uk]=%Name-
Name[ru]=%Name-
Exec=%name
Icon=shells_section.png
Path=
Type=Application
Terminal=true
Categories=Application;Development;
__MENU__
%else
install -d %buildroot%_menudir
cat >%buildroot%_menudir/%name <<__MENU__
?package(%name): needs="text" section=%group" \
icon="shells_section.png" title="%name" longtitle="%Name System" \
command="%_bindir/%name"
__MENU__
%endif


%post
%update_menus


%postun
%clean_menus


%files
%dir %_docdir/%name-%version
%_docdir/%name-%version/*.txt
%_docdir/%name-%version/README
%_bindir/*
%_libdir/%name
%_man1dir/*
%ifdef _desktopdir
%_desktopdir/*
%else
%_menudir/*
%endif


%files -n %lname-devel
%_includedir/%name
%_libdir/*.a


%files examples
%dir %_docdir/%name-%version
%_docdir/%name-%version/examples


%changelog

changelog

 
: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
: Michael Shigorin