File falcon.spec of Package falcon

#norootforbuild

Name:          falcon
License:       GPLv2 or FPLLv1.1
Group:         Development/Languages/Other
Summary:       The Falcon Programming Language
Version:       0.9.6.8
Release:       0
URL:           http://falconpl.org/
# from http://falconpl.org/project_dl/_official_rel/Falcon-<version>.tar.gz
Source:        Falcon-%{version}.tar.bz2
BuildRoot:     %{_tmppath}/falcon-%{version}-build
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: cmake >= 2.8
BuildRequires: bison
BuildRequires: zlib-devel
BuildRequires: pcre-devel
BuildRequires: readline-devel

BuildRequires: freetype2-devel
BuildRequires: gtk2-devel >= 2.20
BuildRequires: sqlite3-devel libmysqlclient-devel postgresql-devel
BuildRequires: libcurl-devel
BuildRequires: dbus-1-devel
BuildRequires: gd-devel
BuildRequires: libSDL-devel libSDL_image-devel libSDL_mixer-devel libSDL_ttf-devel


Provides:      falcon-bufext
Provides:      falcon-compiler
Provides:      falcon-confparser
Provides:      falcon-funcext
Provides:      falcon-hash
Provides:      falcon-json
Provides:      falcon-logging
Provides:      falcon-math_extra
Provides:      falcon-mxml
Provides:      falcon-process
Provides:      falcon-regex
Provides:      falcon-socket
Provides:      falcon-threading
Provides:      falcon-zlib
Provides:      falcon-testsuite

%description
An Open Source, simple, fast and powerful programming language which is easy to
learn and to feel comfortable with.

Falcon provides six integrated programming paradigms: procedural, object
oriented, prototype oriented, functional, tabular and message oriented. And you
don't have to master all of them; you just need to pick the ingredients you
prefer, and let the code to follow your inspiration.

This package contains the main interpreter as well as the default "feathers"
(core modules)

%package devel
Summary:       The Falcon Programming Language development libraries
Group:         Development/Languages/Other
Requires:      falcon = %{version}

%description devel
An Open Source, simple, fast and powerful programming language which is easy to
learn and to feel comfortable with.

Falcon provides six integrated programming paradigms: procedural, object
oriented, prototype oriented, functional, tabular and message oriented. And you
don't have to master all of them; you just need to pick the ingredients you
prefer, and let the code to follow your inspiration.

%package tools
Summary:      The Falcon Programming Language additional tools
Group:        Development/Languages/Other
Requires:     falcon = %{version}

%description tools
An Open Source, simple, fast and powerful programming language which is easy to
learn and to feel comfortable with.

Falcon provides six integrated programming paradigms: procedural, object
oriented, prototype oriented, functional, tabular and message oriented. And you
don't have to master all of them; you just need to pick the ingredients you
prefer, and let the code to follow your inspiration.

This package contains tools useful when creating applications with Falcon

%package -n libfalcon_engine1
Summary:      The Falcon Programming Language engine
Group:        Development/Languages/Other

%description -n libfalcon_engine1
An Open Source, simple, fast and powerful programming language which is easy to
learn and to feel comfortable with.

Falcon provides six integrated programming paradigms: procedural, object
oriented, prototype oriented, functional, tabular and message oriented. And you
don't have to master all of them; you just need to pick the ingredients you
prefer, and let the code to follow your inspiration.


%package -n faldoc
Summary:	Documentation generator for Falcon
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n faldoc
The Falcon autodocumentation tool

%package -n falcon-mysql
Summary:	Falcon MySql module
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-mysql
A Falcon module for working with MySql databases

%package -n falcon-sqlite3
Summary:	Falcon Sqlite3 module
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-sqlite3
A Falcon module for working with Sqlite databases

%package -n falcon-pgsql
Summary:	Falcon PGSql module
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-pgsql
A Falcon module for working with PostgreSql databases

%package -n falcon-img
#BuildArch:  noarch
Summary:	Falcon image module
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-img
A Falcon module for working with images

%package -n falcon-nest
Summary:	Falcon web framework
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-nest
A Falcon web framework

%package -n falcon-net
#BuildArch:  noarch
Summary:	Falcon internet modules
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-net
Falcon modules for interacting with the internet

%package -n falcon-parser
#BuildArch:  noarch
Summary:	Falcon parser modules
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-parser
A Falson parser module

%package -n falcon-struct
#BuildArch:  noarch
Summary:	Falcon structures modules
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-struct
Generic structures for Falcon

%package -n falcon-web
#BuildArch:  noarch
Summary:	Falcon web modules
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-web
Generic structures for Falcon

%package -n falcon-gtk
Summary:	GTK2 bindings for Falcon
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-gtk
GTK2 bindings for Falcon

%package -n falcon-dbi
Summary:	Database interfaces for Falcon
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-dbi
Database interfaces for Falcon

%package -n falcon-curl
Summary:	CURL bindings for Falcon
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-curl
CURL bindings for Falcon

%package -n falcon-dbus
Summary:	DBUS bindings for Falcon
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-dbus
DBUS bindings for Falcon

%package -n falcon-gd2
Summary:	DBUS bindings for Falcon
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-gd2
DBUS bindings for Falcon

%package -n falcon-sdl
Summary:	SDL bindings for Falcon
Group:		Development/Languages/Other
Requires:   falcon = %{version}

%description -n falcon-sdl
SDL bindings for Falcon

%define falcon_moduledir %_prefix/%_lib/falcon


%prep
%setup -n Falcon-%{version} -q

%build
mkdir _build && cd _build

export CXXFLAGS="$RPM_OPT_FLAGS"
export CFLAGS="$RPM_OPT_FLAGS"

cmake .. -DCMAKE_INSTALL_PREFIX:STRING=%_prefix \
         -DFALCON_INC_DIR:STRING=include/falcon \
         -DFALCON_LIB_DIR:STRING=%_lib \
         -DFALCON_INSTALL_TREE_LIB:STRING=%_lib \
         -DFALCON_WITH_INTERNAL_PCRE=OFF \
         -DFALCON_WITH_INTERNAL_ZLIB=OFF \
         -DFALCON_WITH_READLINE=ON \
         -DFALCON_WITH_GPL_READLINE=ON \
         -DFALCON_BUILD_MONGODB=OFF \
         -DCMAKE_BUILD_TYPE=RelWithDebugInfo

#FALCON_INC_DIR is explicit to avoid placing files in version specific directory

# Need to install the core to under the build dir for the feathers to find, and then later install (copy) it to the final destination.
# See 14 Jan 2010 log for #falcon
VERBOSE=1 make %{?_smp_mflags}

%install
cd _build
VERBOSE=1 make DESTDIR=$RPM_BUILD_ROOT install %{?_smp_mflags}

rm $RPM_BUILD_ROOT%_prefix/share/falcon*/BUILDING

mkdir -p $RPM_BUILD_ROOT%_prefix/share/doc/packages/falcon
mv $RPM_BUILD_ROOT%_prefix/share/falcon*/{AUTHORS,ChangeLog,copyright,LICENSE*,README*,TODO,RELNOTES} $RPM_BUILD_ROOT%_prefix/share/doc/packages/falcon

%post -n libfalcon_engine1 -p /sbin/ldconfig

%postun -n libfalcon_engine1 -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_bindir}/falcon
%{_bindir}/falrun
%{_bindir}/faldisass
%doc %{_mandir}/man1/falcon.1.*
%doc %{_mandir}/man1/falrun.1.*
%doc %{_mandir}/man1/faldisass.1.*
%doc %{_prefix}/share/doc/packages/falcon/*
%dir %{_prefix}/share/doc/packages/falcon
%dir %{_libdir}/falcon/
%dir %{_libdir}/falcon/apps
%{_libdir}/falcon/bufext_fm.so
%{_libdir}/falcon/compiler_fm.so
%{_libdir}/falcon/confparser_fm.so
%{_libdir}/falcon/funcext_fm.so
%{_libdir}/falcon/hash_fm.so
%{_libdir}/falcon/json_fm.so
%{_libdir}/falcon/logging_fm.so
%{_libdir}/falcon/math_extra_fm.so
%{_libdir}/falcon/mxml_fm.so
%{_libdir}/falcon/process_fm.so
%{_libdir}/falcon/regex_fm.so
%{_libdir}/falcon/socket_fm.so
%{_libdir}/falcon/threading_fm.so
%{_libdir}/falcon/zlib_fm.so
%{_libdir}/falcon/testsuite_fm.so

%files devel
%defattr(-,root,root)
%dir %{_includedir}/falcon
%{_includedir}/falcon/*
%{_libdir}/*.so
%{_bindir}/falcon-conf
%{_bindir}/falconenv.sh
%{_bindir}/icomp.sh
%doc %{_mandir}/man1/falcon-conf.1.*
%{_prefix}/share/falcon*/cmake/*.cmake
%dir %{_prefix}/share/falcon*
%dir %{_prefix}/share/falcon*/cmake

%files -n libfalcon_engine1
%defattr(-,root,root)
%{_libdir}/libfalcon_engine.so.*

%files tools
%defattr(-,root,root)
%{_bindir}/faltest
%{_bindir}/fallc.fal
%{_bindir}/falconeer.fal
%{_bindir}/falpack
%doc %{_mandir}/man1/faltest.1.*
%doc %{_mandir}/man1/fallc.fal.1.*
%doc %{_mandir}/man1/falconeer.fal.1.*
%doc %{_mandir}/man1/falpack.1.*


%files -n faldoc
%defattr(-,root,root)
%{_bindir}/faldoc
%dir %{falcon_moduledir}/apps/faldoc
%{falcon_moduledir}/apps/faldoc/*
%dir %{_prefix}/share/cmake/faldoc
%{_prefix}/share/cmake/faldoc/faldoc-config.cmake

%files -n falcon-dbi
%defattr(-,root,root)
%{falcon_moduledir}/dbi_fm.so
%dir %{falcon_moduledir}/dbi

%files -n falcon-mysql
%defattr(-,root,root)
%{falcon_moduledir}/dbi/mysql_fm.so

%files -n falcon-sqlite3
%defattr(-,root,root)
%{falcon_moduledir}/dbi/sqlite3_fm.so

%files -n falcon-pgsql
%defattr(-,root,root)
%{falcon_moduledir}/dbi/pgsql_fm.so

%files -n falcon-img
%defattr(-,root,root)
%dir %{falcon_moduledir}/img
%{falcon_moduledir}/img/*

%files -n falcon-nest
%defattr(-,root,root)
%{falcon_moduledir}/nest.*
%dir %{falcon_moduledir}/nest
%{falcon_moduledir}/nest/*

%files -n falcon-net
%defattr(-,root,root)
%dir %{falcon_moduledir}/net
%{falcon_moduledir}/net/*

%files -n falcon-parser
%defattr(-,root,root)
%dir %{falcon_moduledir}/parser
%{falcon_moduledir}/parser/*

%files -n falcon-struct
%defattr(-,root,root)
%dir %{falcon_moduledir}/struct
%{falcon_moduledir}/struct/*

%files -n falcon-web
%defattr(-,root,root)
%dir %{falcon_moduledir}/web
%{falcon_moduledir}/web/*

%files -n falcon-gtk
%defattr(-,root,root)
%{falcon_moduledir}/gtk_fm.so

%files -n falcon-curl
%defattr(-,root,root)
%{falcon_moduledir}/curl_fm.so

%files -n falcon-dbus
%defattr(-,root,root)
%{falcon_moduledir}/dbus_fm.so

%files -n falcon-gd2
%defattr(-,root,root)
%{falcon_moduledir}/gd2_fm.so

%files -n falcon-sdl
%defattr(-,root,root)
%{falcon_moduledir}/sdl_fm.so
%dir %{falcon_moduledir}/sdl
%{falcon_moduledir}/sdl/*.so

%changelog
* Mon May 3 2010 Pavol Rusnak <prusnak@suse.cz.> - 0.9.6.4
- spec cleanup
* Thu Mar 18 2010 Matt Williams <matt@milliams.com> - 0.9.6.4
- Update to 0.9.6.4
* Thu Feb 11 2010 Matt Williams <matt@milliams.com> - 0.9.6.2
- Update to 0.9.6.2
* Wed Jan 13 2010 Matt Williams <matt@milliams.com> - 0.9.6
- Update to 0.9.6
* Thu Oct 22 2009 Matt Williams <matt@milliams.com> - 0.9.4.4
- Update to 0.9.4.4
* Wed Oct 14 2009 Matt Williams <matt@milliams.com> - 0.9.4.2
- Update to 0.9.4.2
* Mon Aug 17 2009 Matt Williams <matt@milliams.com> - 0.9.4
- Update to 0.9.4
* Sun Jun 21 2009 Matt Williams <matt@milliams.com> - 0.9.2
- Update to 0.9.2
* Wed May 20 2009 Matt Williams <matt@milliams.com> - 0.9.1.8
- Update to 0.9.2 RC2 (0.9.1.8)
* Sat Apr 25 2009 Matt Williams <matt@milliams.com> - 0.9.1.6
- Update to 0.9.2 RC1 (0.9.1.6)
* Sat Apr 25 2009 Matt Williams <matt@milliams.com> - 0.9.1.4
- Update to latest version
* Sat Apr 25 2009 Matt Williams <matt@milliams.com> - 0.9.1.2
- Update to latest version
* Sat Apr 11 2009 Matt Williams <matt@milliams.com> - 0.9.1
- Update to latest version
* Thu Apr 9 2009 Matt Williams <matt@milliams.com> - 0.9.0
- Initial build of Falcon
openSUSE Build Service is sponsored by