aboutsummaryrefslogtreecommitdiffstats
path: root/main/thunar-vcs-plugin/APKBUILD
blob: 5dce61c2783b7ed52cf9e791f3c7dce526540f45 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=thunar-vcs-plugin
pkgver=0.1.4
pkgrel=4
pkgdesc="Version Contol System plugin for the Thunar filemanager"
url="http://goodies.xfce.org/projects/thunar-plugins/thunar-vcs-plugin"
arch="all"
license="GPLv2+"
depends=
makedepends="thunar-dev subversion-dev apr-dev util-linux-dev"
install=""
subpackages="$pkgname-git:_git $pkgname-svn:_svn"
source="http://archive.xfce.org/src/thunar-plugins/thunar-vcs-plugin/0.1/thunar-vcs-plugin-$pkgver.tar.bz2"

_builddir="$srcdir"/thunar-vcs-plugin-$pkgver
prepare() {
	local i
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	# quick and dirty fix for apr linking
	sed -i -e 's/APR_LDFLAGS/APR_LIBS/' thunar-vcs-plugin/Makefile.in
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libexecdir=/usr/lib/xfce4 \
		--disable-static \
		--enable-subversion \
		--enable-git \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/thunarx-*/*.la
}

_mv_files() {
	local i
	for i in "$@"; do
		mkdir -p "$subpkgdir"/${i%/*}
		mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
	done
}

_git() {
	pkgdesc="Git support for thunar-vcs-plugin"
	depends=
	install_if="thunar-vcs-plugin git"
	cd "$pkgdir"
	_mv_files usr/lib/xfce4/tvp-git-helper \
		usr/share/icons/hicolor/*/apps/git.png
}

_svn() {
	pkgdesc="Subversion support for thunar-vcs-plugin"
	depends=
	install_if="thunar-vcs-plugin subversion"
	cd "$pkgdir"
	_mv_files usr/lib/xfce4/tvp-svn-helper \
		usr/share/icons/hicolor/*/apps/subversion.png
}

md5sums="b2321096c706e42b85987f0114ab73bc  thunar-vcs-plugin-0.1.4.tar.bz2"