File erlang-esdl.spec of Package erlang-esdl

# spec file for package erlang-esdl
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define	realname	esdl
%define	erlangdir	%{_libdir}/erlang
Name:           erlang-esdl
Version:        1.3.1
Release:        0
Summary:        Erlang OpenGL/SDL api and utilities
License:        MIT
Group:          Development/Libraries/Other
Source0:        %{realname}-%{version}.src.tgz
BuildRequires:  Mesa-devel
BuildRequires:  erlang
BuildRequires:  erlang-rebar
BuildRequires:  libSDL-devel
Requires:       erlang
Provides:       esdl = %{version}-%{release}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

A library that gives you access to SDL and OpenGL functionality in
your Erlang program.

%package devel
Summary:        Development files for ESDL
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}

%description devel
Header and development files for ESDL.

%setup -q -n %{realname}-%{version}
# Remove spurious-executable-perm
find . -type f -exec chmod a-x {} \;
sed -i 's/\r//g' Readme

rebar compile

mkdir -p %{buildroot}%{erlangdir}/lib/%{realname}-%{version}/{ebin,include,priv,src}
install -p -m 0644 ebin/ %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/
install -p -m 0644 ebin/sdl*.beam %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin
install -p -m 0644 include/sdl*.hrl %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/include
install -p -m 0755 priv/ %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/priv/
install -p -m 0644 src/*.hrl %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/src

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%doc Readme license.terms
%exclude %{erlangdir}/lib/esdl-%{version}/include
%exclude %{erlangdir}/lib/esdl-%{version}/src

%files devel
%doc doc/*.html

openSUSE Build Service is sponsored by