michael@780: ## michael@780: ## erlang.spec -- OpenPKG RPM Package Specification michael@780: ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. michael@780: ## michael@780: ## Permission to use, copy, modify, and distribute this software for michael@780: ## any purpose with or without fee is hereby granted, provided that michael@780: ## the above copyright notice and this permission notice appear in all michael@780: ## copies. michael@780: ## michael@780: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@780: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@780: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@780: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@780: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@780: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@780: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@780: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@780: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@780: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@780: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@780: ## SUCH DAMAGE. michael@780: ## michael@780: michael@780: # package version michael@780: %define V_opkg R15B03.1 michael@780: %define V_real R15B03-1 michael@780: %define V_subdir R15B03 michael@780: michael@780: # package information michael@780: Name: erlang michael@780: Summary: Erlang Programming Language michael@780: URL: http://www.erlang.org/ michael@780: Vendor: Ericsson Computer Science Laboratory michael@780: Packager: OpenPKG Foundation e.V. michael@780: Distribution: OpenPKG Community michael@780: Class: EVAL michael@780: Group: Language michael@780: License: Erlang Public License michael@780: Version: %{V_opkg} michael@780: Release: 20121208 michael@780: michael@780: # list of sources michael@780: Source0: http://www.erlang.org/download/otp_src_%{V_real}.tar.gz michael@780: Source1: http://www.erlang.org/download/otp_doc_man_%{V_real}.tar.gz michael@780: Patch0: erlang.patch michael@780: michael@780: # build information michael@780: BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, m4 michael@780: PreReq: OpenPKG, openpkg >= 20100101 michael@780: BuildPreReq: openssl michael@780: PreReq: openssl michael@780: michael@780: %description michael@780: Erlang is a general-purpose programming language and runtime michael@780: environment. Erlang has built-in support for concurrency, michael@780: distribution and fault tolerance. Erlang is used in several large michael@780: telecommunication systems from Ericsson. michael@780: michael@780: %track michael@780: prog erlang = { michael@780: version = %{V_real} michael@780: url = http://www.erlang.org/download/ michael@780: regex = otp_src_(__VER__)\.tar\.gz michael@780: } michael@780: michael@780: %prep michael@780: %setup -q -n otp_src_%{V_subdir} michael@780: %patch -p0 michael@780: michael@780: %build michael@780: CC="%{l_cc}" \ michael@780: CFLAGS="%{l_cflags -O}" \ michael@780: CPPFLAGS="%{l_cppflags}" \ michael@780: LDFLAGS="%{l_ldflags}" \ michael@780: JAVAC="false" \ michael@780: ./configure \ michael@780: --prefix=%{l_prefix} \ michael@780: --with-ssl=%{l_prefix} michael@780: %{l_make} %{l_mflags} michael@780: michael@780: %install michael@780: %{l_make} %{l_mflags} install INSTALL_PREFIX=$RPM_BUILD_ROOT michael@780: ( cd $RPM_BUILD_ROOT%{l_prefix}/bin michael@780: for file in erl erlc epmd run_erl to_erl dialyzer escript typer; do michael@780: rm -f $file michael@780: ln -s ../lib/erlang/bin/$file $file michael@780: done michael@780: cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin michael@780: rm -f epmd michael@780: ln -s ../erts-*/bin/epmd epmd michael@780: cd $RPM_BUILD_ROOT%{l_prefix}/lib/erlang/bin michael@780: %{l_shtool} subst \ michael@780: -e "s;$RPM_BUILD_ROOT;;" \ michael@780: erl start michael@780: cd $RPM_BUILD_ROOT%{l_prefix} michael@780: %{l_gzip} -c -d %{SOURCE1} | %{l_tar} xf - 'man/man1' michael@780: ) || exit $? michael@780: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@780: michael@780: %files -f files michael@780: michael@780: %clean michael@780: