1 # Contributor: Kosenko Roman <madkite@gmail.com>
5 pkgdesc='Open-Source Flash Server (Development Version)'
7 url='http://osflash.org/red5'
9 depends=('java-environment>=5')
10 makedepends=(subversion 'apache-ant>=1.7.0')
11 backup=(etc/conf.d/red5 etc/red5/{access.properties,catalina.policy,context.xml,ehcache.xml,logback.xml,password.properties,quartz.properties,realm.properties,red5.globals,red5.policy,red5.properties,red5.xml,tomcat-users.xml,web.xml})
12 install="${pkgname%-*}.install"
14 #http://dist.osjava.org/releases/official/simple-jndi/simple-jndi-0.11.4.1.tar.gz \
15 http://mirrors.ibiblio.org/pub/mirrors/maven2/simple-jndi/simple-jndi/0.11.4.1/simple-jndi-0.11.4.1.jar \
16 ${pkgname%-*}.sh ${pkgname%-*}.conf)
17 noextract=(red5-$pkgver.tar.gz)
19 provides=("red5=$pkgver")
22 _svnurl='http://red5.googlecode.com/svn/java/server/trunk'
23 _svnsrc="${SRCDEST}/$pkgname-$pkgver.tar.gz"
24 _docurl='http://red5.googlecode.com/svn/doc/trunk'
25 _demosurl='http://red5.googlecode.com/svn/flash/trunk/deploy'
27 #if you want to build 1.0rc1 then comment out next line
28 true && pkgrel=$(svn info "${_svnurl}" | awk '/Revision/ {print $2}')
32 msg 'Preparing sources...'
33 [ -d $pkgname ] && rm -rf $pkgname
34 [ -f ${_svnsrc} ] && tar -xzf ${_svnsrc}
35 if [ -d $pkgname/.svn ]; then
36 msg "Updating from ${_svnurl}"
37 svn up -r $pkgrel $pkgname
39 msg "Checkouting from ${_svnurl}"
40 svn co "${_svnurl}" -r $pkgrel $pkgname
43 if [ -d doc/.svn ]; then
44 msg "Updating from ${_docurl}"
47 msg "Checkouting from ${_docurl}"
48 svn co "${_docurl}" -r $pkgrel doc
50 if [ -d webapps/root/demos/.svn ]; then
51 msg "Updating from ${_demosurl}"
52 svn up -r $pkgrel webapps/root/demos
54 msg "Checkouting from ${_demosurl}"
55 svn co "${_demosurl}" -r $pkgrel webapps/root/demos
58 tar -czf ${_svnsrc} $pkgname
59 cd $pkgname || return $?
61 msg 'Starting make...'
62 sed 's/${java.target_version}/1.6/g' -i build.xml
65 #sed -i 's|\(.port\)=443|\1=8443|' conf/red5.properties
67 msg 'Starting install...'
68 mkdir -p $startdir/pkg/opt/red5
69 #mv $startdir/src/simple-jndi-*/simple-jndi-*.jar lib
70 install -m0644 $startdir/src/simple-jndi-*.jar lib
71 mv lib $startdir/pkg/opt/red5
72 #install -m0755 red5.sh $startdir/pkg/opt/red5
73 install -m0644 *.jar $startdir/pkg/opt/red5
74 mv plugins $startdir/pkg/opt/red5
76 for i in conf/red5*.xml conf/red5.globals; do
77 sed 's#${red5.root}/webapps#/srv/red5#' -i $i
80 mkdir -p $startdir/pkg/etc
81 mv conf $startdir/pkg/etc/red5
82 chgrp -R 67 $startdir/pkg/etc/red5
83 chmod 0640 $startdir/pkg/etc/red5/*
84 ln -s /etc/red5 $startdir/pkg/opt/red5/conf
86 mkdir -p $startdir/pkg/srv
87 mv webapps $startdir/pkg/srv/red5
88 chown -R 67:67 $startdir/pkg/srv/red5
89 chmod 0775 $startdir/pkg/srv/red5
90 ln -s /srv/red5 $startdir/pkg/opt/red5/webapps
92 install -d -m775 -o 67 -g 67 $startdir/pkg/var/log/red5
93 ln -s /var/log/red5 $startdir/pkg/opt/red5/log
95 ln -s /var/tmp $startdir/pkg/opt/red5/work
97 find ../doc -depth -type d -name .svn -exec rm -r {} \;
98 mkdir -p $startdir/pkg/usr/share/doc
99 mv ../doc $startdir/pkg/usr/share/doc/red5
100 #mv swf $startdir/pkg/usr/share/doc/red5
102 cd ../src; rm -rf conf; find -depth -type d -name .svn -exec rm -r {} \;
103 zip -rq $startdir/pkg/opt/red5/src.zip *
105 install -D -m0754 -o 67 -g 67 $startdir/src/${pkgname%-*}.sh $startdir/pkg/etc/rc.d/${pkgname%-*}
106 install -D -m0664 -o 67 -g 67 $startdir/src/${pkgname%-*}.conf $startdir/pkg/etc/conf.d/${pkgname%-*}
109 #md5sums=('e19aaacee16be383fe805ce8acd28620' '5a7ff7c813c0862b96bca96984c89797' 'b49fadd28934e899b2143f297faa97a2')
110 md5sums=('5141e422734fd718e0f82d73124388ba' '5a7ff7c813c0862b96bca96984c89797' 'b49fadd28934e899b2143f297faa97a2')