File bff4.spec of Package bff4
Name: bff4
Version: 1
Release: 0
License: OSI_COMPLIANT_FREE(Public domain)
Source0: %{name}.c
Patch0: arg.patch
Group: Development/Languages/Other
Summary: Fast Brainfuck interpreter
URL: http://mazonka.com/brainf/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Optimizing brainfuck implementation of dialect based on Daniel's dbfi (see "A very short self-interpreter")
This interpreter has only one input: program and input to the program have to be separated with ! e.g. ",.!a" prints 'a' To use it in interactive mode paste your program as input.
This program can be compiled with LNR macro defined. LNR is another optimization of linear loops (where '<>' balanced), e.g. [->+>++<<]. Linear loop is then executed in one step.
Oleg Mazonka 4.12.06 http://mazonka.com/
%prep
%__cp %{SOURCE0} .
%patch0
%build
gcc %{SOURCE0} -o %{name} %optflags
gcc %{SOURCE0} -DLNR -o %{name}lnr %optflags
%install
%__install -D -m 755 %{name} %buildroot%{_bindir}/%{name}
%__install -D -m 755 %{name}lnr %buildroot%{_bindir}/%{name}lnr
%clean
%__rm -rf %buildroot
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_bindir}/%{name}lnr
%changelog