summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorShulhan2022-07-09 14:00:50 +0700
committerShulhan2022-07-09 14:02:15 +0700
commit1b07686fb6c931d950ff69d681c1e94aa33811e2 (patch)
tree32c7ad69bc4d8378a80aae61ef76f2dea66398af
parentb856492c8a8a5d76a12351ebb4ee98850f5ef9d3 (diff)
downloadaur-1b07686fb6c931d950ff69d681c1e94aa33811e2.tar.gz
all: simplify packaging by using the staging (_destdir) area
Instead of uncompressing the final build output file (from build.sh), we sync the staging to $pkgdir. This require adding rsync to makedeps. While at it, use single chown statement for all $pkgdir.
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD9
2 files changed, 6 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 06f4e1a1f1a9..e40f8f64d885 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -10,6 +10,7 @@ pkgbase = google-cloud-ops-agent-git
makedepends = git
makedepends = java-environment
makedepends = pkg-config
+ makedepends = rsync
makedepends = unzip
makedepends = zip
depends = libyaml
diff --git a/PKGBUILD b/PKGBUILD
index d5082f1ec410..70ea9336e8aa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,6 +19,7 @@ makedepends=(
'git'
'java-environment'
'pkg-config'
+ 'rsync'
'unzip'
'zip'
)
@@ -79,10 +80,10 @@ build() {
}
package() {
+ _destdir="$srcdir/../staging"
+
cd "${pkgname}"
- tar -xf /tmp/google-cloud-ops-agent.tgz -C ${pkgdir}/
+ rsync -ar "${_destdir}/" "${pkgdir}/"
rm -rf ${pkgdir}/lib
- chown -R root:root ${pkgdir}/etc
- chown -R root:root ${pkgdir}/opt
- chown -R root:root ${pkgdir}/usr
+ chown -R root:root ${pkgdir}/
}