updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / play-framework / PKGBUILD
blob32d1a51217bddc2e71888b1b376e0200f0ff50eb
1 # Maintainer: Julien Nicoulaud <julien.nicoulaud@gmail.com>
2 # Source: https://github.com/nicoulaj/archlinux-packages
3 pkgname=play-framework
4 pkgver=1.2.4
5 pkgrel=1
6 pkgdesc="Java/Scala web framework focused on developer productivity."
7 arch=(any)
8 url="http://www.playframework.org"
9 license=(APACHE)
10 depends=('java-environment>=5' 'python2')
11 optdepends=('scala: to use the Scala version of Play! framework'
12             'bash-completion: bash auto-completion for the play command'
13             'zsh-completions-git: zsh auto-completion for the play command')
14 install=${pkgname}.install
15 options=(!strip emptydirs)
16 changelog=Changelog
17 conflicts=(${pkgname}-git)
18 source=(http://download.playframework.org/releases/play-${pkgver}.zip)
19 md5sums=('ec8789f8cc02927ece536d102f5e649e')
21 build() {
22   msg2 "Generate scripts for /etc/profile.d..."
23   cat <<EOF > "${srcdir}"/${pkgname}.profile.d.sh
24 export PLAY_HOME=/opt/${pkgname}
25 EOF
26   cat <<EOF > "${srcdir}"/${pkgname}.profile.d.csh
27 setenv PLAY_HOME "/opt/${pkgname}"
28 EOF
30   msg2 "Generate executable for /usr/bin..."
31   cat <<EOF > "${srcdir}"/${pkgname}.sh
32 #!/bin/sh
33 python2 \${PLAY_HOME}/play "\$@"
34 EOF
36   msg2 "Strip unneeded stuff from distribution..."
37   rm -rf "${srcdir}"/play-${pkgver}/python
40 package() {
41   msg2 "Install the assembly at /opt/${pkgname}..."
42   install -dm755                   "${pkgdir}"/opt/${pkgname}
43   cp -r ${srcdir}/play-${pkgver}/* "${pkgdir}"/opt/${pkgname}
45   msg2 "Set up the PLAY_HOME environment variable in /etc/profile.d..."
46   install -Dm755 "${srcdir}"/${pkgname}.profile.d.sh  "${pkgdir}"/etc/profile.d/${pkgname}.sh
47   install -Dm755 "${srcdir}"/${pkgname}.profile.d.csh "${pkgdir}"/etc/profile.d/${pkgname}.csh
49   msg2 "Install an executable at /usr/bin/play..."
50   install -Dm755 "${srcdir}"/${pkgname}.sh "${pkgdir}"/usr/bin/play
52   msg2 "Install links to the documentation resources at /usr/share/doc/${pkgname}..."
53   install -dm755                          "${pkgdir}"/usr/share/doc/${pkgname}
54   ln -s /opt/${pkgname}/README.textile    "${pkgdir}"/usr/share/doc/${pkgname}/README.textile
55   ln -s /opt/${pkgname}/documentation     "${pkgdir}"/usr/share/doc/${pkgname}/documentation
56   ln -s /opt/${pkgname}/samples-and-tests "${pkgdir}"/usr/share/doc/${pkgname}/samples-and-tests
58   msg2 "Install links to copyright resources at /usr/share/licenses/${pkgname}..."
59   install -dm755                "${pkgdir}"/usr/share/licenses/${pkgname}
60   ln -s /opt/${pkgname}/COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/
62   msg2 "Install bash completion script..."
63   install -dm755                                "${pkgdir}"/etc/bash_completion.d
64   ln -s /opt/${pkgname}/support/play_completion "${pkgdir}"/etc/bash_completion.d/${pkgname}.sh
67 # vim:set ts=2 sw=2 et: