Name:		afnix
Version:	2.9.2
Release:	1%{?dist}
License:	AFNIX License
URL:		http://www.afnix.org/
BuildRequires:	ncurses-devel
Source:		http://www.afnix.org/ftp/%{name}-src-%{version}.tgz
Summary:	Version 2.9 of the Afnix Writing System
Group:		Development/Languages

%description
The Afnix writing system is a multi-threaded functional writing system with
dynamic symbol bindings that support the object oriented paradigm. The system
features a state of the art run-time engine that supports both 32 and 64 bits
platforms.
            
%package libs
Summary:	Library for afnix
Group:		Development/Languages
Provides:	afnix = %{version}

%description libs
This package contains the afnix development libraries

%package devel
Summary:	Development files for afnix
Group:		Development/Languages
Requires:	%{name} = %{version}

%description devel
This package contains the header files and libraries for an application
embedded afnix.

%prep
%setup -q -n %{name}-src-%{version}

%build
%{_builddir}/%{name}-src-%{version}/cnf/bin/afnix-setup -o \
  --prefix=%{buildroot} --package=rpm \
  --pkgbin=%{_bindir} --pkglib=%{_libdir} --pkghdr=%{_includedir}/afnix \
  --pkgetc=%{_sysconfdir} --pkgman=%{_mandir} --pkgdoc=%{_defaultdocdir}
make status
make %{?_smp_mflags} world

%install
make install

%post   -p /sbin/ldconfig libs

%postun -p /sbin/ldconfig libs

%files
%{_bindir}/axi
%{_bindir}/axl
%{_bindir}/axc
%{_bindir}/axd
%{_libdir}/afnix/axl/*.axl

%files libs
%{_libdir}/libafnix-*.a
%{_libdir}/libafnix-*.so.*

%files devel
%{_includedir}/afnix/*/*.hpp
%{_libdir}/libafnix-*.so

%changelog
* Sun Jan 20 2019 Afnix Release Engineering <contact@afnix.org> - 2.9.2-1
- Initial build for Fedora 29

