You are not logged in.
The company I currently work with is switching from Loom for screen recording to Cap (https://cap.so). Thankfully, it supports Linux, but only provides .deb package.
When I downloaded it from the website, the button shows https://cap.so/download/linux-deb. But after the download starts, and I copy the download link from Firefox download history, then it shows like this:
https://cdn.crabnebula.app/asset/01M2JEFM7ZZKVZT9YPEKWWFPD7?from=%7B%22orgSlug%22%3A%22cap%22%2C%22appSlug%22%3A%22cap%22%2C%22publicPlatform%22%3A%22deb-x86_64%22%7DThe file name it suggests by default is "Cap_0.6.0_amd64.deb".
So my question is: how should I craft that URL into the url field of the PKGBUILD so that when I run makepkg, the download works correctly?
Let me know if any further information is required or would help.
There is a difference between knowing the path and walking the path.
Offline
Are you talking about automatically renaming a downloaded source file?
It is also possible to change the name of the downloaded file, which is helpful with weird URLs and for handling multiple source files with the same name. The syntax is: source=('filename::url').
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
No, I mean that I am not sure what I should put in the "url" and the "source" fields of the PKGBUILD.
There is a difference between knowing the path and walking the path.
Offline
nothing, because there's a arch pkg already provided: https://cap.so/download/versions
https://cap.so/download/linux-pacman
Last edited by cryptearth (Today 05:10:22)
Offline
nothing, because there's a arch pkg already provided: https://cap.so/download/versions
https://cap.so/download/linux-pacman
That is awesome, thank you!
As a learning opportunity, I'd still like to understand what I should do regarding "url" and "source" for this case.
There is a difference between knowing the path and walking the path.
Offline
depends on versioning
packages should have a fixed version - so it should use a fixed url
i also checked thier github but it, too, only contains auto "latest" links which are resolved from the server with a 302 redirect - these are not suitable for a versioned package
here the original dev has to come forward to provide fixed version direct links
i won't rely on the backend cdn links as these are usually auto generated and subject to change
if cap.so only provides one version via a "latest" link it's up to them - nothin a user should try to interfere with
another COULD be: as they provide a public repo one could try to figure out how they built thier package specific to arch and could try to replicate this - but this could also lead to conflicts (naming, licence) - in this very case i would request cap.so to maybe provide an aur -bin package themself - if they deny then you should accept it (although it wouldn't do the community a favor to not utilize existing packaging and version control infrastructure)
Offline
With curl
URL=$(curl -s -I -w "%header{location}\n" -o /dev/null https://cap.so/download/linux-deb)Python
from urllib.request import Request, urlopen
url = "https://cap.so/download/linux-deb"
headers = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:156.0) Gecko/20100101 Firefox/156.0"
}
request = Request(url, method="HEAD", headers=headers)
url = urlopen(request).urlPython with requests
import requests
url = requests.head("https://cap.so/download/linux-deb").headers.get("location")Offline