erlang/erlang.spec

Tue, 02 Jul 2013 17:58:45 +0200

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

Import package vendor original specs for necessary manipulations.

     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   R15B03.1
    26 %define       V_real   R15B03-1
    27 %define       V_subdir R15B03
    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, 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
    70 %build
    71     CC="%{l_cc}" \
    72     CFLAGS="%{l_cflags -O}" \
    73     CPPFLAGS="%{l_cppflags}" \
    74     LDFLAGS="%{l_ldflags}" \
    75     JAVAC="false" \
    76     ./configure \
    77         --prefix=%{l_prefix} \
    78         --with-ssl=%{l_prefix}
    79     %{l_make} %{l_mflags}
    81 %install
    82     %{l_make} %{l_mflags} install INSTALL_PREFIX=$RPM_BUILD_ROOT
    83     ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
    84       for file in erl erlc epmd run_erl to_erl dialyzer escript typer; do
    85           rm -f $file
    86           ln -s ../lib/erlang/bin/$file $file
    87       done
    88       cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin
    89       rm -f epmd
    90       ln -s ../erts-*/bin/epmd epmd
    91       cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin
    92       %{l_shtool} subst \
    93           -e "s;$RPM_BUILD_ROOT;;" \
    94           erl start
    95       cd $RPM_BUILD_ROOT%{l_prefix}
    96       %{l_gzip} -c -d %{SOURCE1} | %{l_tar} xf - 'man/man1'
    97     ) || exit $?
    98     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   100 %files -f files
   102 %clean

mercurial