summaryrefslogtreecommitdiff
path: root/libre/doublecmd/PKGBUILD
blob: 4d115d90abdc707dcfdd9204392bd1959d7ae373 (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
74
75
76
77
78
79
80
# vim:set ft=sh:
# Maintainer (Arch): BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor (Arch): (sirocco AT ngs.ru)
# Contributor: André Silva <emulatorman@hyperbola.info>

# parabola changes and rationale:
#  - removed libunrar support

pkgbase=doublecmd
pkgname=('doublecmd-gtk2' 'doublecmd-qt5')
pkgver=0.9.8
pkgrel=1
pkgrel+=.parabola1
url="http://doublecmd.sourceforge.net/"
arch=('x86_64')
arch+=('i686' 'armv7h')
license=('GPL')
provides=("$pkgbase")
makedepends=('lazarus' 'qt5pas' 'gtk2')
optdepends=(
    'lua: scripting'
    'unzip: support extracting zip archives'
    'zip: suport packing zip archives'
    'p7zip: support for 7zip archives'
)
source=(
    "https://downloads.sourceforge.net/project/$pkgbase/Double%20Commander%20Source/$pkgbase-$pkgver-src.tar.gz"
    "libre.patch"
)
sha512sums=('e44e4e697cbea0cec08fbac7336cb980ae2a1f72e807435b6e25aa81baf5fc0b94d378161cb36199e0fe42242101c7ce30301c07d1195f5b6252e63cef443682'
            'f8a38cbae2c6ee0e0a40802daa5b779c6c07ae2d35b5adc119118318740585704b19bb6fb4d7edfb6ea54cad08f6381ef07ddae08f55bfbd38a1909e34fc3bea')

prepare() {
    cp -a /usr/lib/lazarus ./

    cd "$pkgbase-$pkgver"
    sed -e 's/LIB_SUFFIX=.*/LIB_SUFFIX=/g' -i install/linux/install.sh
    sed -e "s@=\$(which lazbuild)@=\"\$(which lazbuild) --lazarusdir=$srcdir/lazarus\"@" -i build.sh

    msg2 'remove nonfree libunrar, unace, unarj support and references'
    rm -rv plugins/wcx/unrar
    rm -rv install/linux/deb/libunrar
    rm -v install/linux/rpm/libunrar.spec
    rm -v install/darwin/make-unrar.sh
    patch -Np1 -i "$srcdir"/libre.patch

    cd "$srcdir"

    cp -a "$pkgbase-$pkgver" "$pkgbase-gtk"
    cp -a "$pkgbase-$pkgver" "$pkgbase-qt5"
}

build() {
    msg2 'build gtk'
    cd "$srcdir/$pkgbase-gtk"
    ./build.sh beta gtk2

    msg2 'build qt5'
    cd "$srcdir/$pkgbase-qt5"
    ./build.sh beta qt5
}

package_doublecmd-gtk2() {
    pkgdesc="twin-panel (commander-style) file manager (GTK2)"
    pkgdesc+=", without nonfree decompression engine for RAR archives and support for nonfree unace and unarj"
    depends=('gtk2' 'desktop-file-utils' 'hicolor-icon-theme' 'shared-mime-info')
    conflicts=('doublecmd-qt5')
    cd "$srcdir/$pkgbase-gtk"
    ./install/linux/install.sh --install-prefix="$pkgdir"
}

package_doublecmd-qt5() {
    pkgdesc="twin-panel (commander-style) file manager (Qt5)"
    pkgdesc+=", without nonfree decompression engine for RAR archives and support for nonfree unace and unarj"
    depends=('qt5pas' 'desktop-file-utils' 'hicolor-icon-theme' 'shared-mime-info')
    conflicts=('doublecmd-gtk2')
    replaces=('doublecmd-qt' 'doublecmd-qt4')
    cd "$srcdir/$pkgbase-qt5"
    ./install/linux/install.sh --install-prefix="$pkgdir"
}