I’ve got a binary package: AUR (en) - poi-nightly-bin
I download the released prebuild zip
and install it into system. However, if the zip
archive already resides inside the package directory, makepkg
doesn’t try to download the new one, and fails on checksums, since PKGBUILD has sums for a new version of package.
So the question is: how to force re-downloading the build assets on package update? Removing the assets after build inside package()
function with rm "$_pkgname-$_releasever.7z"
somehow doesn’t remove the used or outdated assets either.
makepkg -h
makepkg -Cc
makepkg --cleanbuild --clean
No, that’s not what I mean. I know I can cleanup cache before installing package with several commands, but can this be achieved by configuring PKGBUILD?
Sure, but not advisable… just remove it manually or use /temp (as tmpfs) for building…
1 Like
You can choose custom names for downloaded files:
# Maintainer: gigas002 <gigas002@pm.me>
pkgname=poi-nightly-bin
_pkgname=poi
_releasever=10.8.0
_buildver=7917
pkgver="${_releasever}.${_buildver}"
pkgrel=1
pkgdesc="Scalable KanColle browser and tool"
arch=('x86_64')
url="https://github.com/poooi/poi/"
license=('MIT')
provides=("poi")
depends=('nss' 'gtk3')
conflicts=('poi')
options=(!strip)
source=("${_pkgname}-${pkgver}.7z::https://nightly.poi.moe/$_buildver/${_pkgname}-${_releasever}.7z"
"https://raw.githubusercontent.com/poooi/poi/master/assets/icons/icon.png"
"poi.desktop"
"poi.sh")
noextract=("${_pkgname}-${pkgver}.7z")
sha256sums=('c9d67ba458b8e147dd149c1114eaa5c5d4f7315a4caf629acc2add07e1b5221d'
'7f58b9f7918da59bf8003f9d2345eb0f0700b7cfcb3c07ef17a171e3f08fe3f8'
'56280a62f7baf889253830353748f6ddd8d3c5924c5faaaffa863ada2d7e2e58'
'b08d1eb63de3af0c67860fd8bfd709d492ac600eef9c0cd52e2ee65e5ab69194')
package() {
mkdir -p "${pkgdir}/opt/${_pkgname}/"
bsdtar -xf "${_pkgname}-${pkgver}.7z" -C "${pkgdir}/opt/${_pkgname}/"
chmod 4755 "${pkgdir}/opt/${_pkgname}/chrome-sandbox"
install -Dm755 "${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"
# Install pixmap and desktop files
install -Dm644 icon.png "${pkgdir}/usr/share/pixmaps/poi_icon.png"
install -Dm644 -t "${pkgdir}/usr/share/applications" poi.desktop
}
1 Like
Nice solution, I’ll take this!
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.