Page 1 of 2

Sourceforge report generator

Posted: 2. Oct 2009, 21:01
by Shador
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.

Re: Sourceforge report generator

Posted: 3. Oct 2009, 01:20
by maximus
Very nice! Thanks :)

Re: Sourceforge report generator

Posted: 3. Oct 2009, 07:27
by gapan
Cool! It will help a lot of people! Thanks! :)

Re: Sourceforge report generator

Posted: 3. Oct 2009, 12:03
by laprjns
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

Re: Sourceforge report generator

Posted: 3. Oct 2009, 23:29
by gapan
Stickied ;)

Re: Sourceforge report generator

Posted: 2. Jan 2010, 17:09
by damNageHack
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-)

Re: Sourceforge report generator

Posted: 2. Jan 2010, 17:16
by gapan
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. ;)

Re: Sourceforge report generator

Posted: 7. Apr 2010, 00:40
by laprjns
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.

Re: Sourceforge report generator

Posted: 7. Apr 2010, 07:54
by JRD
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

Re: Sourceforge report generator

Posted: 10. Apr 2010, 09:49
by laprjns
Yep, that worked. Thanks
Rich