You are not logged in.
I found a neat app called rmconverter, for which I built this PKGBUILD. Can you please verify it before I submit to AUR?
# Contributor: Inxsible <inxsible at gmail dot com>
pkgname=rmconverter
pkgver=3.0
pkgrel=1
pkgdesc="A gui for the mencoder and lame packages to generate wav and mp3 formats from real media files (ra, rm, and ram)"
arch=('i686' 'x86_64')
url="https://launchpad.net/rmconverter"
license=('GPL')
depends=('mplayer' 'lame' 'codecs' 'java-runtime')
source=(http://launchpad.net/rmconverter/3.0/3.0/+download/rmconverter_$pkgver.orig.tar.gz
$pkgname
$pkgname.jar
log4j.jar
$pkgname.desktop
$pkgname.png
$pkgname.1)
noextract=('$pkgname.jar')
md5sums=('83a7b1fa6aaf6eb839a8fda11b3aab71'
'8fc54038a988ecb61c25444ff188b66e'
'95830b503eb5ec2e415a44a524bb2746'
'66cb4293318f463dddf2a59bdd4a89ba'
'bf1f3173f45f0310b49e5c6a3a2c3068'
'b8c0ebd3597cf75659509814098549e2'
'eaae27b753c7e07b99475d5fa8dbc601')
build() {
cd $srcdir
mkdir -p $pkgdir/usr/{bin,share/{applications,pixmaps,java/$pkgname}}
install -m 755 $pkgname $pkgdir/usr/bin/
install -m 755 $pkgname.jar $pkgdir/usr/share/java/$pkgname/
install -m 755 $srcdir/log4j.jar $pkgdir/usr/share/java/$pkgname/
install -m 644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/
install -m 644 $srcdir/$pkgname.1 $pkgdir/usr/share/man/man1/$pkgname.1
install -m 644 $srcdir/$pkgname.png $pkgdir/usr/share/pixmaps/
}
I was able to build the package, so it worked for me. Can someone with a 64 bit arch machine check it as well? Also, if I put in "$pkgname_$pkgver.orig.tar.gz" in the source array, it fails to replace the package name, but it still replaces the $pkgver. Why would this be? Because of it, I have to explicitly mention the name of the app in the source array.
Last edited by Inxsible (2009-02-24 06:46:44)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
The reason the "$pkgname_$pkgver.orig.tar.gz" doesn't work is that bash is looking for a variable named "pkgname_". Change that to "${pkgname}_$pkgver.orig.tar.gz" and it will work. The second variable is ok because variable names can't contain ".".
The PKGBUILD doesn't work because it needs the other local sources specified in the source array ($pkgname, $pkgname.jar, $pkgname.desktop, $pkgname.png, $pkgname.1). Without those, it's not possible to test the PKGBUILD.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Thanks for the reply Xyne. Here's the updated PKGBUILD. I reverted back to using the src folders to get the requisite files. However, 2 files, rmconverter and rmconverter.jar are files that I created locally. the jar file was not included in the source that I downloaded from the author's webpage. I did that, because one shouldn't need to have jdk installed to use a jar file. A simple java-runtime provided by jre or openjdk should suffice.
So how would I send that jar file over for you to test? Forgive me for the newb question. I am jsut getting my feet wet in the PKGBUILDS
# Contributor: Inxsible <inxsible at gmail dot com>
pkgname=rmconverter
pkgver=3.0
pkgrel=1
pkgdesc="A gui for the mencoder and lame packages to generate wav and mp3 formats from real media files (ra, rm, and ram)"
arch=('i686' 'x86_64')
url="https://launchpad.net/rmconverter"
license=('GPL')
depends=('mplayer' 'lame' 'codecs' 'java-runtime')
source=(http://launchpad.net/rmconverter/3.0/3.0/+download/${pkgname}_$pkgver.orig.tar.gz
$pkgname.rc
$pkgname.jar)
noextract=('$pkgname.jar')
md5sums=('83a7b1fa6aaf6eb839a8fda11b3aab71'
'05795bea5e8bd297443671b21b23b43c'
'95830b503eb5ec2e415a44a524bb2746')
build() {
cd $srcdir
mkdir -p $pkgdir/usr/{bin,share/{applications,pixmaps,java/$pkgname}}
install -m 755 $pkgname.rc $pkgdir/usr/bin/$pkgname
install -m 755 $pkgname.jar $pkgdir/usr/share/java/$pkgname/
install -m 755 $srcdir/lib/log4j.jar $pkgdir/usr/share/java/$pkgname/
install -m 644 $srcdir/share/applications/$pkgname.desktop $pkgdir/usr/share/applications/
install -m 644 $srcdir/share/man/man.1/$pkgname.1 $pkgdir/usr/share/man/man1/
install -m 644 $srcdir/share/pixmaps/rmc.png $pkgdir/usr/share/pixmaps/$pkgname.png
}
Last edited by Inxsible (2009-02-24 08:00:56)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
You could use "install -D" to install directories. I guess it works with your bash expansion...
Offline
I just realized that a jar file is also a binary file. So since we cannot have binary files in AUR, how would I submit this package, given that the author hasn't included a jar file in his source bundle and I created the jar file using/modifying his ant build file?
Thanks for you replies so far.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
You could tarball the local source files and upload them to http://www.mediafire.com/
Post the download link in this thread so others can test it.
Where does it say that we can't have binary files in the AUR? I would have thought the only issue would be size... how big is that jar file?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Here are the 2 local sources file. simply placing them in the src dir should do it.
http://www.mediafire.com/?sharekey=29d4 … f6e8ebb871
I can't seem to find the page that I read it on. Maybe it only meant arch "binaries" and not others. The size of the jar file that I have created from source is about 470KB
Last edited by Inxsible (2009-02-24 14:58:32)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Where does it say that we can't have binary files in the AUR? I would have thought the only issue would be size... how big is that jar file?
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Xyne wrote:Where does it say that we can't have binary files in the AUR? I would have thought the only issue would be size... how big is that jar file?
Thank you !!
I knew I had read it somewhere. But again, does it mean any & all binaries or just Arch pkg binaries?
Last edited by Inxsible (2009-02-24 18:25:46)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
I just realized that a jar file is also a binary file. So since we cannot have binary files in AUR, how would I submit this package, given that the author hasn't included a jar file in his source bundle and I created the jar file using/modifying his ant build file?
Thanks for you replies so far.
This does not sound right at all. You should only use what the author provides in the source. I guess that is rmconverter_$pkgver.orig.tar.gz
If you want to create jar from that, why not do it in the PKGBUILD then?
What does your PKGBUILD do with rmconverter_$pkgver.orig.tar.gz currently?
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
This does not sound right at all. You should only use what the author provides in the source. I guess that is rmconverter_$pkgver.orig.tar.gz
If you want to create jar from that, why not do it in the PKGBUILD then?
What does your PKGBUILD do with rmconverter_$pkgver.orig.tar.gz currently?
I just extract a few files from the source like the.dekstop file, .png file and such.
Again, since the jar file is not included, anyone trying to install will require the entire jdk and/or apache-ant, if I compile and build the jar file in the PKGBUILD -- which seems excessive, just to use a java based app.
Last edited by Inxsible (2009-02-24 18:58:02)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
shining wrote:This does not sound right at all. You should only use what the author provides in the source. I guess that is rmconverter_$pkgver.orig.tar.gz
If you want to create jar from that, why not do it in the PKGBUILD then?
What does your PKGBUILD do with rmconverter_$pkgver.orig.tar.gz currently?I just extract a few files from the source like the.dekstop file, .png file and such.
Again, since the jar file is not included, anyone trying to install will require the entire jdk and/or apache-ant, if I compile and build the jar file in the PKGBUILD -- which seems excessive, just to use a java based app.
I think it is fine to use the upstream jar file when one is provided. But when it is not, you have to build yourself. However this is probably nearly the case. It is not the case of rmconverter. I am not sure why you expected the jar files be with the source. There are in a separate binary tarball.
http://www.dudesblog.net/wwwdudesblogne … loads.html
http://www.dudesblog.net/wwwdudesblogne … &fileid=13
I guess you will have to use the source filename feature of makepkg to use that url
There is also a run bash script that you might want to re-use. If the paths are wrong, you can edit them from the build() function with sed. Well it is also fine to provide the script separately, in this case better use the .sh extension to make clear it is a sh script.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
I had checked those links, but I was unsure how to use them to get the sources, since they don't point directly to the tar or zip file. Also I was using the launchpad link where the author had placed his source. Like I mentioned, I am just getting my feet wet here.
I guess I will re-visit the PKGBUILD and use the binary tar-ball to build the app.
Thanks.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
I had checked those links, but I was unsure how to use them to get the sources, since they don't point directly to the tar or zip file. Also I was using the launchpad link where the author had placed his source. Like I mentioned, I am just getting my feet wet here.
I guess I will re-visit the PKGBUILD and use the binary tar-ball to build the app.
You should be able to use that url directly, the problem is that you will get a weird filename.
It is possible to specify a good filename like rmc-3.0_binary.tar.gz in the source array, see man PKGBUILD
http://www.archlinux.org/pacman/PKGBUILD.5.html
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
I tried using the dudesblognet link, but unfortunately it uses an ampersand (&) and makepkg bombs on it. I even tried & with the same results.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
I tried using the dudesblognet link, but unfortunately it uses an ampersand (&) and makepkg bombs on it. I even tried & with the same results.
Use quotes.
Offline
Thank you all for your replies. Quite a learning experience. Here's the latest PKGBUILD
# Contributor: Inxsible <inxsible at gmail dot com>
pkgname=rmconverter
pkgver=3.0
pkgrel=1
pkgdesc="A gui for the mencoder and lame packages to generate wav and mp3 formats from real media files (ra, rm, and ram)"
arch=('i686' 'x86_64')
url="https://launchpad.net/rmconverter"
license=('GPL')
depends=('mplayer' 'lame' 'codecs' 'java-runtime')
source=('rmconverter.tar.gz::http://www.dudesblog.net/wwwdudesblognet/software/downloads.html?func=download&fileid=13')
md5sums=('de32b2917221e0fd29ad87c6391123a6')
build() {
tar xzf rmconverter.tar.gz
cd $srcdir/rmc-3.0
install -D $pkgname.sh $pkgdir/usr/bin/$pkgname.sh
install -D $pkgname.jar $pkgdir/usr/share/java/$pkgname/$pkgname.jar
install -D ./lib/log4j.jar $pkgdir/usr/share/java/$pkgname/log4j.jar
}
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
I think it is fine to use the upstream jar file when one is provided. But when it is not, you have to build yourself. However this is probably nearly the case. It is not the case of rmconverter. I am not sure why you expected the jar files be with the source. There are in a separate binary tarball.
http://www.dudesblog.net/wwwdudesblogne … loads.html
http://www.dudesblog.net/wwwdudesblogne … &fileid=13
I guess you will have to use the source filename feature of makepkg to use that url
There is also a run bash script that you might want to re-use. If the paths are wrong, you can edit them from the build() function with sed. Well it is also fine to provide the script separately, in this case better use the .sh extension to make clear it is a sh script.
Sorry, there is a lot of misinformation above.
With this specific url, there is actually no problem, because a redirection happens, and result in a sane filename.
> LANG=C wget 'http://www.dudesblog.net/wwwdudesblognet/software/downloads.html?func=download&fileid=13'
--2009-02-25 14:13:08-- http://www.dudesblog.net/wwwdudesblognet/software/downloads.html?func=download&fileid=13
Resolving www.dudesblog.net... 74.220.215.68
Connecting to www.dudesblog.net|74.220.215.68|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://www.dudesblog.net/wwwdudesblognet/downloads/Real Media Converter/version_3/rmc-3.0_binary.tar.gz [following]
--2009-02-25 14:13:11-- http://www.dudesblog.net/wwwdudesblognet/downloads/Real%20Media%20Converter/version_3/rmc-3.0_binary.tar.gz
Maybe it is better to use that second url in the PKGBUILD, so that we know the downloaded file will be rmc-3.0_binary.tar.gz
Secondly, I thought it could be a good idea to re-use the sh script, after editing the paths to jre/openjdk for archlinux (it doesn't work out of the box on arch). But finally it doesn't make any sense for arch to use this script. We can just call "java". And there is also a need to change the current directory, and the provided script does not even do it.
I also read http://wiki.archlinux.org/index.php/Jav … Guidelines, and it also recommends to write your own launcher script from scratch.
Following all the guidelines I could, I came up with the following launcher and pkgbuild.
rmconverter.sh
#!/bin/sh
CP=/usr/share/java/rmconverter/rmconverter.jar
CP=$CP:/usr/share/java/rmconverter/log4j.jar
cd /usr/share/rmconverter/
java -cp $CP net.dudesblog.rmc.start.Launcher
PKGBUILD
# Contributor: Inxsible <inxsible at gmail dot com>
pkgname=rmconverter
pkgver=3.0
pkgrel=1
pkgdesc="A gui for mencoder and lame to generate wav and mp3 from real media (ra, rm, and ram)"
arch=('i686' 'x86_64')
url="https://launchpad.net/rmconverter"
license=('GPL')
depends=('mplayer' 'lame' 'codecs' 'java-runtime')
source=('http://www.dudesblog.net/wwwdudesblognet/downloads/Real%20Media%20Converter/version_3/rmc-3.0_binary.tar.gz'
"$pkgname.sh")
md5sums=('de32b2917221e0fd29ad87c6391123a6'
'23f7fcc7b3b9aa7d60f655cd0a994aa1')
build() {
cd $srcdir/rmc-3.0
install -d $pkgdir/usr/share/{java/,}$pkgname
install -m644 $pkgname.jar lib/log4j.jar $pkgdir/usr/share/java/$pkgname
cp -r bin doc $pkgdir/usr/share/$pkgname
install -m644 log4j.properties readme.txt $pkgdir/usr/share/$pkgname
install -D -m755 ../$pkgname.sh $pkgdir/usr/bin/$pkgname
}
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Thank you all for your replies. Quite a learning experience. Here's the latest PKGBUILD
# Contributor: Inxsible <inxsible at gmail dot com> pkgname=rmconverter pkgver=3.0 pkgrel=1 pkgdesc="A gui for the mencoder and lame packages to generate wav and mp3 formats from real media files (ra, rm, and ram)" arch=('i686' 'x86_64') url="https://launchpad.net/rmconverter" license=('GPL') depends=('mplayer' 'lame' 'codecs' 'java-runtime') source=('rmconverter.tar.gz::http://www.dudesblog.net/wwwdudesblognet/software/downloads.html?func=download&fileid=13') (2) md5sums=('de32b2917221e0fd29ad87c6391123a6') build() { tar xzf rmconverter.tar.gz (1) cd $srcdir/rmc-3.0 install -D $pkgname.sh $pkgdir/usr/bin/$pkgname.sh (3) install -D $pkgname.jar $pkgdir/usr/share/java/$pkgname/$pkgname.jar install -D ./lib/log4j.jar $pkgdir/usr/share/java/$pkgname/log4j.jar (4) }
1) You shouldn't need to run tar manually, it should be done automatically. Also just FYI, makepkg itself uses bsdtar and not gnu tar.
2) Your usage of source filename is perfectly correct, but as I just found out, it is not needed in this specific case. Sorry
3) The launcher script does not work out of the box, but I just noticed the provided launcher is stupid and useless. Better rewrite it from scratch. Also I believe it is good to use $pkgname.sh in the source, but it should be installed as $pkgname only.
4) ./lib/.. is useless, you can just do lib/.. :)
Anyway just have the look at my PKGBUILD in the previous post.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
I don't know if that's important, but note that your version on AUR does not follow the following java package guideline :
http://wiki.archlinux.org/index.php/Jav … _Packaging
Place all jar files (and no other files) distributed with the program in a /usr/share/java/myprogram directory.
and http://wiki.archlinux.org/index.php/Jav … _Structure
But well, I suppose it works correctly now at least, so that's the most important
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
You are right. We should adhere to standards wherever possible. I have made the changes that you suggested..
Thanks again for all your help shining.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
1) You should always test your pkgbuild before submitting
The new one has an error in the launcher because the path wasn't updated :
< CP=$CP:/usr/share/java/rmconverter/lib/log4j.jar
---
> CP=$CP:/usr/share/java/rmconverter/log4j.jar
2) You should always bump the pkgrel when submitting a new pkgbuild, to make a distinction between the versions
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
1) You should always test your pkgbuild before submitting
The new one has an error in the launcher because the path wasn't updated :
< CP=$CP:/usr/share/java/rmconverter/lib/log4j.jar
---
> CP=$CP:/usr/share/java/rmconverter/log4j.jar2) You should always bump the pkgrel when submitting a new pkgbuild, to make a distinction between the versions
I fixed 1, But I let the pkgrel remain the same for now. I will update it if I submit a new one from now on.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline