You are not logged in.

#1 2012-02-03 22:33:05

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

PKGBUILD for transmission-remote-gtk new since move to git - help?

Transmission-remote-gtk just moved to git from svn and I made a new PKGBUILD for it;

# Maintainer: Aleksey Frolov <atommixz@gmail.com> [ru]
# Contributor: PitBall

_pname=transmission-remote-gtk
pkgname=${_pname}-git
pkgver=20120203
pkgrel=1
pkgdesc="GTK client for remote management of the Transmission BitTorrent client, using its HTTP RPC protocol"
arch=(i686 x86_64)
license=('GPL2')
depends=('git' 'hicolor-icon-theme' 'geoip' 'libproxy' 'libunique' 'json-glib' 'libnotify' 'gconf' 'desktop-file-utils' 'curl')
makedepends=('intltool')
conflicts=('transmission-remote-gtk')
install=${pkgname}.install
options=('!libtool')
url="http://code.google.com/p/transmission-remote-gtk"

_gittrunk="https://code.google.com/p/transmission-remote-gtk/"
_gitmod=${pkgname}

build() {
	cd ${srcdir}

# GIT checkout
	if [[ -d ${_gitmod} ]]; then
		(cd ${_gitmod} && git pull )
	else
		git clone ${_gittrunk} ${_gitmod}
	fi

	rm -rf ${srcdir}/${_gitmod}-build
	cp -r ${srcdir}/${_gitmod} ${srcdir}/${_gitmod}-build
	cd ${srcdir}/${_gitmod}-build

# Configure
	./autogen.sh
	./configure \
	--prefix=/usr
#		--prefix=/usr \
#		--disable-schemas-install \
#		--with-gconf-schema-file-dir=/usr/share/gconf/schemas

# Compile
	make

# Install
	make DESTDIR=${pkgdir} install

# License & Authors
	install -dm755 ${pkgdir}/usr/share/licenses/${_pname}
	ln -sf /usr/share/licenses/common/GPL2/license.txt ${pkgdir}/usr/share/licenses/${_pname}/LICENSE
	install -Dm644 AUTHORS ${pkgdir}/usr/share/doc/${_pname}/AUTHORS
}

When doing a pacman -U 'pkgname' I get about 20 file "exists in filesystem". With my limited knolwedge I don't know how to fix this. pacman -Uf does it but is an ugly solution. What can I do with the PKGBUILD or maybe recommend users to uninstall the svn version first?

Furthermore; there was a bit of code looking for the .svn directory

# SVN checkout
	if [[ -d ${_svnmod}/.svn ]]; then
		(cd ${_svnmod} && svn up -r $pkgver)
	else
		svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod}
	fi

which I changed to this;

# GIT checkout
	if [[ -d ${_gitmod} ]]; then
		(cd ${_gitmod} && git pull )
	else
		git clone ${_gittrunk} ${_gitmod}
	fi

The prupose is to look for previous source and not download it all again, just get the changes. svn up -r is quite straight forward but git pull, I find is not. I'd really appreciate some pointers on this.

By the way, it compiles just fine and with pacman -Uf it works, I'd just like to make a proper PKGBUILD.

Last edited by swanson (2012-02-03 22:35:17)

Offline

#2 2012-02-03 23:22:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: PKGBUILD for transmission-remote-gtk new since move to git - help?

Are these existing files owned by transmission-remote-gtk svn version?

Offline

#3 2012-02-03 23:32:52

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: PKGBUILD for transmission-remote-gtk new since move to git - help?

Yes they are.

Offline

#4 2012-02-04 08:14:14

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: PKGBUILD for transmission-remote-gtk new since move to git - help?

uninstall  transmission-remote-gtk svn version

Offline

#5 2012-02-04 08:23:04

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: PKGBUILD for transmission-remote-gtk new since move to git - help?

Yes, that's the seems to be the easiest and cleanest way to go. Here's the new transmission-remote-gtk git version in AUR;

https://aur.archlinux.org/packages.php?ID=56377

Offline

Board footer

Powered by FluxBB