Blob Blame History Raw
%global debug_package %{nil}
%global git_short_hash 889155f
%global short_name erlydtl
%global github_username evanmiller

Name:           erlang-%{short_name}
Version:        0.6.0
Release:        3.20110306git%{git_short_hash}%{?dist}
Summary:        Erlang implementation of the Django Template Language

Group:          Development/Libraries
License:        MIT
URL:            https://github.com/%{github_username}/%{short_name}
# The tarball comes from here:
# http://github.com/%{github_username}/%{short_name}/tarball/master
# GitHub has layers of redirection and renames that make this a troublesome
# URL to include directly.
Source0:        %{github_username}-%{short_name}-%{git_short_hash}.tar.gz
Patch0:         erlang-erlydtl-0.6.0-tests.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Provides:       ErlyDTL = %{version}-%{release}
BuildRequires:  erlang
Requires:       erlang

%description
ErlyDTL is an Erlang implementation of the Django Template Language. The
erlydtl module compiles Django Template source code into Erlang bytecode. The
compiled template has a "render" function that takes a list of variables and
returns a fully rendered document.

%prep
%setup -q -n %{github_username}-%{short_name}-%{git_short_hash}
find examples/ -type f -executable -exec chmod -x {} \;

%patch0 -p0

%build
make %{?_smp_mflags}

%check
make test


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/
cp -r ebin     %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/
cp -r bin      %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/
cp -r priv     %{buildroot}/%{_libdir}/erlang/lib/erlydtl-%{version}/


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%dir %{_libdir}/erlang/lib/erlydtl-%{version}  
%{_libdir}/erlang/lib/erlydtl-%{version}/*
%doc README_I18N
%doc README.markdown
%doc examples


%changelog
* Sun Mar 06 2011 Ilia Cheishvili <ilia.cheishvili@gmail.com> - 0.6.0-3.20110306git889155f
- Update to latest git snapshot
 
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 

* Sun Aug 1 2010 Ilia Cheishvili <ilia.cheishvili@gmail.com> - 0.6.0-1
- Initial Package