summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Phillips2016-06-28 17:53:55 +1200
committerDavid Phillips2016-06-28 17:53:55 +1200
commitf6c99b44c8788827209b8832e5465598a97301ae (patch)
treee09376539b202361b0b2c6ebf38f9bd4b028fb0e
parent95a325907901c8c8ac88f98467d727580aae1ffb (diff)
downloadaur-f6c99b44c8788827209b8832e5465598a97301ae.tar.gz
Build in separate directory
The manual says not to do in-source building and to use a separate directory instead
-rw-r--r--PKGBUILD9
1 files changed, 5 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 412d53cf7bd..291ff3563a1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,13 +18,14 @@ source=("${pkgname}-${pkgver}.zip"::"https://github.com/Brewtarget/${pkgname}/ar
sha512sums=('a0e4ecadfaaaa7f6b2d53f21c5d6d2a54b76dfb29f3210235121b638e385b3b373747a18a3782bae8f5107e6631544d94791d3f8ff1f85fe4f353a0151e68d70')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- cmake ./ -DCMAKE_INSTALL_PREFIX=/usr
+ mkdir -p "${pkgname}-build"
+ cd "${pkgname}-build"
+ cmake "../${pkgname}-${pkgver}" -DCMAKE_INSTALL_PREFIX=/usr
make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${pkgname}-build"
make DESTDIR="${pkgdir}" install
- install -Dm644 COPYING.GPLv3 "${pkgdir}/usr/share/licenses/${pkgname}/COPYING.GPLv3"
+ install -Dm644 "../${pkgname}-${pkgver}/COPYING.GPLv3" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING.GPLv3"
}