summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy2023-09-01 02:44:40 +0700
committerVadim Yanitskiy2023-09-01 03:22:15 +0700
commit79809fdfe9f398649ef0cc68522292ec5b96a773 (patch)
tree10f906e66fa8f1bd744c4c8dbafe2161ab16b20b
parentbd66009d88cd5ba902e12bf7176233eb1b3f9dc5 (diff)
downloadaur-79809fdfe9f398649ef0cc68522292ec5b96a773.tar.gz
fix package(): do not touch real /opt/freecalypso
While being executed by makepkg, functions in PKGBUILD have access to whatever the build-user has access to. The current implementation of package() would mess up with the real '/opt/freecalypso' directory. The right approach is to override the INSTALL_PREFIX variable when invoking make install, so that everything is installed directly to the ${pkgdir}.
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD13
2 files changed, 6 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e19ec89cb37a..66c0ee7ffd0e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = freecalypso-tools-hg
pkgdesc = FreeCalypso host tools package
pkgver = r963.b515a97e5dff
- pkgrel = 1
+ pkgrel = 2
url = https://www.freecalypso.org/hg/freecalypso-tools
arch = x86_64
arch = i686
diff --git a/PKGBUILD b/PKGBUILD
index cad08829b334..19565331881b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname=freecalypso-tools
pkgname="${_pkgname}-hg"
pkgver=r963.b515a97e5dff
-pkgrel=1
+pkgrel=2
pkgdesc="FreeCalypso host tools package"
arch=('x86_64' 'i686')
url="https://www.freecalypso.org/hg/${_pkgname}"
@@ -34,13 +34,10 @@ build() {
package() {
cd "${_pkgname}"
- install -d "${pkgdir}/opt"
- install -d "${pkgdir}/usr/share/doc/${_pkgname}"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
-
- # DESTDIR is not respected, '/opt/freecalypso' is hard-coded.
- # The project's author is strongly against using any other directory.
- make install
- cp -r /opt/freecalypso "${pkgdir}/opt/"
+ install -d "${pkgdir}/usr/share/doc/${_pkgname}"
cp -r doc/* "${pkgdir}/usr/share/doc/${_pkgname}/"
+
+ # DESTDIR is not respected, use INSTALL_PREFIX instead
+ make INSTALL_PREFIX="${pkgdir}/opt/freecalypso/" install
}