erlang/erlang.spec

328 lines
11 KiB
RPMSpec
Raw Normal View History

2009-08-10 22:43:20 +00:00
%define ver R13B
2010-03-15 09:41:42 +00:00
%define rel 04
2008-07-06 12:31:45 +00:00
Name: erlang
2008-07-06 12:31:45 +00:00
Version: %{ver}
2010-04-14 09:57:54 +00:00
Release: %{rel}.3%{?dist}
Summary: General-purpose programming language and runtime environment
Group: Development/Languages
2008-07-17 20:13:32 +00:00
License: ERPL
URL: http://www.erlang.org
2009-08-10 22:43:20 +00:00
Source: http://www.erlang.org/download/otp_src_%{ver}%{rel}.tar.gz
Source1: http://www.erlang.org/download/otp_doc_html_%{ver}%{rel}.tar.gz
Source2: http://www.erlang.org/download/otp_doc_man_%{ver}%{rel}.tar.gz
2010-04-14 09:57:54 +00:00
Source3: erlang-find-provides.escript
Source4: erlang-find-provides.sh
Source5: erlang-find-requires.escript
Source6: erlang-find-requires.sh
Source7: macros.erlang
2010-03-15 09:41:42 +00:00
# TODO this patch needs rebase against current tree
2009-08-10 22:43:20 +00:00
Patch0: otp-links.patch
2010-03-15 09:41:42 +00:00
Patch1: otp-0001-Do-not-format-man-pages.patch
Patch2: otp-0002-Remove-rpath.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2005-10-29 20:03:22 +00:00
2006-02-17 23:29:12 +00:00
BuildRequires: ncurses-devel
BuildRequires: openssl-devel
2010-03-15 09:41:42 +00:00
BuildRequires: zlib-devel
2006-02-17 23:29:12 +00:00
BuildRequires: unixODBC-devel
2009-08-10 22:43:20 +00:00
BuildRequires: wxGTK-devel
2006-02-17 23:29:12 +00:00
BuildRequires: tcl-devel
BuildRequires: tk-devel
2009-08-10 22:43:20 +00:00
BuildRequires: java-1.6.0-openjdk-devel
2006-02-17 23:29:12 +00:00
BuildRequires: flex
2006-07-05 16:27:53 +00:00
BuildRequires: m4
2010-03-15 09:41:42 +00:00
BuildRequires: fop
2005-10-29 20:03:22 +00:00
2009-08-10 22:43:20 +00:00
Requires: tk
2010-03-15 09:41:42 +00:00
%description
Erlang is a general-purpose programming language and runtime
environment. Erlang has built-in support for concurrency, distribution
and fault tolerance. Erlang is used in several large telecommunication
systems from Ericsson.
%package doc
Summary: Erlang documentation
Group: Development/Languages
%description doc
Documentation for Erlang.
%prep
2009-08-10 22:43:20 +00:00
%setup -q -n otp_src_%{ver}%{rel}
2010-03-15 09:41:42 +00:00
%patch1 -p1 -b .do_not_format_manpages
2008-10-25 21:49:08 +00:00
%patch2 -p1 -b .rpath
2010-03-15 09:41:42 +00:00
# remove shipped zlib sources
rm -f erts/emulator/zlib/*.[ch]
2008-07-06 12:31:45 +00:00
%build
2009-02-15 02:45:54 +00:00
%ifarch sparcv9 sparc64
2010-03-15 09:41:42 +00:00
CFLAGS="$RPM_OPT_FLAGS -mcpu=ultrasparc -fno-strict-aliasing" %configure --enable-shared-zlib
2009-02-15 02:45:54 +00:00
%else
2010-03-15 09:41:42 +00:00
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --enable-shared-zlib
2009-02-15 02:45:54 +00:00
%endif
make
%install
rm -rf $RPM_BUILD_ROOT
make INSTALL_PREFIX=$RPM_BUILD_ROOT install
# clean up
find $RPM_BUILD_ROOT%{_libdir}/erlang -perm 0775 | xargs chmod 755
find $RPM_BUILD_ROOT%{_libdir}/erlang -name Makefile | xargs chmod 644
2007-08-19 09:00:36 +00:00
find $RPM_BUILD_ROOT%{_libdir}/erlang -name \*.o | xargs chmod 644
find $RPM_BUILD_ROOT%{_libdir}/erlang -name \*.bat | xargs rm -f
find $RPM_BUILD_ROOT%{_libdir}/erlang -name index.txt.old | xargs rm -f
2010-04-14 09:57:54 +00:00
# install additional doc files
mkdir -p erlang_doc
tar -C erlang_doc -zxf %{SOURCE1}
2010-04-14 09:57:54 +00:00
# install man-pages
tar -C $RPM_BUILD_ROOT%{_libdir}/erlang -zxf %{SOURCE2}
gzip $RPM_BUILD_ROOT%{_libdir}/erlang/man/man*/*
# make links to binaries
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cd $RPM_BUILD_ROOT%{_bindir}
2009-03-01 15:22:27 +00:00
for file in erl erlc escript dialyzer
do
ln -sf ../%{_lib}/erlang/bin/$file .
done
2006-12-31 11:08:01 +00:00
# remove buildroot from installed files
cd $RPM_BUILD_ROOT%{_libdir}/erlang
2006-12-31 11:08:01 +00:00
sed -i "s|$RPM_BUILD_ROOT||" erts*/bin/{erl,start} releases/RELEASES bin/{erl,start}
# remove unneeded sources, but keep *.hrl and *.yrl
2010-04-14 09:57:54 +00:00
for d in $RPM_BUILD_ROOT%{_libdir}/erlang/lib/* ; do find $d/src -maxdepth 1 -type f ! -name "*.hrl" -print -delete || true ; done
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/lib/hipe-*/{cerl,flow,icode,main,misc,util}/*.erl
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/lib/orber-*/COSS/CosNaming/*.erl
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/lib/snmp-*/src/{agent,app,compiler,manager,misc}/*.erl
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/lib/wx-*/src/gen/*.erl
find $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ -maxdepth 2 -type d -name src -empty -delete
2010-03-15 09:41:42 +00:00
2010-04-14 09:57:54 +00:00
# remove C and Java sources
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/asn1-*/c_src
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/erl_interface-*/src
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ic-*/c_src
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ic-*/java_src
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/jinterface-*/java_src
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/odbc-*/c_src
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/tools-*/c_src
# remove empty or intermediate files and directories
rm -r $RPM_BUILD_ROOT%{_libdir}/erlang/erts-*/doc
rm -r $RPM_BUILD_ROOT%{_libdir}/erlang/erts-*/man
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/lib/cosEvent-*/info
rm -f $RPM_BUILD_ROOT%{_libdir}/erlang/lib/cosEventDomain-*/info
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/crypto-*/priv/obj
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/hipe-*/vsn.mk
rm -r $RPM_BUILD_ROOT%{_libdir}/erlang/lib/odbc-*/priv/obj
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/lib/ssl-*/priv/obj
rm -rf $RPM_BUILD_ROOT%{_libdir}/erlang/misc
# fix permissions for asn1 library
chmod 755 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/asn1-*/priv/lib/asn1_erl_drv.so
# fix permissions for megaco library
chmod 755 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/megaco-*/priv/lib/megaco_flex_scanner_drv.so
chmod 755 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/megaco-*/priv/lib/megaco_flex_scanner_drv_mt.so
# fix permissons for wx library
chmod 755 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/wx-*/priv/*/wxe_driver.so
2010-03-15 09:41:42 +00:00
2010-04-14 09:57:54 +00:00
# Install RPM related files
install -D -p -m 0755 %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/rpm/erlang-find-provides.escript
install -D -p -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/rpm/erlang-find-provides.sh
install -D -p -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_libdir}/rpm/erlang-find-requires.escript
install -D -p -m 0755 %{SOURCE6} $RPM_BUILD_ROOT%{_libdir}/rpm/erlang-find-requires.sh
install -D -p -m 0644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.erlang
%clean
rm -rf $RPM_BUILD_ROOT
2010-03-15 09:41:42 +00:00
%files
%defattr(-,root,root)
2010-03-15 09:41:42 +00:00
%doc AUTHORS EPLICENCE README.md
%{_bindir}/*
%{_libdir}/erlang
2010-04-14 09:57:54 +00:00
# RPM stuff
%{_sysconfdir}/rpm/macros.erlang
%{_libdir}/rpm/erlang-find-provides.escript
%{_libdir}/rpm/erlang-find-provides.sh
%{_libdir}/rpm/erlang-find-requires.escript
%{_libdir}/rpm/erlang-find-requires.sh
%files doc
%defattr(-,root,root)
%doc erlang_doc/*
%post
2006-02-17 23:29:12 +00:00
%{_libdir}/erlang/Install -minimal %{_libdir}/erlang >/dev/null 2>/dev/null
%changelog
2010-04-14 09:57:54 +00:00
* Fri Mar 26 2010 Peter Lemenkov <lemenkov@gmail.com> - R13B-04.3
- Added rpm-related stuff for auto-generating erlang dependencies in the future builds
- Since now *.yrl files are removed too.
- Removed unnecessary C and Java sources
* Fri Mar 26 2010 Peter Lemenkov <lemenkov@gmail.com> - R13B-04.2
- Do not remove all files from %%{_libdir}/erlang/lib/*/src - keep
*.[yh]rl intact
- Fix permissions for megaco *.so objects
- Fix permissions for asn1 *.so objects
2010-03-15 09:41:42 +00:00
* Sat Feb 13 2010 Peter Lemenkov <lemenkov@gmail.com> - R13B-04.1
- New release R13B-04
- Since now we're using %%configure instead of ./configure
- Removed no longer needed fix for newer glibc version
- Dropped %%patch3 (applied upstream)
- Rebased patches
- Added BR fop for rebuilding of docs
- Use system-wide zlib instead of shipped one
- Dropped BR gd-devel
- Removed unneeded sources (should be fixed upstream)
- Fixed permission for wx driver (should be fixed upstream)
* Thu Oct 22 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - R13B-02-1
- Update to R13B-02 (patched for what's released as 02-1 by upstream)
2009-08-25 12:22:08 +00:00
* Tue Aug 25 2009 Tomas Mraz <tmraz@redhat.com> - R13B-01.2
2009-08-21 13:17:22 +00:00
- rebuilt with new openssl
2009-08-10 22:43:20 +00:00
* Mon Aug 10 2009 Gerard Milmeister <gemi@bluewin.ch> - R13B-01.1
- update to R13B01
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - R12B-6.7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
2009-04-21 16:41:31 +00:00
* Tue Apr 21 2009 Debarshi Ray <rishi@fedoraproject.org> R12B-5.7
- Updated rpath patch.
- Fixed configure to respect $RPM_OPT_FLAGS.
2009-03-01 15:22:27 +00:00
* Sun Mar 1 2009 Gerard Milmeister <gemi@bluewin.ch> - R12B-5.6
- new release R12B-5
- link escript and dialyzer to %{_bindir}
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - R12B-5.5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2009-02-15 02:45:54 +00:00
* Sat Feb 14 2009 Dennis Gilmore <dennis@ausil.us> - R12B-4.5
- fix sparc arches to compile
2009-01-16 10:24:15 +00:00
* Fri Jan 16 2009 Tomas Mraz <tmraz@redhat.com> - R12B-4.4
- rebuild with new openssl
2008-10-25 21:49:08 +00:00
* Sat Oct 25 2008 Gerard Milmeister <gemi@bluewin.ch> - R12B-4.1
- new release R12B-4
2009-03-01 15:22:27 +00:00
* Fri Sep 5 2008 Gerard Milmeister <gemi@bluewin.ch> - R12B-3.3
2008-09-05 20:06:12 +00:00
- fixed sslrpath patch
2008-07-17 20:13:32 +00:00
* Thu Jul 17 2008 Tom "spot" Callaway <tcallawa@redhat.com> - R12B-3.2
- fix license tag
2008-07-06 12:31:45 +00:00
* Sun Jul 6 2008 Gerard Milmeister <gemi@bluewin.ch> - R12B-3.1
- new release R12B-3
2008-03-27 15:26:08 +00:00
* Thu Mar 27 2008 Gerard Milmeister <gemi@bluewin.ch> - R12B-1.1
- new release R12B-1
2008-02-23 13:41:16 +00:00
* Sat Feb 23 2008 Gerard Milmeister <gemi@bluewin.ch> - R12B-0.3
- disable strict aliasing optimization
2008-02-19 03:30:55 +00:00
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - R12B-0.2
- Autorebuild for GCC 4.3
2007-12-08 11:44:52 +00:00
* Sat Dec 8 2007 Gerard Milmeister <gemi@bluewin.ch> - R12B-0.1
- new release R12B-0
2007-12-05 21:48:31 +00:00
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - R11B-6
- Rebuild for deps
2007-08-19 09:00:36 +00:00
* Sun Aug 19 2007 Gerard Milmeister <gemi@bluewin.ch> - R11B-5.3
- fix some permissions
2007-08-18 19:51:52 +00:00
* Sat Aug 18 2007 Gerard Milmeister <gemi@bluewin.ch> - R11B-5.2
- enable dynamic linking for ssl
2007-08-18 09:36:27 +00:00
* Sat Aug 18 2007 Gerard Milmeister <gemi@bluewin.ch> - R11B-5.1
- new release R11B-5
* Sat Mar 24 2007 Thomas Fitzsimmons <fitzsim@redhat.com> - R11B-2.4
- Require java-1.5.0-gcj-devel for build.
2006-12-31 11:08:01 +00:00
* Sun Dec 31 2006 Gerard Milmeister <gemi@bluewin.ch> - R11B-2.3
- remove buildroot from installed files
2006-12-30 23:48:41 +00:00
* Sat Dec 30 2006 Gerard Milmeister <gemi@bluewin.ch> - R11B-2.2
- added patch for compiling with glibc 2.5
2006-12-30 22:26:33 +00:00
* Sat Dec 30 2006 Gerard Milmeister <gemi@bluewin.ch> - R11B-2.1
- new version R11B-2
2006-08-28 00:48:41 +00:00
* Mon Aug 28 2006 Gerard Milmeister <gemi@bluewin.ch> - R11B-0.3
- Rebuild for FE6
2006-07-05 16:27:53 +00:00
* Wed Jul 5 2006 Gerard Milmeister <gemi@bluewin.ch> - R11B-0.2
- add BR m4
2006-05-18 19:42:50 +00:00
* Thu May 18 2006 Gerard Milmeister <gemi@bluewin.ch> - R11B-0.1
- new version R11B-0
2006-05-03 22:01:07 +00:00
* Wed May 3 2006 Gerard Milmeister <gemi@bluewin.ch> - R10B-10.3
- added patch for run_erl by Knut-Håvard Aksnes
2006-03-13 15:58:48 +00:00
* Mon Mar 13 2006 Gerard Milmeister <gemi@bluewin.ch> - R10B-10.1
- new version R10B-10
2006-02-17 23:29:12 +00:00
* Thu Dec 29 2005 Gerard Milmeister <gemi@bluewin.ch> - R10B-9.1
- New Version R10B-9
2005-10-29 21:53:06 +00:00
* Sat Oct 29 2005 Gerard Milmeister <gemi@bluewin.ch> - R10B-8.2
- updated rpath patch
2005-10-29 20:03:22 +00:00
* Sat Oct 29 2005 Gerard Milmeister <gemi@bluewin.ch> - R10B-8.1
- New Version R10B-8
2005-10-01 09:15:37 +00:00
* Sat Oct 1 2005 Gerard Milmeister <gemi@bluewin.ch> - R10B-6.4
- Added tk-devel and tcl-devel to buildreq
- Added tk to req
* Tue Sep 6 2005 Gerard Milmeister <gemi@bluewin.ch> - R10B-6.3
- Remove perl BuildRequires
* Tue Aug 30 2005 Gerard Milmeister <gemi@bluewin.ch> - R10B-6.2
- change /usr/lib to %%{_libdir}
- redirect output in %%post to /dev/null
- add unixODBC-devel to BuildRequires
- split doc off to erlang-doc package
* Sat Jun 25 2005 Gerard Milmeister <gemi@bluewin.ch> - R10B-6.1
- New Version R10B-6
* Sun Feb 13 2005 Gerard Milmeister <gemi@bluewin.ch> - R10B-3.1
- New Version R10B-3
* Mon Dec 27 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:R10B-2-0.fdr.1
- New Version R10B-2
* Wed Oct 6 2004 Gerard Milmeister <gemi@bluewin.ch> - 0:R10B-0.fdr.1
- New Version R10B
* Thu Oct 16 2003 Gerard Milmeister <gemi@bluewin.ch> - 0:R9B-1.fdr.1
- First Fedora release