Sourceforge report generator

General talk about packaging procedures and packages.
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Sourceforge report generator

Post by Shador » 2. Oct 2009, 21:01

Have you ever been annoyed by the repeated composition of the sourceforge reports for package additions/updates? Did you notice that it's the same information you enter in your SLKBUILD? :?
This script arose as a solution for me and it could also be yours:
http://gaia.homelinux.org/salix/slkbuil ... ld-postgen (MD5: http://gaia.homelinux.org/salix/slkbuil ... ostgen.md5)

Just feed it with one or multiple SLKBUILDs, wether to add conflicts or suggests files, and it generates one post for you.

The default behaviour is to use .txz as extension and to add both the link to the src file and if the src file exists in the directory of the SLKBUILD its content too.
This can be changed at the beginning of the source by:
  • changing EXT to another one
  • leaving SRCS empty to remove the content of the src file
  • leaving SRC empty to remove the link to the src file
Apart from that if the src file is not locally accesible the link to it will be added.
A bit complicated, I know. ;)

Everything apart from that is explained (including an example) in the usage of the script.

Have fun and tell me if you find it as useful as I do. 8-)

Updates:

Updated to version 1.2.2. Some other small fixes.
Updated to version 1.2.1. Invalid SLKBUILDs or non-SLKBUILD are now skipped instead of producing garbled output. Some minor changes apart and md5sums for the download files.
Updated to version 1.2. The script now can handle SLKBUILDs with no arch variable included. This is achieved by implementing 2 guess methods (others could be added) and optionally allowing to pass one or multiple archs for a SLKBUILD by argument. For further information consult the '--help' output.
Last edited by Shador on 30. Apr 2010, 21:02, edited 3 times in total.
Image

User avatar
maximus
Posts: 141
Joined: 2. Sep 2009, 01:41

Re: Sourceforge report generator

Post by maximus » 3. Oct 2009, 01:20

Very nice! Thanks :)

User avatar
gapan
Salix Wizard
Posts: 5359
Joined: 6. Jun 2009, 17:40

Re: Sourceforge report generator

Post by gapan » 3. Oct 2009, 07:27

Cool! It will help a lot of people! Thanks! :)
Image
Image

User avatar
laprjns
Salix Warrior
Posts: 1027
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Sourceforge report generator

Post by laprjns » 3. Oct 2009, 12:03

Shador wrote:Have you ever been annoyed by the repeated composition of the sourceforge reports for package additions/updates?
Yes!!
Shador wrote: Did you notice that it's the same information you enter in your SLKBUILD? :?
Yes!!
Shador wrote: This script arose as a solution for me and it could also be yours:
http://gaia.homelinux.org/salix/slkbuild-postgen
Just feed it with one or multiple SLKBUILDs, wether to add conflicts or suggests files, and it generates one post for you.
Brilliant!! (and I haven't even tried it yet :) )
gapan wrote:Cool! It will help a lot of people! Thanks! :)
It's definitely is going to help. me. I currently keep a template in a text file that I just copy and past too. Always wondered how you guys who know what your doing did this. I certainly didn't think that you copied and pasted like I do.
Rich

User avatar
gapan
Salix Wizard
Posts: 5359
Joined: 6. Jun 2009, 17:40

Re: Sourceforge report generator

Post by gapan » 3. Oct 2009, 23:29

Stickied ;)
Image
Image

User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: Sourceforge report generator

Post by damNageHack » 2. Jan 2010, 17:09

Shador,
thanks for your script.
Could you please provide your script as a package itself for inclusion in the repos? Would be much more nicer again than just the nice script.
My dream is to get all my needs satisfied by only using gslapt. I am very lazy, sorry. 8-)
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.

User avatar
gapan
Salix Wizard
Posts: 5359
Joined: 6. Jun 2009, 17:40

Re: Sourceforge report generator

Post by gapan » 2. Jan 2010, 17:16

No need to in my opinion. Just a link in the submission page from the wiki should be enough to get all the coverage it needs. And it's already sticky here. ;)
Image
Image

User avatar
laprjns
Salix Warrior
Posts: 1027
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Sourceforge report generator

Post by laprjns » 7. Apr 2010, 00:40

With SLKBUILD no longer requiring an ARCH declaration, this script can no longer produce the correct source path. :(

I know where the fix needs to be made

Code: Select all

parse() {
	eval $(grep -xEe '[\ \t]*(pkgname|pkgver|pkgrel|arch|sourcetemplate|url)=.*' "$1" | tr '\n' ';')
	pkg=$pkgname-$pkgver-$arch-$pkgrel
I just don't know how to do it.

User avatar
JRD
Salix Warrior
Posts: 949
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Sourceforge report generator

Post by JRD » 7. Apr 2010, 07:54

You need to change it to this :

Code: Select all

parse() {
  eval $(grep -xEe '[\ \t]*(pkgname|pkgver|pkgrel|arch|sourcetemplate|url)=.*' "$1" | tr '\n' ';')
  if [ -z "$arch" ]; then
    case "$(uname -m)" in
      i?86) export arch=i486 ;;
      arm*) export arch=arm ;;
      *) export arch=$( uname -m ) ;;
    esac
    echo "Automatically setting arch to $arch"
  fi
  pkg=$pkgname-$pkgver-$arch-$pkgrel
Image

User avatar
laprjns
Salix Warrior
Posts: 1027
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Sourceforge report generator

Post by laprjns » 10. Apr 2010, 09:49

Yep, that worked. Thanks
Rich

Post Reply