1 # Contributor: Kosenko Roman <madkite@gmail.com>
5 pkgdesc='Open-Source Flash Server'
7 url='http://osflash.org/red5'
9 depends=('java-environment>=6')
10 backup=(etc/conf.d/red5 etc/red5/{access.properties,catalina.policy,ehcache.xml,log4j.properties,logback.xml,password.properties,realm.properties,red5.globals,red5.policy,red5.properties,red5.xml,tomcat-users.xml,web.xml})
11 install="${pkgname%-*}.install"
12 source=(http://trac.red5.org/downloads/$(tr '.' '_' <<< ${pkgver%.*})/red5-$pkgver.tar.gz \
13 #http://dist.osjava.org/releases/official/simple-jndi/simple-jndi-0.11.4.1.tar.gz \
14 http://mirrors.ibiblio.org/pub/mirrors/maven2/simple-jndi/simple-jndi/0.11.4.1/simple-jndi-0.11.4.1.jar \
15 ${pkgname%-*}.sh ${pkgname%-*}.conf)
16 noextract=(red5-$pkgver.tar.gz simple-jndi-0.11.4.1.jar)
21 #ar -x red5_*.deb && tar xfz data.tar.gz && cd usr/lib/red5 || return $?
22 mkdir red5 && tar xfz red5-*.tar.gz -C red5 && cd red5 || return $?
25 #sed -i 's|\(.port\)=443|\1=8443|' conf/red5.properties
27 mkdir -p $startdir/pkg/opt/red5
28 #mv $startdir/src/simple-jndi-*/simple-jndi-*.jar lib
29 mv $startdir/src/simple-jndi-*.jar lib
30 mv lib $startdir/pkg/opt/red5
31 #install -m0755 red5.sh $startdir/pkg/opt/red5
32 install -m0644 *.jar $startdir/pkg/opt/red5
34 for i in conf/red5*.xml conf/red5.globals; do
35 sed 's#${red5.root}/webapps#/srv/red5#' -i $i
38 mkdir -p $startdir/pkg/etc
39 mv conf $startdir/pkg/etc/red5
40 chgrp -R 67 $startdir/pkg/etc/red5
41 chmod 0640 $startdir/pkg/etc/red5/*
42 ln -s /etc/red5 $startdir/pkg/opt/red5/conf
44 mkdir -p $startdir/pkg/srv
45 mv webapps $startdir/pkg/srv/red5
46 chown -R 67:67 $startdir/pkg/srv/red5
47 chmod 0775 $startdir/pkg/srv/red5
48 ln -s /srv/red5 $startdir/pkg/opt/red5/webapps
50 install -d -m775 -o 67 -g 67 $startdir/pkg/var/log/red5
51 ln -s /var/log/red5 $startdir/pkg/opt/red5/log
53 ln -s /var/tmp $startdir/pkg/opt/red5/work
55 #find ../doc -depth -type d -name .svn -exec rm -r {} \;
56 mkdir -p $startdir/pkg/usr/share/doc
57 mv doc $startdir/pkg/usr/share/doc/red5
58 #mv swf $startdir/pkg/usr/share/doc/red5
61 #cd src; #rm -rf conf; find -depth -type d -name .svn -exec rm -r {} \;
62 #zip -rq $startdir/pkg/opt/red5/src.zip *
63 mv src.zip $startdir/pkg/opt/red5
65 install -D -m0754 -o 67 -g 67 $startdir/src/${pkgname%-*}.sh $startdir/pkg/etc/rc.d/${pkgname%-*}
66 install -D -m0664 -o 67 -g 67 $startdir/src/${pkgname%-*}.conf $startdir/pkg/etc/conf.d/${pkgname%-*}
69 #md5sums=('a2eb54ce2a86584c5274db9d0a515475' 'e19aaacee16be383fe805ce8acd28620' '5a7ff7c813c0862b96bca96984c89797' 'b49fadd28934e899b2143f297faa97a2')
70 md5sums=('a2eb54ce2a86584c5274db9d0a515475' '5141e422734fd718e0f82d73124388ba' '5a7ff7c813c0862b96bca96984c89797' 'b49fadd28934e899b2143f297faa97a2')