Skip to content

Instantly share code, notes, and snippets.

@spatzle
Forked from dcarley/play.spec
Created June 10, 2013 15:46
Show Gist options
  • Save spatzle/5749795 to your computer and use it in GitHub Desktop.
Save spatzle/5749795 to your computer and use it in GitHub Desktop.
Name: play
Version: 1.2.3
Release: 1%{?dist}
Summary: Play Framework
Group: System Environment/Daemons
License: Apache License, Version 2
URL: http://www.playframework.org/
Source0: http://download.playframework.org/releases/%{name}-%{version}.zip
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: unzip
Requires: java >= 1.6, java-devel >= 1.6
Requires: python%{?el5:26} >= 2.6
%description
The Play framework is a clean alternative to bloated Enterprise Java stacks.
It focuses on developer productivity and targets RESTful architectures.
%prep
%setup -q
%install
rm -rf %{buildroot}
install -d -m 755 %{buildroot}/opt/%{name}
install -m 755 play %{buildroot}/opt/%{name}/play
# Ignore Wintel related content.
cp -R framework modules resources %{buildroot}/opt/%{name}/
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYING
%doc README.textile
%doc documentation/
%doc samples-and-tests/
%doc support/
%dir /opt/%{name}
/opt/%{name}/play
/opt/%{name}/framework
/opt/%{name}/modules
/opt/%{name}/resources
%pre
getent group %{name} >/dev/null || \
groupadd -r %{name}
getent passwd %{name} >/dev/null || \
useradd -r -g %{name} -d /opt/${name} -s /sbin/nologin -c "Play Framework Daemon" %{name}
exit 0
%changelog
* Mon Nov 21 2011 Dan Carley <[email protected]> 1.2.3-1
- Initial package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment