summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a4fb12c59660d778f9a2ffddb2d0169fc5e2f5f5 (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
66
67
68
69
70
71
72
73
# Maintainer: Lev Levitsky <levlev@mail.ru>
pkgbase="percolator-git"
pkgname=('percolator-git' 'percolator-converters-git')
pkgver=3.07
pkgrel=1
pkgdesc="Software for postprocessing of shotgun proteomics data + format converters"
url="http://percolator.ms/"
license=('Apache')
depends=('xerces-c' 'sqlite' 'libtirpc-compat' 'boost')
arch=('x86_64')
makedepends=('git' 'xsd' 'libxsd' 'cmake' 'zlib')
source=('source::git+https://github.com/percolator/percolator')
md5sums=('SKIP')

pkgver() {
    cd "${srcdir}/source"
    git describe --match='rel*' --tags | sed 's/\([^-]*-g\)/r\1/;s/rel-//;s/-/./g'
}

prepare() {
    cd "${srcdir}/source"
    cd "$BUILDDIR"
    for d in "${pkgname[@]}"; do
        mkdir -p "${d%-git}"
        rm -rf "${d%-git}"/*
    done
}

build() {
    export HARDENING_PIE=0
    cd "$BUILDDIR/${pkgname[0]%-git}"
    echo "------------------------"
    echo "Building percolator ..."
    echo "------------------------"
    echo "Running cmake for percolator ..."
    echo "................................"
    cmake -DTARGET_ARCH=x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DXML_SUPPORT=ON -DCMAKE_PREFIX_PATH="/usr/include;/usr/lib" -DCMAKE_CXX_FLAGS="-l tirpc" "${srcdir}/source"
    echo "Running make for percolator ..."
    echo "..............................."
    make -j 4
    echo "------------------------"
    echo "Building converters ..."
    echo "------------------------"
    cd "../${pkgname[1]%-git}"
    echo "Running cmake for percolator-converters ..."
    echo "..........................................."
    cmake -DTARGET_ARCH=x86_64 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release "${srcdir}/source/src/converters"
    echo "Running make for percolator-converters ..."
    echo ".........................................."
    make
}

package_percolator-git() {
    pkgdesc="Percolator and qvality, two post processors for shotgun proteomics data."
    name="${pkgname[0]%-git}"
    provides=("$name")
    conflicts=("$name")

    cd "$BUILDDIR/$name"
    make DESTDIR="$pkgdir/" install
}

package_percolator-converters-git() {
    pkgdesc="Parsers of different database search engines to percolator input format."
    name="${pkgname[1]%-git}"
    provides=("$name")
    conflicts=("$name")

    cd "$BUILDDIR/$name"
    make DESTDIR="$pkgdir/" install
}