Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Meta generation tool for ebuilds
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
arran4
n00b
n00b


Joined: 19 Sep 2003
Posts: 13
Location: Melbourne, Australia

PostPosted: Thu Aug 15, 2024 6:49 am    Post subject: Meta generation tool for ebuilds Reply with quote

Not sure if this is the right place to put it. But while job seeing and mostly sleep deprived I ended up writing
https://github.com/arran4/arrans_overlay_workflow_builder

Don't worry this does NOT use AI. :P

Background:

I was writing GitHub Actions to detect new versions of AppImages on various GitHub repositories. However I kept on making mistakes when writing the scripts, for trivial things. Typos, not changing the correct detail etc.

So I started writing a tool which would take a configuration like this:
Code:

Type Github AppImage Release
GithubProjectUrl https://github.com/anyproto/anytype-ts
Category app-text
EbuildName anytype-ts-appimage
Description Official Anytype client for MacOS, Linux, and Windows
Workaround Semantic Version Prerelease Hack 1
Homepage https://anytype.io
License Other
ProgramName Anytype
DesktopFile anytype.desktop
Icons hicolor-apps root
Dependencies sys-libs/glibc sys-libs/zlib
Binary amd64=>Anytype-${VERSION}.AppImage > Anytype.AppImage


And output the script workflow:
https://github.com/arran4/arrans_overlay/blob/main/.github/workflows/app-text-anytype-ts-appimage-update.yaml

Which then outputs the ebuilds:
https://github.com/arran4/arrans_overlay/tree/main/app-text/anytype-ts-appimage

(I need to figure out clean up logic too it's getting a bit long...)

Having achieved that, I ended up going a step further, and writing a tool that given the url:
https://github.com/anyproto/anytype-ts

Would produce the configuration above.

I then did the same but for any ordinary executable, but mostly in for cases which match a goreleaser project, such as:

  • The project is released on github releases
  • The project uses semantic versioning
  • The project has an elf executable


Which generates the config:
Code:

Type Github Binary Release
GithubProjectUrl https://github.com/gohugoio/hugo
EbuildName hugo-bin
Category www-apps
Description The world’s fastest framework for building websites.
Homepage https://gohugo.io
License Apache License 2.0
Workaround Programs as Alternatives => amd64:extended arm64:extended
Binary amd64=>hugo_${VERSION}_linux-amd64.tar.gz > hugo > hugo
Binary arm=>hugo_${VERSION}_linux-arm.tar.gz > hugo > hugo
Binary arm64=>hugo_${VERSION}_linux-arm64.tar.gz > hugo > hugo
ProgramName extended
Dependencies sys-libs/glibc sys-devel/gcc sys-libs/glibc sys-devel/gcc sys-libs/glibc sys-devel/gcc
Binary amd64=>hugo_extended_${VERSION}_Linux-64bit.tar.gz > hugo > hugo
Binary arm64=>hugo_extended_${VERSION}_linux-arm64.tar.gz > hugo > hugo


Which was a fair bit harder. It also has very basic support for documents, manual pages, and shell completion.

This NOT intended for main use, rather just my own use. But feel free to use, and modify it as you see fit. -- At your own risk it has issues and limitations.

The goal was to take it to the point I needed it and no further. I am not sure I will do too much more active development on it, and I hopefully will have a job soon.

But interested in what people think, and if it's useful to anyone else?[/list]
Back to top
View user's profile Send private message
arran4
n00b
n00b


Joined: 19 Sep 2003
Posts: 13
Location: Melbourne, Australia

PostPosted: Mon Sep 16, 2024 12:14 pm    Post subject: Reply with quote

Fixed some issues, getting much better sleep now. -- Meaning I want to fix the thing. -_-
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum