erlang/erlang.spec

Tue, 02 Jul 2013 18:20:50 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 02 Jul 2013 18:20:50 +0200
changeset 781
25504c2d46b1
parent 780
0a61f30eebd4
permissions
-rw-r--r--

Update to new vendor version and patch according to pcre problems.

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

mercurial