-
Notifications
You must be signed in to change notification settings - Fork 0
/
PackageFunc
executable file
·21 lines (19 loc) · 1.05 KB
/
PackageFunc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Implements common package() function for PKGBUILD files by
# standardizing certain file names.
Package() {
local src name
for src in "${source[@]}" ; do
name=${src##*/}
case "$name" in
*.bash-completion) install -Dm644 $name $pkgdir/usr/share/bash-completion/completions/${name%.*} ;;
*.conf) install -Dm644 $name $pkgdir/etc/$name ;;
*.hook) install -Dm644 $name $pkgdir/usr/share/libalpm/hooks/$name ;;
*.timer) install -Dm644 $name $pkgdir/usr/lib/systemd/system/$name ;;
*.service) install -Dm644 $name $pkgdir/usr/lib/systemd/system/$name ;;
autostart-*.desktop) install -Dm644 $name $pkgdir/etc/xdg/autostart/$name ;;
*.desktop) install -Dm644 $name $pkgdir/usr/share/applications/$name ;;
*.*) echo "Sorry, $name not supported." ;;
*) install -Dm755 $name $pkgdir/usr/bin/$name ;;
esac
done
}