diff options
author | Vadim Yanitskiy | 2023-09-01 02:44:40 +0700 |
---|---|---|
committer | Vadim Yanitskiy | 2023-09-01 03:22:15 +0700 |
commit | 79809fdfe9f398649ef0cc68522292ec5b96a773 (patch) | |
tree | 10f906e66fa8f1bd744c4c8dbafe2161ab16b20b | |
parent | bd66009d88cd5ba902e12bf7176233eb1b3f9dc5 (diff) | |
download | aur-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-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 13 |
2 files changed, 6 insertions, 9 deletions
@@ -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 @@ -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 } |