Package Details: astro 0.25.1-1

Git Clone URL: https://aur.archlinux.org/astro.git (read-only, click to copy)
Package Base: astro
Description: A Gemini web browser using shell script
Upstream URL: https://github.com/blmayer/astro
Licenses: MIT
Submitter: guzzisti
Maintainer: guzzisti
Last Packager: guzzisti
Votes: 2
Popularity: 0.006979
First Submitted: 2021-12-24 09:54 (UTC)
Last Updated: 2023-12-20 18:48 (UTC)

Latest Comments

m040601 commented on 2023-09-01 22:09 (UTC) (edited on 2023-09-01 23:08 (UTC) by m040601)

best thing would be to have this handled upstream in the Makefile

You are confusing the Makefile of the original project with the AUR PKGBUILD recipes and procedures. That Makefile belongs to the original project. It has nothing to do with Archlinux.

How is the developer supposed to choose what to do there specifically for Archlinux ? Or Debian ? Or other Linux or BSD distro who might use different folders for different things ? What if Arch guidelines demand this but Debian demands that ?

You are not supposed to blindly follow the developers' Makefile. This applies to all the PKGBUILD's you maintain on AUR. A Makefile is a generic linux recipe.

The PKGBULD is the Archlinux recipe and you are the master cook that decides everything.

An AUR PKGBUILD isnt just simply typing "cd somewhere", "make xxxxx" and choosing some variables for the Makefile

You dont even have to use the "install" of "make install".

package() {
    mkdir -p "$pkgdir/usr/bin/" ( THIS IS OBSOLETE)
    cd "$srcdir/${pkgname}_src"
    make PREFIX="$pkgdir/usr" install
}

You can have the "build" and "package" steps separated, https://wiki.archlinux.org/title/Creating_packages#PKGBUILD_functions

build() {
    cd "$srcdir/xxxyyyzzz"
    make
}

package() {
    cd "$srcdir/xxxyyyzzzz"
    install -Dm755 xxxyyyzzz "$pkgdir/usr/bin/xxxyyyzzz"
    install this that doc, readme, Change log etc
}

You are supposed to think about what more is needed specifically for Archlinux according to the guidelines, https://wiki.archlinux.org/title/Arch_package_guidelines . Copy this or that file. Rename the binary from abc to xyz if needed because it clashes with something already on Archlinux. An extra patch this or that small patch file. Extra this or that message, etc...

I'll have a look 

Checkout this usefull page , https://wiki.archlinux.org/title/PKGBUILD#Generic

The release tar.gz alread ships with everything that is needed. You just have to cherry pick and choose what you need to do.

$ tar tvf astro-0.22.3.tar.gz

...
-rw-rw-r-- root/root       722 2023-08-15 20:27 astro-0.22.3/CONTRIBUTING.md
-rw-rw-r-- root/root      1068 2023-08-15 20:27 astro-0.22.3/LICENSE
-rw-rw-r-- root/root        87 2023-08-15 20:27 astro-0.22.3/Makefile
-rw-rw-r-- root/root      3066 2023-08-15 20:27 astro-0.22.3/README.md
...
-rw-rw-r-- root/root        90 2023-08-15 20:27 astro-0.22.3/less.keys
...
... etc

As you will find out, for simple things like just copying files, the simple "install" command does the job. It is just like "cp".

For example,

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install xxx yyy readme
  install example.md this that ...
  etc

guzzisti commented on 2023-08-23 15:35 (UTC)

I'll have a look - best thing would be to have this handled upstream in the Makefile.

m040601 commented on 2023-08-23 00:44 (UTC)

Thanks for maintaining this PKGBUILD. Interesting simple tool for gemini.

The developer's Makefile only cares about installing the binary to "/usr/bin".

Could you also make sure that this PKGBUILD installs the README, eventually extra docs and the LICENSE ?

They should end up in something like

/usr/share/doc/astro/README
/usr/share/doc/astro/less.keys
/usr/share/licenses/astro/LICENSE

Thanks in advance.