7a28f8f
# Prevent RPM from stripping the binaries, which breaks them:
7a28f8f
%define __strip /bin/true
7a28f8f
7a28f8f
%define _default_patch_fuzz 2
7a28f8f
7a28f8f
Name:           nekovm
719f8ee
Version:        2.0.0
1552b6b
Release:        4%{?dist}
7a28f8f
Summary:        Neko embedded scripting language and virtual machine
7a28f8f
7a28f8f
Group:          Development/Libraries
7a28f8f
License:        LGPLv2+
7a28f8f
URL:            http://nekovm.org/
7a28f8f
Source0:        http://nekovm.org/_media/neko-%{version}.tar.gz
7a28f8f
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
7a28f8f
7a28f8f
# Disable the Apache and mod_tora packages for now.
7a28f8f
Patch0:         nekovm-no-apache.patch
7a28f8f
Patch1:         nekovm-no-mod_tora.patch
7a28f8f
7a28f8f
# Search /usr/lib64 for libraries.
7a28f8f
Patch2:         nekovm-library-paths.patch
7a28f8f
7a28f8f
# Search /usr/lib64/neko for NDLL files.  (XXX only on x86-64?)
7a28f8f
Patch3:         nekovm-ndll-paths.patch
7a28f8f
7a28f8f
# Link against libmysqlclient.so, not .a
7a28f8f
Patch4:         nekovm-libmysqlclient.so.patch
7a28f8f
7a28f8f
# Set the soname correctly on the shared library.
7a28f8f
Patch5:         nekovm-set-soname.patch
7a28f8f
9d46d37
# Allow extra CFLAGS to be passed.
9d46d37
Patch6:         nekovm-extra-cflags.patch
9d46d37
7a28f8f
BuildRequires:  gc-devel
7a28f8f
BuildRequires:  pcre-devel
7a28f8f
BuildRequires:  gtk2-devel
7a28f8f
BuildRequires:  mysql-devel
7a28f8f
BuildRequires:  sqlite-devel >= 3
7a28f8f
BuildRequires:  dos2unix
7a28f8f
7a28f8f
7a28f8f
%description
7a28f8f
Neko is a high-level dynamically typed programming language which can
7a28f8f
also be used as an embedded scripting language. It has been designed
7a28f8f
to provide a common runtime for several different languages. Neko is
7a28f8f
not only very easy to learn and use, but also has the flexibility of
7a28f8f
being able to extend the language with C libraries. You can even write
7a28f8f
generators from your own language to Neko and then use the Neko
7a28f8f
Runtime to compile, run, and access existing libraries.
7a28f8f
7a28f8f
If you need to add a scripting language to your application, Neko
7a28f8f
provides one of the best tradeoffs available between simplicity,
7a28f8f
extensibility and speed.
7a28f8f
7a28f8f
Neko allows the language designer to focus on design whilst reusing a
7a28f8f
fast and well constructed runtime, as well as existing libraries for
7a28f8f
accessing filesystem, network, databases, xml...
7a28f8f
7a28f8f
Neko has a compiler and virtual machine. The Virtual Machine is both
7a28f8f
very lightweight and extremely well optimised so that it can run very
7a28f8f
quickly. The VM can be easily embedded into any application and your
7a28f8f
libraries are directly accessible using the C foreign function
7a28f8f
interface.
7a28f8f
7a28f8f
The compiler converts a source .neko file into a bytecode .n file that
7a28f8f
can be executed with the Virtual Machine. Although the compiler is
7a28f8f
written in Neko itself, it is still very fast. You can use the
7a28f8f
compiler as standalone commandline executable separated from the VM,
7a28f8f
or as a Neko library to perform compile-and-run for interactive
7a28f8f
languages.
7a28f8f
7a28f8f
Note that the Fedora package does not yet include the Apache modules
7a28f8f
(mod_neko and mod_tora) owing to the difficulty in getting them to
7a28f8f
compile.
7a28f8f
7a28f8f
7a28f8f
%package        devel
7a28f8f
Summary:        Development files for %{name}
7a28f8f
Group:          Development/Libraries
7a28f8f
Requires:       %{name} = %{version}-%{release}
7a28f8f
7a28f8f
7a28f8f
%description    devel
7a28f8f
The %{name}-devel package contains libraries and signature files for
7a28f8f
developing applications that use %{name}.
7a28f8f
7a28f8f
7a28f8f
%prep
7a28f8f
%setup -q -n neko-%{version}
7a28f8f
7a28f8f
for f in CHANGES LICENSE `find -name '*.[ch]' -o -name 'install.neko'`; do
7a28f8f
  dos2unix --keepdate $f
7a28f8f
  chmod -x $f
7a28f8f
done
7a28f8f
7a28f8f
%patch0 -p1
7a28f8f
%patch1 -p1
7a28f8f
%patch2 -p1
7a28f8f
%patch3 -p1
7a28f8f
%patch4 -p1
7a28f8f
%patch5 -p1
9d46d37
%patch6 -p1
7a28f8f
ca29399
# Fedora only supports SSE on x86_64
ca29399
%ifnarch x86_64
ca29399
sed -i.sse 's/-msse2 -mfpmath=sse //g' Makefile
ca29399
%endif
7a28f8f
7a28f8f
%build
7a28f8f
# Avoid a compiler stack-overflow when building on 64 bit.
7a28f8f
ulimit -s unlimited
9d46d37
719f8ee
# MAKEFLAGS=-jN breaks the build.
719f8ee
unset MAKEFLAGS
719f8ee
9d46d37
# Add the RPM flags to CFLAGS.
9d46d37
make EXTRA_CFLAGS="$RPM_OPT_FLAGS"
9d46d37
9d46d37
9d46d37
%check
9d46d37
make test
7a28f8f
7a28f8f
7a28f8f
%install
7a28f8f
rm -rf $RPM_BUILD_ROOT
7a28f8f
mkdir -p $RPM_BUILD_ROOT%{_bindir}
7a28f8f
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
7a28f8f
mkdir -p $RPM_BUILD_ROOT%{_libdir}
7a28f8f
mkdir -p $RPM_BUILD_ROOT%{_includedir}
7a28f8f
7a28f8f
make INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} install
7a28f8f
7a28f8f
# Put the lib files in the Fedora _libdir:
7a28f8f
if [ %{_prefix}/lib != %{_libdir} ]; then
7a28f8f
  mv $RPM_BUILD_ROOT%{_prefix}/lib/* $RPM_BUILD_ROOT%{_libdir}
7a28f8f
  rmdir $RPM_BUILD_ROOT%{_prefix}/lib
7a28f8f
fi
7a28f8f
719f8ee
# Make libneko.so be a link, not a copy, of libneko.so.1.
719f8ee
pushd $RPM_BUILD_ROOT%{_libdir}
719f8ee
rm libneko.so
719f8ee
ln -s libneko.so.1 libneko.so
719f8ee
popd
719f8ee
7a28f8f
# Stop prelink from stripping the binaries - they contain bytecode.
7a28f8f
mkdir -p $RPM_BUILD_ROOT/etc/prelink.conf.d
7a28f8f
echo '-b /usr/bin/neko*' > $RPM_BUILD_ROOT/etc/prelink.conf.d/nekovm.conf
7a28f8f
7a28f8f
# Remove nekoml.std - what's it for?
7a28f8f
rm $RPM_BUILD_ROOT%{_bindir}/nekoml.std
7a28f8f
7a28f8f
7a28f8f
%clean
7a28f8f
rm -rf $RPM_BUILD_ROOT
7a28f8f
7a28f8f
7a28f8f
%post -p /sbin/ldconfig
7a28f8f
7a28f8f
%postun -p /sbin/ldconfig
7a28f8f
7a28f8f
7a28f8f
%files
7a28f8f
%defattr(-,root,root,-)
7a28f8f
%doc LICENSE
7a28f8f
%{_bindir}/neko
7a28f8f
%{_bindir}/nekoc
7a28f8f
%{_bindir}/nekoml
7a28f8f
#{_bindir}/nekoml.std
7a28f8f
%{_bindir}/nekotools
7a28f8f
%{_libdir}/libneko.so
7a28f8f
%{_libdir}/libneko.so.1
7a28f8f
%{_libdir}/neko/
7a28f8f
%config(noreplace) /etc/prelink.conf.d/nekovm.conf
7a28f8f
7a28f8f
7a28f8f
%files devel
7a28f8f
%defattr(-,root,root,-)
7a28f8f
%doc CHANGES
7a28f8f
%{_includedir}/*.h
7a28f8f
7a28f8f
7a28f8f
%changelog
1552b6b
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-4
1552b6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
1552b6b
f4b0a2f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
f4b0a2f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f4b0a2f
cad5a34
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
cad5a34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
cad5a34
719f8ee
* Mon Jul  1 2013 Richard W.M. Jones <rjones@redhat.com> - 2.0.0-1
719f8ee
- New upstream version 2.0.0 (RHBZ#979806).
719f8ee
- Rebase patches.
719f8ee
- Unset MAKEFLAGS before build.
719f8ee
- Make libneko.so be a symlink to libneko.so.1.
719f8ee
d60b295
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.2-5
d60b295
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d60b295
5009372
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.2-4
5009372
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5009372
ca29399
* Thu Jul  5 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.8.2-3
ca29399
- Only build SSE on x86_64 to fix FTBFS
ca29399
1969404
* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 1.8.2-2
1969404
- Rebuild against PCRE 8.30
1969404
9d46d37
* Mon Jan 16 2012 Richard W.M. Jones <rjones@redhat.com> - 1.8.2-1
9d46d37
- New upstream version 1.8.2.
9d46d37
- Rebase and fix soname patch.
9d46d37
- Run 'make test'.
9d46d37
- A cleaner way to rewrite CFLAGS.
9d46d37
043981e
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.1-6
043981e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
043981e
2c84713
* Mon Nov  7 2011 Richard W.M. Jones <rjones@redhat.com> - 1.8.1-5
2c84713
- Rebuild for updated libpng 1.5.
2c84713
38d416c
* Wed Mar 23 2011 Dan HorĂ¡k <dan@danny.cz> - 1.8.1-4
38d416c
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
38d416c
be78805
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.1-3
be78805
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
be78805
e1c5243
* Mon Dec 27 2010 Richard W.M. Jones <rjones@redhat.com> - 1.8.1-2
e1c5243
- Bump and rebuild.
e1c5243
d654388
* Thu Jan 14 2010 Richard W.M. Jones <rjones@redhat.com> - 1.8.1-1
d654388
- New upstream version 1.8.1.
d654388
- Rebase nekovm-library-paths.patch.
d654388
- Recheck package with rpmlint.
d654388
934d8af
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.8.0-6
934d8af
- rebuilt with new openssl
934d8af
a3d8a93
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-5
a3d8a93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a3d8a93
bd27c04
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.0-4
bd27c04
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
bd27c04
8062bb6
* Fri Jan 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.8.0-3
8062bb6
- Rebuild to get updated mysql dep.
8062bb6
7a28f8f
* Tue Dec 16 2008 Richard W.M. Jones <rjones@redhat.com> - 1.8.0-2
7a28f8f
- New upstream release 1.8.0.
7a28f8f
- Use dos2unix --keepdate.
7a28f8f
- Use scriptlets to run ldconfig.
7a28f8f
- Use _libdir instead of _prefix/lib.
7a28f8f
- Set the soname correctly and include libneko.so.1.
7a28f8f
7a28f8f
* Wed Sep  3 2008 Richard W.M. Jones <rjones@redhat.com> - 1.7.1-7
7a28f8f
- prelink conf file DOESN'T use prefixes, need to use a glob instead.
7a28f8f
7a28f8f
* Tue Sep  2 2008 Richard W.M. Jones <rjones@redhat.com> - 1.7.1-6
7a28f8f
- BR sqlite-devel
7a28f8f
- Remove DOS line-endings and executable bits from the source.
7a28f8f
- Add RPM CFLAGS.
7a28f8f
- *.ndll files are always installed in /usr/lib/neko (even on 64 bit).
7a28f8f
- Search /usr/lib64 directory for libraries when building.
7a28f8f
- When building, link against libmysqlclient.so (not .a).
7a28f8f
- Avoid a compiler stack overflow when building on 64 bit.
7a28f8f
- Stop prelink from stripping the binaries.
7a28f8f
7a28f8f
* Mon Sep  1 2008 Richard W.M. Jones <rjones@redhat.com> - 1.7.1-3
7a28f8f
- Better way to strip the binaries.
7a28f8f
7a28f8f
* Sun Aug 31 2008 Richard W.M. Jones <rjones@redhat.com> - 1.7.1-2
7a28f8f
- Initial RPM release.