summaryrefslogtreecommitdiff
path: root/packages/media-sound/mp3diags/mp3diags-1.2.03.exheres-0
blob: 80b46ec426b9fbc1abb6ab100dcb6821a5442fea (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
# Copyright 2011-2016 Timo Gurr <tgurr@exherbo.org>
# Distributed under the terms of the GNU General Public License v2
# Based in part upon 'mp3diags-1.0.01.046.ebuild' from Gentoo, which is:
#   Copyright 1999-2009 Gentoo Foundation

MY_PN=${PN/${PN}/MP3Diags}

require qmake [ slot=4 ] sourceforge [ suffix=tar.gz project=${PN} ] freedesktop-desktop gtk-icon-cache

SUMMARY="Qt-based MP3 diagnosis and repair tool"
DOWNLOADS+=" doc? ( mirror://sourceforge/${PN}/${MY_PN}Doc-${PV}.tar.gz )"

LICENCES="GPL-2 || ( GPL-3 LGPL-3 )"
SLOT="0"
PLATFORMS="~amd64"
MYOPTIONS="doc"

DEPENDENCIES="
    build+run:
        dev-libs/boost[>=1.37.0]
        sys-libs/zlib
        x11-libs/qt:4[>=4.3.1]
"

WORK=${WORKBASE}/${MY_PN}-${PV}

src_prepare() {
    default

    edo lrelease-qt4 src/translations/mp3diags_*.ts

    # TODO: report upstream, multiarch search path fix
    edo sed \
        -e 's:/../share/:/../../share/:g' \
        -i  src/Translation.cpp
}

src_install() {
    dobin bin/${MY_PN}

    insinto /usr/share/applications
    doins desktop/${MY_PN}.desktop

    for x in 16 22 24 32 48; do
        insinto /usr/share/icons/hicolor/${x}x${x}/apps
        newins desktop/${MY_PN}${x}.png ${MY_PN}.png
    done

    insinto /usr/share/${PN}/translations
    doins src/translations/*.qm

    if option doc ; then
        insinto /usr/share/doc/${PNVR}/html
        doins -r ../${MY_PN}Doc-${PV}/*
    fi
}

pkg_postinst() {
    freedesktop-desktop_pkg_postinst
    gtk-icon-cache_pkg_postinst
}

pkg_postrm() {
    freedesktop-desktop_pkg_postrm
    gtk-icon-cache_pkg_postrm
}