Thank you for the comments. Indeed I didn't try to use "namcap" to catch most of the comments. Now I did and sorry about that. Looking deeper at the resutls, I found another issue, which I don't know which is the most appropriate method to fix it. Inside the produced package has references to the build directory, i.e. lib/amiwm/Xsession2:DEFAULT_XINITRC="/home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/Xinitrc" lib/amiwm/Xinitrc:/home/teras/Sources/amiwm/pkg/amiwm/usr/bin/amiwm & wmpid=$! lib/amiwm/Xinitrc: /home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/amiwm-init # Default amiwm tools lib/amiwm/Xsession: export SDT_ALT_SESSION="/home/teras/Sources/amiwm/pkg/amiwm/usr/lib/amiwm/Xsession2" All of them "remember" the "/home/teras/Sources/amiwm" which if I am not mistaken is the ${pkgdir} folder. Should I do something like: for i in "${pkgdir}/usr/lib/amiwm/{Xsession2,Xinitrc,Xsession}" ; do sed -e "s%${pkgdir}%%g" "$i" >"$i.fix"; mv -v "$i.fix" "$i" ; done The full corected PKGBUILD follows: # Maintainer: Panayotis Katsaloulis <panayotis@panayotis.com> pkgname=amiwm pkgver=0.21pl2 pkgrel=1 pkgdesc="An X window manager that tries to make your display look and feel like an Amiga® Workbench® screen" arch=('x86_64' 'i686') url="https://www.lysator.liu.se/~marcus/amiwm.html" license=('CUSTOM') source=("ftp://ftp.lysator.liu.se/pub/X11/wm/amiwm/amiwm${pkgver}.tar.gz") md5sums=('3a47e887777e2be2978363220cf815ef') depends=('libxmu') build() { cd "$pkgname$pkgver" ./configure --prefix=/usr make } package() { cd "$pkgname$pkgver" make prefix="$pkgdir/usr" install rm -v "$pkgdir/usr/bin/requestchoice" mv -v "${pkgdir}/usr/man" "${pkgdir}/usr/share" for i in "${pkgdir}"/usr/lib/amiwm/{Xsession2,Xinitrc,Xsession} ; do sed -e "s%${pkgdir}%%g" "$i" >"$i.fix" ; mv -v "$i.fix" "$i" ; done install -v -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE }