John D. Ramsdell f921653
%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))")}
John D. Ramsdell f921653
%global	luapkgdir %{_datadir}/lua/%{luaver}
John D. Ramsdell f921653
John D. Ramsdell f921653
Name:		datalog
John D. Ramsdell 7cfd944
Version:	2.6
2abf80c
Release:	6%{?dist}
John D. Ramsdell f921653
John D. Ramsdell f921653
Source0:	http://downloads.sourceforge.net/datalog/%{name}-%{version}.tar.gz
John D. Ramsdell f921653
John D. Ramsdell f921653
URL:		http://sourceforge.net/projects/datalog
John D. Ramsdell f921653
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
John D. Ramsdell f921653
John D. Ramsdell f921653
Summary:	A Lightweight Deductive Database using Datalog
John D. Ramsdell f921653
License:	LGPLv2+
John D. Ramsdell f921653
%if 0%{?rhel}
John D. Ramsdell f921653
Group:		Applications/Databases
John D. Ramsdell f921653
%endif
John D. Ramsdell f921653
ramsdell 591d2a4
BuildRequires:	texinfo, lua-devel > 5.1, readline-devel
John D. Ramsdell f921653
John D. Ramsdell f921653
%description
John D. Ramsdell f921653
This package contains a lightweight deductive database system.
John D. Ramsdell f921653
Queries and database updates are expressed using Datalog--a
John D. Ramsdell f921653
declarative logic language in which each formula is a function-free
John D. Ramsdell f921653
Horn clause, and every variable in the head of a clause must appear in
John D. Ramsdell f921653
the body of the clause.  The use of Datalog syntax and an
John D. Ramsdell f921653
implementation based on tabling intermediate results, ensures that all
John D. Ramsdell f921653
queries terminate.
John D. Ramsdell f921653
John D. Ramsdell f921653
The components in this package are designed to be small, and usable on
John D. Ramsdell f921653
memory constrained devices.  The package includes an interactive
John D. Ramsdell f921653
interpreter for Datalog, and the development package has a library
John D. Ramsdell f921653
that can be used to embed the interpreter into C programs.
John D. Ramsdell f921653
John D. Ramsdell f921653
%package devel
John D. Ramsdell f921653
Summary: Datalog header file and library
John D. Ramsdell f921653
%if 0%{?rhel}
John D. Ramsdell f921653
Group: Development/Libraries
John D. Ramsdell f921653
%endif
John D. Ramsdell f921653
Requires: datalog = %{version}
John D. Ramsdell f921653
John D. Ramsdell f921653
%description devel
John D. Ramsdell f921653
This package includes the header file and library that can be used to
John D. Ramsdell f921653
embed a datalog interpreter into C programs.
John D. Ramsdell f921653
John D. Ramsdell f921653
%prep
John D. Ramsdell f921653
%setup -q
John D. Ramsdell f921653
John D. Ramsdell f921653
%build
John D. Ramsdell f921653
%configure --with-lua --enable-shared --disable-static
John D. Ramsdell f921653
make %{?_smp_mflags}
John D. Ramsdell f921653
John D. Ramsdell f921653
%install
John D. Ramsdell f921653
make DESTDIR=%{buildroot} install
John D. Ramsdell f921653
mkdir -p %{buildroot}%{luapkgdir}
John D. Ramsdell f921653
install -m 644 %{name}.lua %{buildroot}%{luapkgdir}
John D. Ramsdell f921653
rm -rf %{buildroot}/%{_libdir}/lib%{name}.la
John D. Ramsdell f921653
rm -rf %{buildroot}/%{_datadir}/%{name}
John D. Ramsdell f921653
rm -rf %{buildroot}/%{_infodir}/dir
John D. Ramsdell f921653
John D. Ramsdell f921653
%clean
John D. Ramsdell f921653
rm -rf %{buildroot}
John D. Ramsdell f921653
John D. Ramsdell f921653
%post
John D. Ramsdell f921653
/sbin/ldconfig
John D. Ramsdell f921653
if [ -f %{_infodir}/%{name}.info.gz ]; then
John D. Ramsdell f921653
  /sbin/install-info %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
John D. Ramsdell f921653
fi
John D. Ramsdell f921653
John D. Ramsdell f921653
%postun
John D. Ramsdell f921653
/sbin/ldconfig
John D. Ramsdell f921653
if [ $1 -eq 0 ]; then
John D. Ramsdell f921653
  if [ -f %{_infodir}/%{name}.info.gz ]; then
John D. Ramsdell f921653
    /sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir || :
John D. Ramsdell f921653
  fi
John D. Ramsdell f921653
fi
John D. Ramsdell f921653
John D. Ramsdell f921653
%files
John D. Ramsdell f921653
%defattr (-, root, root, -)
John D. Ramsdell f921653
%doc %{name}.html ChangeLog README COPYING.LIB AUTHORS NEWS
John D. Ramsdell f921653
%{_bindir}/%{name}
John D. Ramsdell f921653
%{_libdir}/lib%{name}.so.*
John D. Ramsdell f921653
%{_infodir}/%{name}.info.gz
John D. Ramsdell f921653
%{_mandir}/man1/*
John D. Ramsdell f921653
%{luapkgdir}/%{name}.lua
John D. Ramsdell f921653
John D. Ramsdell f921653
%files devel
John D. Ramsdell f921653
%defattr (-, root, root, -)
John D. Ramsdell f921653
%{_includedir}/%{name}.h
John D. Ramsdell f921653
%{_libdir}/lib%{name}.so
John D. Ramsdell f921653
John D. Ramsdell f921653
%changelog
2abf80c
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-6
2abf80c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
2abf80c
6eda4ef
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-5
6eda4ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6eda4ef
6e5f8aa
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-4
6e5f8aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
6e5f8aa
Igor Gnatenko 63e8d85
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.6-3
Igor Gnatenko 63e8d85
- Rebuild for readline 7.x
Igor Gnatenko 63e8d85
ramsdell 591d2a4
* Fri Jun 17 2016 John D. Ramsdell <ramsdell@mitre.org> - 2.6-2
ramsdell 591d2a4
- Enabled readline support
ramsdell 591d2a4
John D. Ramsdell 7cfd944
* Thu Jun 02 2016 John D. Ramsdell <ramsdell@mitre.org> - 2.6-1
John D. Ramsdell 7cfd944
- Made header compilable and documented dl_mark and dl_reset
John D. Ramsdell 7cfd944
773eebd
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-3
773eebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
773eebd
eb70b56
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5-2
eb70b56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
eb70b56
John D. Ramsdell f1c0918
* Tue Apr 28 2015 John D. Ramsdell <ramsdell@mitre.org> - 2.5-1
John D. Ramsdell f1c0918
- Updated Lua sources to version 5.3.0
John D. Ramsdell f1c0918
ed98cf5
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-5
ed98cf5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ed98cf5
96f4487
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-4
96f4487
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
96f4487
e5f8179
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4-3
e5f8179
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
e5f8179
ea9654f
* Tue May 14 2013 Tom Callaway <spot@fedoraproject.org> - 2.4-2
ea9654f
- rebuild for lua 5.2
ea9654f
John D. Ramsdell 83c1a00
* Wed Mar 27 2013 John D. Ramsdell <ramsdell@mitre.org> - 2.4-1
John D. Ramsdell 83c1a00
- Add support for ARM 64 bit CPU architecture (aarch64)
John D. Ramsdell 83c1a00
2505916
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-3
2505916
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2505916
John D. Ramsdell a318d52
* Mon Oct 22 2012 John D. Ramsdell <ramsdell@mitre.org> - 2.3-2
John D. Ramsdell a318d52
- Remove lua(api) requirement
John D. Ramsdell a318d52
John D. Ramsdell f921653
* Thu Jun  7 2012 John D. Ramsdell <ramsdell@mitre.org> - 2.2-4
John D. Ramsdell f921653
- Added lua(abi) requirement
John D. Ramsdell f921653
John D. Ramsdell f921653
* Tue Jun  5 2012 John D. Ramsdell <ramsdell@mitre.org> - 2.2-3
John D. Ramsdell f921653
- Removed rm of build root in %%install
John D. Ramsdell f921653
- Group field defined only for RHEL
John D. Ramsdell f921653
- Removed license field in subpackage devel
John D. Ramsdell f921653
John D. Ramsdell f921653
* Fri May 25 2012 John D. Ramsdell <ramsdell@mitre.org> - 2.2-2
John D. Ramsdell f921653
- Changed %%define to %%global
John D. Ramsdell f921653
John D. Ramsdell f921653
* Thu Apr 26 2012 John D. Ramsdell <ramsdell@mitre.org> - 2.2-1
John D. Ramsdell f921653
- Changed devel requires from libdatalog to datalog
John D. Ramsdell f921653
John D. Ramsdell f921653
* Sun Apr  8 2012 John D. Ramsdell <ramsdell@mitre.org> - 2.1-1
John D. Ramsdell f921653
- Added AUTHORS and NEWS to %%doc
John D. Ramsdell f921653
John D. Ramsdell f921653
* Thu Jan 26 2012 John D. Ramsdell <ramsdell@mitre.org> - 1.8-2
John D. Ramsdell f921653
- Use lua to determine its version number
John D. Ramsdell f921653
John D. Ramsdell f921653
* Wed Jan 18 2012 John D. Ramsdell <ramsdell@mitre.org> - 1.8-1
John D. Ramsdell f921653
- Added a manual page
John D. Ramsdell f921653
John D. Ramsdell f921653
* Fri Jan 13 2012 John D. Ramsdell <ramsdell@mitre.org> - 1.7-3
John D. Ramsdell f921653
- Fix devel license and summary
John D. Ramsdell f921653
- chmod 644 on installed datalog.lua
John D. Ramsdell f921653
John D. Ramsdell f921653
* Wed Oct 12 2011 John D. Ramsdell <ramsdell@mitre.org> - 1.7-2
John D. Ramsdell f921653
- Added devel package
John D. Ramsdell f921653
- Moved luapkgdir def to top of file
John D. Ramsdell f921653
- sf.net --> sourceforge.net
John D. Ramsdell f921653
- Removed Packager field
John D. Ramsdell f921653
- Removed newline between %%description and text
John D. Ramsdell f921653
John D. Ramsdell f921653
* Thu Sep 29 2011 John D. Ramsdell <ramsdell@mitre.org> - 1.7-1
John D. Ramsdell f921653
- Use installed Lua package and shared libraries
John D. Ramsdell f921653
John D. Ramsdell f921653
* Tue Sep 20 2011 John D. Ramsdell <ramsdell@mitre.org> - 1.6-2
John D. Ramsdell f921653
- Removed devel package
John D. Ramsdell f921653
John D. Ramsdell f921653
* Sat Aug 6 2011 John D. Ramsdell <ramsdell@mitre.org> - 1.6-1
John D. Ramsdell f921653
- Fixed license name by adding version number
John D. Ramsdell f921653
- Dropped vendor field
John D. Ramsdell f921653
- Switched to standard name for build root
John D. Ramsdell f921653
- %%defaddrs now contain four fields
John D. Ramsdell f921653
- Removed asterisks in %%files
John D. Ramsdell f921653
- Added COPYING.LIB
John D. Ramsdell f921653
John D. Ramsdell f1c0918
* Thu Jul 7 2011 John D. Ramsdell <ramsdell@mitre.org> - 1.4-1
John D. Ramsdell f921653
- Initial spec release