%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: 6.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
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-6.20110306git889155f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-5.20110306git889155f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-4.20110306git889155f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* 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