Tue, 02 Jul 2013 18:20:50 +0200
Update to new vendor version and patch according to pcre problems.
michael@780 | 1 | ## |
michael@780 | 2 | ## erlang.spec -- OpenPKG RPM Package Specification |
michael@780 | 3 | ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@780 | 4 | ## |
michael@780 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@780 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@780 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@780 | 8 | ## copies. |
michael@780 | 9 | ## |
michael@780 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@780 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@780 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@780 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@780 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@780 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@780 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@780 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@780 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@780 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@780 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@780 | 21 | ## SUCH DAMAGE. |
michael@780 | 22 | ## |
michael@780 | 23 | |
michael@780 | 24 | # package version |
michael@781 | 25 | %define V_opkg R16B01 |
michael@781 | 26 | %define V_real R16B01 |
michael@781 | 27 | %define V_subdir R16B01 |
michael@780 | 28 | |
michael@780 | 29 | # package information |
michael@780 | 30 | Name: erlang |
michael@780 | 31 | Summary: Erlang Programming Language |
michael@780 | 32 | URL: http://www.erlang.org/ |
michael@780 | 33 | Vendor: Ericsson Computer Science Laboratory |
michael@780 | 34 | Packager: OpenPKG Foundation e.V. |
michael@780 | 35 | Distribution: OpenPKG Community |
michael@780 | 36 | Class: EVAL |
michael@780 | 37 | Group: Language |
michael@780 | 38 | License: Erlang Public License |
michael@780 | 39 | Version: %{V_opkg} |
michael@780 | 40 | Release: 20121208 |
michael@780 | 41 | |
michael@780 | 42 | # list of sources |
michael@780 | 43 | Source0: http://www.erlang.org/download/otp_src_%{V_real}.tar.gz |
michael@780 | 44 | Source1: http://www.erlang.org/download/otp_doc_man_%{V_real}.tar.gz |
michael@780 | 45 | Patch0: erlang.patch |
michael@780 | 46 | |
michael@780 | 47 | # build information |
michael@781 | 48 | BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, m4 |
michael@780 | 49 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@780 | 50 | BuildPreReq: openssl |
michael@780 | 51 | PreReq: openssl |
michael@780 | 52 | |
michael@780 | 53 | %description |
michael@780 | 54 | Erlang is a general-purpose programming language and runtime |
michael@780 | 55 | environment. Erlang has built-in support for concurrency, |
michael@780 | 56 | distribution and fault tolerance. Erlang is used in several large |
michael@780 | 57 | telecommunication systems from Ericsson. |
michael@780 | 58 | |
michael@780 | 59 | %track |
michael@780 | 60 | prog erlang = { |
michael@780 | 61 | version = %{V_real} |
michael@780 | 62 | url = http://www.erlang.org/download/ |
michael@780 | 63 | regex = otp_src_(__VER__)\.tar\.gz |
michael@780 | 64 | } |
michael@780 | 65 | |
michael@780 | 66 | %prep |
michael@780 | 67 | %setup -q -n otp_src_%{V_subdir} |
michael@780 | 68 | %patch -p0 |
michael@781 | 69 | %{l_shtool} subst \ |
michael@781 | 70 | -e 's;FLAGS="-Werror=return-type *;FLAGS=";g' \ |
michael@781 | 71 | erts/configure \ |
michael@781 | 72 | lib/erl_interface/configure \ |
michael@781 | 73 | lib/odbc/configure \ |
michael@781 | 74 | lib/megaco/configure \ |
michael@781 | 75 | lib/wx/configure |
michael@780 | 76 | |
michael@780 | 77 | %build |
michael@780 | 78 | CC="%{l_cc}" \ |
michael@780 | 79 | CFLAGS="%{l_cflags -O}" \ |
michael@781 | 80 | CPPFLAGS="-Ipcre %{l_cppflags}" \ |
michael@780 | 81 | LDFLAGS="%{l_ldflags}" \ |
michael@780 | 82 | JAVAC="false" \ |
michael@780 | 83 | ./configure \ |
michael@780 | 84 | --prefix=%{l_prefix} \ |
michael@781 | 85 | --with-ssl=%{l_prefix} \ |
michael@781 | 86 | --enable-shared-zlib |
michael@781 | 87 | %{l_make} %{l_mflags -O} |
michael@780 | 88 | |
michael@780 | 89 | %install |
michael@780 | 90 | %{l_make} %{l_mflags} install INSTALL_PREFIX=$RPM_BUILD_ROOT |
michael@780 | 91 | ( cd $RPM_BUILD_ROOT%{l_prefix}/bin |
michael@780 | 92 | for file in erl erlc epmd run_erl to_erl dialyzer escript typer; do |
michael@780 | 93 | rm -f $file |
michael@780 | 94 | ln -s ../lib/erlang/bin/$file $file |
michael@780 | 95 | done |
michael@780 | 96 | cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin |
michael@780 | 97 | rm -f epmd |
michael@780 | 98 | ln -s ../erts-*/bin/epmd epmd |
michael@780 | 99 | cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin |
michael@780 | 100 | %{l_shtool} subst \ |
michael@780 | 101 | -e "s;$RPM_BUILD_ROOT;;" \ |
michael@780 | 102 | erl start |
michael@780 | 103 | cd $RPM_BUILD_ROOT%{l_prefix} |
michael@780 | 104 | %{l_gzip} -c -d %{SOURCE1} | %{l_tar} xf - 'man/man1' |
michael@780 | 105 | ) || exit $? |
michael@780 | 106 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@780 | 107 | |
michael@780 | 108 | %files -f files |
michael@780 | 109 | |
michael@780 | 110 | %clean |
michael@780 | 111 |