summaryrefslogtreecommitdiff
path: root/libre/doublecmd-libre/PKGBUILD
blob: c08273344c958a0bcb5e1db188997492b1b64e1a (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
# vim:set ft=sh:
# $Id: PKGBUILD 103163 2013-12-28 11:01:37Z idevolder $
# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: (sirocco AT ngs.ru)

_pkgbase=doublecmd
pkgbase=doublecmd-libre
pkgname=('doublecmd-libre-gtk2' 'doublecmd-libre-qt')
pkgver=0.5.8
_helpver=0.5.5
pkgrel=1
url="http://doublecmd.sourceforge.net/"
arch=('i686' 'x86_64')
license=('GPL')
install="$_pkgbase.install"
provides=("$_pkgbase")
makedepends=('lazarus' 'qt4pas' 'gtk2')
optdepends=(
	'lua51: scripting'
	'p7zip: support for 7zip archives'
	'unar: support for rar archives'
)
source=(
	"http://downloads.sourceforge.net/project/$_pkgbase/Double%20Commander%20Source/$_pkgbase-$pkgver-src.tar.gz"
	"http://downloads.sourceforge.net/project/$_pkgbase/Double%20Commander%20Source/$_pkgbase-help-$_helpver-src.tar.gz"
)

build() {
	cp -a $_pkgbase-$pkgver $_pkgbase-gtk
	cp -a $_pkgbase-$pkgver $_pkgbase-qt

	cd "$srcdir/$_pkgbase-gtk"
	if [ "$CARCH" = "i686" ]; then
		sed -e '/fPIC/d' -i "$srcdir/$_pkgbase-gtk/components/doublecmd/doublecmd_common.lpk"
	fi
	sed -e 's/\(export\ lazbuild=\).*/\1"$(which\ lazbuild) --lazarusdir=\/usr\/lib\/lazarus"/' -i build.sh
	./build.sh beta gtk2

	cd "$srcdir/$_pkgbase-qt"
	# dont use fPIC on i686
	if [ "$CARCH" = "i686" ]; then
		sed -e '/fPIC/d' -i "$srcdir/$_pkgbase-qt/components/doublecmd/doublecmd_common.lpk"
	fi
	sed -e 's/\(export\ lazbuild=\).*/\1"$(which\ lazbuild) --lazarusdir=\/usr\/lib\/lazarus"/' -i build.sh
	./build.sh beta qt
}

package_doublecmd-libre-gtk2() {
	pkgdesc="twin-panel (commander-style) file manager (GTK), with unar recommendation"
	depends=('gtk2')
	conflicts=('doublecmd-qt' 'doublecmd-gtk2' 'doublecmd-gtk2-libre')
	replaces=('doublecmd-gtk2' 'doublecmd-gtk2-libre')
	provides=("doublecmd-gtk2=${pkgver}")
	cd "$srcdir/$_pkgbase-gtk"
	sed -e 's/LIB_SUFFIX=.*/LIB_SUFFIX=/g' -i ./install/linux/install.sh
	./install/linux/install.sh --install-prefix="$pkgdir"

	# install doc
	cd "$srcdir/$_pkgbase-help-$_helpver"
	cp -a * "$pkgdir/usr/share/$_pkgbase/doc/"
}

package_doublecmd-libre-qt() {
	pkgdesc="twin-panel (commander-style) file manager (QT), with unar recommendation"
	depends=('qt4pas')
	conflicts=('doublecmd-gtk2' 'doublecmd-qt' 'doublecmd-qt-libre')
	replaces=('doublecmd-qt' 'doublecmd-qt-libre')
	provides=("doublecmd-qt=${pkgver}")
	cd "$srcdir/$_pkgbase-qt"
	sed -e 's/LIB_SUFFIX=.*/LIB_SUFFIX=/g' -i ./install/linux/install.sh
	./install/linux/install.sh --install-prefix="$pkgdir"

	# install doc
	cd "$srcdir/$_pkgbase-help-$_helpver"
	cp -a * "$pkgdir/usr/share/$_pkgbase/doc/"
}

sha256sums=('bfa85693b6cc06b7fd28ec8bd443ad9fb9d79d27a541e4f4d54bb9da2fb052ea'
            '5c5d00187df811df0734bf751a581bce7e1bdd4cf4639b2a1101f1da8743daaf')