[aur-general] PKGBUILD - custom DLAGENT - failed to create symbolic link

respiranto arch023 at respiranto.de
Mon Sep 26 09:12:18 UTC 2016


Hi,

I'm trying to package the tools necessary to compile the freedict
dictionaries as DICT files (and subsequently the dictionaries
themselves). The whole PKGBUILD is to be found at the end of this message.

Since the sources for all the directories and the tools are provided in
one single repository on github.com, I use svn to extract exclusively
the respective necessary files.

This required a little fiddling, but I finally got it working using a
strange custom DLAGENT ¹:
DLAGENTS+=('_svn::/usr/bin/bash -c _u="%u";\ _u="${_u#_svn://}";\
_d="${_u%/*}";\ _f="${_u##*/}";\ /usr/bin/svn\ checkout\
"https://${_d}"\ "%o"\ --depth\ empty;\ cd\ "%o";\ svn\ up\ "%o"')

Anyways, this works as far as downloading is concerned. However, upon
running makepkg, I get the following error:
==> Extracting sources...
ln: failed to create symbolic link '<somedir>/src/' -> '': No such file
or directory
ln: failed to create symbolic link '<somedir>/src/' -> '': No such file
or directory

The problem appears to be that makepkg stores empty names for the files
downloaded with the custom DLAGENT.

Does somebody know the cause of this? Any help is appreciated.

Einhard Leichtfuß


¹ For some reason the '\ 's are necessary, quoting the whole bash skript
inside did not work (properly escaped, of course).


PKGBUILD
--------
# Maintainer: Einhard Leichtfuß <archer at respiranto.de>
_files=(tools Makefile)
_pkgname=dict-freedict-tools
pkgname=${_pkgname}-svn
pkgver=r1420
pkgrel=1
pkgdesc="Tools to compile the Freedict dictionaries"
arch=('any')
url="http://www.freedict.org/"
license=('GPL')
makedepends=('subversion')
provides=(${_pkgname})
conflicts=(${_pkgname})
DLAGENTS+=('_svn::/usr/bin/bash -c _u="%u";\ _u="${_u#_svn://}";\
_d="${_u%/*}";\ _f="${_u##*/}";\ /usr/bin/svn\ checkout\
"https://${_d}"\ "%o"\ --depth\ empty;\ cd\ "%o";\ svn\ up\ "%o"')
#DLAGENTS+=('_svn::/usr/bin/bash -c _u="%u";\ _u="${_u#_svn://}";\
_d="${_u%/*}";\ _f="${_u##*/}";\ /usr/bin/svn\ checkout\
"https://${_d}"\ "${_f}"\ --depth\ empty;\ cd\ "${_f}";\ svn\ up\ "${_f}"')
#DLAGENTS+=('_svn::/usr/bin/echo %u %o')
source=( $(printf "_svn://github.com/freedict/fd-dictionaries/trunk/%s "
"${_files[@]}") )
md5sums=('SKIP' 'SKIP')

#pkgver()
#{
#	cd ${_files[0]}
#	local _ver="$(svnversion)"
#	printf "r%s" "${_ver//[[:alpha:]]}"
#}

#package()
#{
#	mkdir -p "${pkgdir}/opt/freedict-tools"
#	cp -r "${_files[@]}" "${pkgdir}/opt/freedict-tools/"
#}


More information about the aur-general mailing list