diff options
author | Томас | 2022-04-08 15:09:04 -0500 |
---|---|---|
committer | Томас | 2022-04-08 15:09:04 -0500 |
commit | 81653cde970df8dd25107469a1e83ef39d231c66 (patch) | |
tree | 92facb4271282b32e86b14731ce9167fd3650e24 | |
parent | 760cd8f80d333aaf1365c6ef7a7b6c786cf48a34 (diff) | |
download | aur-81653cde970df8dd25107469a1e83ef39d231c66.tar.gz |
package() refactoring
-rw-r--r-- | PKGBUILD | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -17,19 +17,19 @@ source=("https://packages.chef.io/files/stable/chef-server/${pkgver}/ubuntu/18.0 sha256sums=('c80d63471e173188f656ff36e74afbbc97524f764f3a41cdcc51bd4fedc659a8') package() { + + cd "$srcdir" || exit 1 bsdtar -xf data.tar.xz -C "$pkgdir" install -Dm644 "$pkgdir/opt/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - # link executables - binaries="chef-apply chef-client chef-server-ctl chef-shell chef-solo gather-logs knife ohai" - mkdir -p "$pkgdir/usr/bin" - + binaries="chef-apply chef-client chef-server-ctl chef-shell chef-solo gather-logs knife ohai" for binary in $binaries; do - ln -s "/opt/opscode/bin/$binary" "$pkgdir/usr/bin/" || error_exit "Cannot link $binary to /usr/bin" + ln -s "/opt/$pkgname/bin/$binary" "$pkgdir/usr/bin/" || error_exit "Cannot link $binary to /usr/bin" done + chown -Rh 0:0 "$pkgdir" - chmod 755 "$pkgdir/opt" + chmod -R 755 "$pkgdir/opt" } |