Blob Blame History Raw
%define host     www.falconpl.org

Name:            Falcon
Version:         0.8.8
Release:         3%{?dist}
Summary:         The Falcon Programming Language
Summary(it):     Il linguaggio di programmazione Falcon
License:        GPLv2+
Group:          Development/Languages
URL:            http://%{host}/
Source:         http://%{host}/downloads/%{version}/%{name}-%{version}-fc9.tar.gz
Patch0:         Falcon-0.8.8-libdir.patch
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  bison cmake pcre-devel zlib-devel

%description
The Falcon Programming Language is an embeddable scripting language
aiming to empower even simple applications with a powerful,
flexible, extensible and highly configurable scripting engine.

Falcon is also a standalone multiplatform scripting language that
aims to be both simple and powerful.

%description -l it
Il Falcon è un linguaggio di programmazione embeddabile che intende
fornire nuove potenzialità anche a semplici applicazioni, fornendo
loro un potente, flessibie, estendibile e configurabile motore
di scripting.

Falcon è anche uno scripting languge completo e multipiattaforma,
semplice e potente.

%package   devel
Summary:   Development files for %{name}
Group:     Development/Libraries
Requires:  %{name} = %{version}-%{release}

%description devel
The Falcon Programming Language is an embeddable scripting language
aiming to empower even simple applications with a powerful,
flexible, extensible and highly configurable scripting engine.

Falcon is also a standalone multiplatform scripting language that
aims to be both simple and powerful.

This package contains development files for %{name}. This is not
necessary for using the %{name} interpreter.


%prep
%setup -q
%patch0 -p1 -b .libdir


%build
# Using only -j 2 (max two processors in build) flags.
# It seems CMAKE has some problem in determining priority of startup actions
# so the package won't build correctly with -j more than 2.
#
CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" ./build.sh \
  -p $RPM_BUILD_ROOT%{_prefix} -f %{_prefix} -l %{_lib} -j 2


%install
rm -rf $RPM_BUILD_ROOT
./build.sh -i
#avoid complains for cmake installed files
rm -rf $RPM_BUILD_ROOT/build


%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc ChangeLog README RELNOTES LICENSE GPLv2-grant
%exclude %{_bindir}/falcon-conf
%exclude %{_bindir}/falconeer.fal
%exclude %{_bindir}/faltest
%{_bindir}/*
%exclude %{_mandir}/man1/falcon-conf*
%exclude %{_mandir}/man1/falconeer.fal*
%exclude %{_mandir}/man1/faltest*
%{_libdir}/falcon
%{_libdir}/*.so.*
%{_mandir}/man1/*

%files devel
%defattr(-,root,root,-)
%{_bindir}/falcon-conf
%{_bindir}/falconeer.fal
%{_bindir}/faltest
%{_includedir}/*
%{_libdir}/*.so
%{_mandir}/man1/falcon-conf*
%{_mandir}/man1/falconeer.fal*
%{_mandir}/man1/faltest*

%changelog
* Wed May 21 2008 Michel Salim <salimma@fedoraproject.org> - 0.8.8-3
- Use correct libdir for module path

* Thu Apr 24 2008 Michel Salim <salimma@fedoraproject.org> - 0.8.8-2
- Updated license
- Changed source URL to one that includes license grant

* Fri Jan 25 2008 Michel Salim <michel.sylvan@gmail.com> - 0.8.8-1
- Initial Fedora package
  Based on initial spec by Giancarlo Niccolai <gc@falconpl.org>