summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7c9711e9acb4005f51deba5a29ed7e96151dfb9b (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
58
59
60
61
62
63
64
65
# Maintainer: Stephan Windmüller <arch at freewarepoint dot de>
# Contributer: Sebastian Sareyko <public@nooms.de>
#
# It is possible to choose the idct implementation
# Available are:
# 
# none               use ProjectX Java implementation
# 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.08
pkgrel=4
license=('GPL')
arch=('i686' 'x86_64')
pkgdesc="DVB demux tool for repairing and analyzing different stream types"
makedepends=('make')
depends=('java-runtime<=11' 'java-environment' 'bash')
url="http://sourceforge.net/projects/project-x"
source=(https://downloads.sourceforge.net/project/project-x/project-x/ProjectX_0.91.0.00/ProjectX_0.91.0.zip
	http://gentoo.sbriesen.de/distfiles/projectx-idctfast.tar.xz 
        IDCTFast.patch
	projectx)

md5sums=('5cf7bb227abe2c16d34e8e9c84915291'
         '0f09819b08e6105ed6c1e4705794e9c1'
         '5f3ceff20dd1489309465332b821b5e9'
         'b92f5dc14576459119769c245690b8b0')


build() {
    cd ${srcdir}
    mv Project-X/lib/PORTABLE Project-X_0.91.0/lib
    mv Project-X/src/net/sourceforge/dvb/projectx/video/IDCTFast.java Project-X_0.91.0/src/net/sourceforge/dvb/projectx/video
    if [ ${_idct} != "none" ]; then
       patch --binary -p0 < IDCTFast.patch
    fi
    cd ${srcdir}/Project-X_0.91.0
    sh ./build.sh
    if [ ${_idct} != "none" ]; then
       cd lib/PORTABLE/
       export JAVA_HOME="/usr/lib/jvm/`archlinux-java get`/"
       make clean
       make PROJECTX_HOME=${srcdir}/Project-X_0.91.0 IDCT=${_idct} CPLAT="$CFLAGS -fPIC"
       cd ${srcdir}/Project-X_0.91.0
    fi
}

package() {
    cd ${srcdir}/Project-X_0.91.0
    install -D -m0755 $srcdir/projectx $pkgdir/usr/bin/projectx
    install -D -m0644 ProjectX.jar $pkgdir/usr/share/java/projectx/ProjectX.jar
    if [ ${_idct} != "none" ]; then
       install -D -m0644 lib/PORTABLE/libidctfast.so \
            $pkgdir/usr/lib/projectx/libidctfast.so
    fi
    install -D -m0644 lib/commons-net-1.3.0.jar \
             $pkgdir/usr/share/java/projectx/lib/commons-net-1.3.0.jar
    install -D -m0644 lib/jakarta-oro-2.0.8.jar \
             $pkgdir/usr/share/java/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 $pkgdir/usr/share/applications/projectx.desktop
}