#!/bin/bash # playdeb builds a debian package of the play framework. playdeb downloads # the playframework by itself. You run it by # playdeb.sh # Example: # playdeb.sh 1.2.3 "Denny Colt " # # The script has been tested with version 1.2.3. if [ -z $1 ] then echo "Usage: playdeb.sh " echo -e "Example: playdeb.sh 1.2.3 \"Denny Colt \"" exit 1 fi if [ -z $2 ] then echo "The maintainer is missing. Please provide it as second argument." exit 1 fi export DEBEMAIL=$2 set -e wget http://download.playframework.org/releases/play-${1}.zip unzip play-${1}.zip tar -czf play_${1}.orig.tar.gz play-${1} cd play-${1} mkdir debian export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index" quilt new modifystartscript.diff quilt add play sed -i "s:sys.path.append.*:sys.path.append('/usr/share/play/framework/pym'):g" play sed -i "s: play_env\[.basedir.\].*: play_env['basedir']='/usr/share/play':g" play quilt refresh quilt pop -a dch --create -v ${1} --package play "Created from play-${1}.zip via playdeb.sh" echo 8 > debian/compat echo "Source: play" > debian/control echo "Maintainer: $2" >> debian/control echo "Section: misc" >> debian/control echo "Priority: optional" >> debian/control echo "Standards-Version: 3.9.2" >> debian/control echo "Build-Depends: debhelper (>= 8)" >> debian/control echo "Homepage: http://www.playframework.org" >> debian/control echo "" >> debian/control echo "Package: play" >> debian/control echo "Architecture: any" >> debian/control echo "Description: A framework to build web applications with Java & Scala." >> debian/control echo " It is a web framework based on a lightweight, stateless, web-friendly architecture." >> debian/control cp COPYING debian/copyright echo "documentation/*" >> debian/play.docs echo "README.textile" >> debian/play.docs echo "framework usr/share/play" >> debian/play.install echo "modules usr/share/play" >> debian/play.install echo "python usr/share/play" >> debian/play.install echo "resources usr/share/play" >> debian/play.install echo "play usr/bin" >> debian/play.install echo "samples-and-tests usr/share/play" >> debian/play.install echo "support usr/share/play" >> debian/play.install echo "#!/usr/bin/make -f" >> debian/rules echo "%:" >> debian/rules echo -e "\tdh \$@" >> debian/rules mkdir -p debian/source echo "3.0 (quilt)" > debian/source/format debuild -us -uc #clean up cd .. rm -rf play-${1} rm *.build rm *.changes rm *.tar.gz rm *.dsc rm *.zip