%global year 2017 %global month 01 Name: moarvm Version: 0.%{year}.%{month} Release: 1%{?dist} Summary: Meta-model On A Runtime Virtual Machine License: Artistic 2.0 Group: Development/Libraries URL: http://moarvm.org Source0: http://moarvm.org/releases/MoarVM-%{year}.%{month}.tar.gz # sha-devel %if 0%{?fedora} BuildRequires: libatomic_ops-devel >= 7.4 BuildRequires: libtommath-devel %endif BuildRequires: libuv-devel BuildRequires: perl(Pod::Usage) perl(ExtUtils::Command) perl(autodie) # BuildRequires: discount %description Short for "Metamodel On A Runtime", MoarVM is a virtual machine built especially for Rakudo Perl 6 and the NQP Compiler Toolchain. MoarVM is a back-end for NQP. MoarVM already stands out among the various Rakudo and NQP compilation targets by typically: Running the Perl 6 specification test suite fastest Having the lowest memory usage Having the best start-up time Being fastest to build both NQP and Rakudo - and thus in theory your Perl 6 and NQP programs too! %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains header files for developing applications that use %{name} (Metamodel On A Runtime). %prep %setup -q -n MoarVM-%{year}.%{month} %build # modify Configure.pl so that the Fedora specific flags for cflags and ldflags # will be written to the Makefile sed -i -e "/^\$config{cflags}/ s#.*#\$config{cflags} = \"$RPM_OPT_FLAGS -fPIC\";#" Configure.pl sed -i -e "/^\$config{ldflags}/ s#.*#\$config{ldflags} = \"%{__global_ldflags}\";#" Configure.pl # make sure to not bundle this rm -r 3rdparty/msinttypes 3rdparty/libuv # 3rdparty/sha1 # NQP do not build if MoarVM do not bundles sha %if 0%{?fedora} rm -r 3rdparty/libatomic_ops %endif # # The upstream libtommath doesn't have the conversion from and to # float/double that MoarVM needs. bn_mp_(get|set)_long.c are extentions of the # origin libtommath source. The header files are needed to build. %if 0%{?fedora} rm `find 3rdparty/libtommath -type f ! -name '*long.c' -a ! -name '*.h'` %endif # --has-sha \ %if 0%{?fedora} %{__perl} Configure.pl --prefix=%{_usr} --libdir=%{_libdir} \ --has-libtommath --has-libatomic_ops --has-libuv %endif %if 0%{?rhel} %{__perl} Configure.pl --prefix=%{_usr} --libdir=%{_libdir} --has-libuv %endif make %{?_smp_mflags} # Generate HTML files for F in docs/*.markdown docs/*.md do discount-mkd2html $F done %install %make_install # Force permissions on shared versioned libs so they get stripped # and will provided. chmod 755 $RPM_BUILD_ROOT%{_libdir}/libmoar.so # Generating man-page %{__perl} -MExtUtils::Command -e mkpath $RPM_BUILD_ROOT%{_mandir}/man1 pod2man --section=1 --name=moar docs/moar.pod | %{__gzip} -c > $RPM_BUILD_ROOT%{_mandir}/man1/moar.1.gz %files %doc LICENSE CREDITS docs %{_bindir}/moar %{_datadir}/nqp/lib/MAST %{_libdir}/libmoar.so %{_mandir}/man1/moar.1.gz %files devel %{_includedir}/dyncall %{_includedir}/moar %{_datadir}/pkgconfig/moar.pc %exclude %{_includedir}/libtommath %if 0%{?rhel} %exclude %{_includedir}/libatomic_ops %endif %exclude %{_includedir}/libuv %changelog * Wed Feb 01 2017 Gerd Pokorra 0.2016.01-1 - update to 2017.01 * Fri Dec 09 2016 Gerd Pokorra 0.2016.11-1 - build on epel7 - update to 2016.11 * Fri Jan 29 2016 Gerd Pokorra 0.2016.01-1 - sha1, msinttypes and tinymt header files will no longer installed - update to 2016.01 * Fri Jun 19 2015 Gerd Pokorra 0.2015.06-1 - add HTML files and man-page generation - change Summary text - update to 2015.06 * Wed Jun 17 2015 Fedora Release Engineering - 0.2015.05-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat May 23 2015 Gerd Pokorra 0.2015.05-1 - 3rdparty/linenoise is gone, no readline are used - update to 2015.05 * Sat Apr 25 2015 Gerd Pokorra 0.2015.04-2 - change MoarVM build to that NQP builds on top * Sat Apr 25 2015 Gerd Pokorra 0.2015.04-1 - update to 2015.04 * Sat Jan 24 2015 Gerd Pokorra 0.2014.12-1 - update to 2014.12 - add pkgconfig/moar.pc file - --libdir option could used * Thu Jan 22 2015 Gerd Pokorra 0.2014.04-6 - add BuildRequies: perl(ExtUtils::Command) perl(autodie) - rebuild to solve dependency * Fri Aug 29 2014 Gerd Pokorra 0.2014.04-5 - remove of libtommath 3rdparty source files - remove of libatomic_ops only if fedora > 20 * Fri Aug 22 2014 Gerd Pokorra 0.2014.04-4 - add 'BuildRequires: libatomic_ops-devel >= 7.4' - first remove of 3rdparty source files * Wed May 07 2014 Gerd Pokorra 0.2014.04-3 - modify Configure.pl so that the Fedora specific flags for cflags and ldflags will be written to the Makefile - make lib64 directory creation more general * Wed Apr 30 2014 Gerd Pokorra 0.2014.04-2 - add optimize flag to Configure.pl - add CFLAGS and LDFLAGS to make - change summary tag * Sat Apr 26 2014 Gerd Pokorra 0.2014.04-1 - update to 2014.04 - remove patches that are included in upstream - add BuildRequires perl(Pod::Usage) * Mon Mar 31 2014 Gerd Pokorra 0.2014.03-2 - add patch to have more configuration flags - call Confiugre.pl with has-libatomic_ops * Wed Mar 26 2014 Gerd Pokorra 0.2014.03-1 - update to 2014.03 - call Configure.pl with has-sha and add BuildRequires sha-devel - call Configure.pl with has-libuv and add BuildRequires libuv-devel - exclude libuv and sha1 header file - exclude header files for Microsoft Visual Studio (msinittypes) * Mon Mar 17 2014 Gerd Pokorra 0.2014.02-3 - call Configure.pl with use-readline flag - add BuildRequires readline-devel and libtommath-devel - exclude linenoise and libtommath header file - add patch to link with libtommath from the system and use it as a flag * Fri Mar 14 2014 Gerd Pokorra 0.2014.02-2 - improve devel package tags - description is no longer than 80 chars per line any more - RPM_BUILD_ROOT cleanup is removed * Sat Feb 22 2014 Gerd Pokorra 0.2014.02-1 - create initial spec file from the template 'rpmdev-newspec moarvm' - add changing permission of libmoar.so - add Group tag - add devel-subpackage