updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / projectx / PKGBUILD
blob9b9d9782fd8966980870289b76ec034b83509ee5
1 # Contributer: Sebastian Sareyko <public@nooms.de>
3 # It is possible to choose the idct implementation
4 # Available are:
5
6 # none               use ProjectX Java implementation
7 # idct               the C implementation of the source from ProjectX
8 # idct-ffmpeg        taken from the ffmpeg Project
9 # idct-mjpeg         taken from MJPEGTOOLS 1.8.0
10 # idct-mjpeg-mmx     taken from MJPEGTOOLS 1.8.0
12 _idct=idct-mjpeg-mmx
14 pkgname=projectx
15 pkgver=0.91.0
16 pkgrel=5
17 license=('GPL')
18 arch=('i686' 'x86_64')
19 pkgdesc="DVB demux tool for repairing and analyzing different stream types"
20 makedepends=('java-environment')
21 depends=('java-runtime')
22 url="http://sourceforge.net/projects/project-x"
23 source=(http://downloads.sourceforge.net/sourceforge/project-x/ProjectX_$pkgver.zip \
24         IDCTFast.patch
25         projectx)
27 md5sums=('5cf7bb227abe2c16d34e8e9c84915291'
28          '364022b37a55643fd8ec8d042827c3c9'
29          '0bb5dfb7683babb91f7fc996f5de7f2d')
30 build() {
31     cd ${srcdir}
32     cd Project-X_0.91.0/
33     if [ ${_idct} != "none" ]; then
34        patch -p1 < ${srcdir}/IDCTFast.patch
35        unzip lib/Linux/ProjectX_Source_0.90.4-portable.zip
36        cp ProjectX_Source_0.90.4/src/net/sourceforge/dvb/projectx/video/IDCTFast.java src/net/sourceforge/dvb/projectx/video/
37     fi
38     ./build.sh
39     if [ ${_idct} != "none" ]; then
40        cd ProjectX_Source_0.90.4/lib/PORTABLE/
41        make clean
42        make PROJECTX_HOME=${srcdir}/Project-X_0.91.0 IDCT=${_idct} CPLAT="$CFLAGS -fPIC"
43        cd ${srcdir}/Project-X_0.91.0
44     fi
45     install -D -m0755 $startdir/projectx $startdir/pkg/usr/bin/projectx
46     install -D -m0644 ProjectX.jar $startdir/pkg/opt/projectx/ProjectX.jar
47     if [ ${_idct} != "none" ]; then
48        install -D -m0644 ProjectX_Source_0.90.4/lib/PORTABLE/libidctfast.so \
49             $startdir/pkg/opt/projectx/lib/libidctfast.so
50     fi
51     install -D -m0644 lib/commons-net-1.3.0.jar \
52              $startdir/pkg/opt/projectx/lib/commons-net-1.3.0.jar
53     install -D -m0644 lib/jakarta-oro-2.0.8.jar \
54              $startdir/pkg/opt/projectx/lib/jakarta-oro-2.0.8.jar
55     sed -i -e 's#Exec=java -jar /usr/share/projectx/ProjectX.jar#Exec=/usr/bin/projectx#' projectx.desktop
56     install -D -m0644 projectx.desktop $startdir/pkg/usr/share/applications/projectx.desktop