Tue, 02 Jul 2013 17:58:45 +0200
Import package vendor original specs for necessary manipulations.
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@780 | 25 | %define V_opkg R15B03.1 |
michael@780 | 26 | %define V_real R15B03-1 |
michael@780 | 27 | %define V_subdir R15B03 |
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@780 | 48 | BuildPreReq: OpenPKG, openpkg >= 20100101, 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@780 | 69 | |
michael@780 | 70 | %build |
michael@780 | 71 | CC="%{l_cc}" \ |
michael@780 | 72 | CFLAGS="%{l_cflags -O}" \ |
michael@780 | 73 | CPPFLAGS="%{l_cppflags}" \ |
michael@780 | 74 | LDFLAGS="%{l_ldflags}" \ |
michael@780 | 75 | JAVAC="false" \ |
michael@780 | 76 | ./configure \ |
michael@780 | 77 | --prefix=%{l_prefix} \ |
michael@780 | 78 | --with-ssl=%{l_prefix} |
michael@780 | 79 | %{l_make} %{l_mflags} |
michael@780 | 80 | |
michael@780 | 81 | %install |
michael@780 | 82 | %{l_make} %{l_mflags} install INSTALL_PREFIX=$RPM_BUILD_ROOT |
michael@780 | 83 | ( cd $RPM_BUILD_ROOT%{l_prefix}/bin |
michael@780 | 84 | for file in erl erlc epmd run_erl to_erl dialyzer escript typer; do |
michael@780 | 85 | rm -f $file |
michael@780 | 86 | ln -s ../lib/erlang/bin/$file $file |
michael@780 | 87 | done |
michael@780 | 88 | cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin |
michael@780 | 89 | rm -f epmd |
michael@780 | 90 | ln -s ../erts-*/bin/epmd epmd |
michael@780 | 91 | cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin |
michael@780 | 92 | %{l_shtool} subst \ |
michael@780 | 93 | -e "s;$RPM_BUILD_ROOT;;" \ |
michael@780 | 94 | erl start |
michael@780 | 95 | cd $RPM_BUILD_ROOT%{l_prefix} |
michael@780 | 96 | %{l_gzip} -c -d %{SOURCE1} | %{l_tar} xf - 'man/man1' |
michael@780 | 97 | ) || exit $? |
michael@780 | 98 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@780 | 99 | |
michael@780 | 100 | %files -f files |
michael@780 | 101 | |
michael@780 | 102 | %clean |
michael@780 | 103 |