summaryrefslogtreecommitdiffstats
path: root/abs/extra/projectx/PKGBUILD
blob: 758df7c58a4bbf24e7a1b9287964213521465baf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Contributer: Sebastian Sareyko <public@nooms.de>
#
# It is possible to choose the idct implementation
# Available are:
# 
# none               use ProjectX Java implementation
# idct               the C implementation of the source from ProjectX
# idct-ffmpeg        taken from the ffmpeg Project
# idct-mjpeg         taken from MJPEGTOOLS 1.8.0
# idct-mjpeg-mmx     taken from MJPEGTOOLS 1.8.0
#
_idct=idct-mjpeg-mmx

pkgname=projectx
pkgver=0.91.0
pkgrel=5
license=('GPL')
arch=('i686' 'x86_64')
pkgdesc="DVB demux tool for repairing and analyzing different stream types"
makedepends=('java-environment')
depends=('java-runtime')
url="http://sourceforge.net/projects/project-x"
source=(http://downloads.sourceforge.net/sourceforge/project-x/ProjectX_$pkgver.zip \
        IDCTFast.patch
	projectx)

md5sums=('5cf7bb227abe2c16d34e8e9c84915291'
         '364022b37a55643fd8ec8d042827c3c9'
         '0bb5dfb7683babb91f7fc996f5de7f2d')
build() {
    cd ${srcdir}
    cd Project-X_0.91.0/
    if [ ${_idct} != "none" ]; then
       patch -p1 < ${srcdir}/IDCTFast.patch
       unzip lib/Linux/ProjectX_Source_0.90.4-portable.zip
       cp ProjectX_Source_0.90.4/src/net/sourceforge/dvb/projectx/video/IDCTFast.java src/net/sourceforge/dvb/projectx/video/
    fi
    sh ./build.sh
    if [ ${_idct} != "none" ]; then
       cd ProjectX_Source_0.90.4/lib/PORTABLE/
       make clean
       make PROJECTX_HOME=${srcdir}/Project-X_0.91.0 IDCT=${_idct} CPLAT="$CFLAGS -fPIC"
       cd ${srcdir}/Project-X_0.91.0
    fi
    install -D -m0755 $startdir/projectx $startdir/pkg/usr/bin/projectx
    install -D -m0644 ProjectX.jar $startdir/pkg/opt/projectx/ProjectX.jar
    if [ ${_idct} != "none" ]; then
       install -D -m0644 ProjectX_Source_0.90.4/lib/PORTABLE/libidctfast.so \
            $startdir/pkg/opt/projectx/lib/libidctfast.so
    fi
    install -D -m0644 lib/commons-net-1.3.0.jar \
             $startdir/pkg/opt/projectx/lib/commons-net-1.3.0.jar
    install -D -m0644 lib/jakarta-oro-2.0.8.jar \
             $startdir/pkg/opt/projectx/lib/jakarta-oro-2.0.8.jar
    sed -i -e 's#Exec=java -jar /usr/share/projectx/ProjectX.jar#Exec=/usr/bin/projectx#' projectx.desktop
    install -D -m0644 projectx.desktop $startdir/pkg/usr/share/applications/projectx.desktop
}