diff --git a/abuild b/abuild
index 40cbcb7657b6f820da53b879bb407fb9060b3771..126374188aad77dabf6810df054d1195f4b89e30 100755
--- a/abuild
+++ b/abuild
@@ -347,13 +347,16 @@ mod() {
 # predefined splitfunc dev
 dev() {
 	depends="$pkgname"
-	for i in $(cd "$pkgdir" && find usr/lib -name '*.a' -o \
+	cd "$pkgdir" || return 0
+	for i in cd $(find usr/lib -name '*.a' -o \
 			-name '*.la' -o -name '*.o' 2>/dev/null) \
-			usr/include usr/lib/pkgconfig usr/share/aclocal; do
+			usr/include usr/lib/pkgconfig usr/share/aclocal \
+			usr/bin/*-config ; do
 		if [ -e "$pkgdir/$i" ] || [ -L "$pkgdir/$i" ]; then
 			d="$subpkgdir/${i%/*}"	# dirname $i
 			mkdir -p "$d"
 			mv "$pkgdir/$i" "$d"
+			rmdir "$pkgdir/${i%/*}" 2>/dev/null
 		fi
 	done
 }