You are not logged in.
Hi,
I want to create a PKGBUILD for a program distributed as a .tar.gz source archive, except that it's really a .tar archive.
Thus, makepkg fails because it uses the wrong tar option.
Now I'm wondering what the best way is to deal with this situation. I just tried placing a "mv foo.tar.gz foo.tar" line before the build() function, but that didn't get executed. Inside build() would be too late, because makepkg runs it after extracting.
I'm not looking for a solution on how to install it -- I can just manually download and rename the file, then edit the PKGBUILD accordingly. But the PKGBUILD resp. makepkg should cope with that, not the user by manually downloading/renaming things. So I'm looking for a way how to do that from inside that file.
Guess I should do a feature request: makepkg should detect the archive file correctly (e.g. using "file"), not just by looking at the extension which could be wrong.
Offline
Does makepkg actually prompt an error and abort? (I assume that it does not since it is possible to download RPMs and other file formats.)
If not, you could just untar the file with the appropriate command as the first line in the build() function, and then proceed with the regular build routine.
Offline
Best solution in the long term is, of course, to ask the developers to correct their mistake.
In the meantime, although it's not ideal, there is no problem with running tar xf inside the build() function.
Offline
Best solution in the long term is, of course, to ask the developers to correct their mistake.
In the meantime, although it's not ideal, there is no problem with running tar xf inside the build() function.
the problem is, he can't. Makepkg barfs when it cant untarball it.
In the meantime, download the source, and untar it in the build() function.
Also file a bug, maybe makepkg should use some 'file' (man file) magic to determine what it is.
James
Offline
It should be pretty easy with file -biz. That'll print out the mime type and try to uncompress it which means we can tell the difference between compressed tars or just compressed (like .tar.gz and .gz). It'll also not prepend the filename too its output, making it easier to parse.
Offline
y not download the package urself...
remove it from source and in the build()
wget it or something. then u can do whatever u want with it.
The.Revolution.Is.Coming - - To fight, To hunger, To Resist!
Offline
y not download the package urself...
remove it from source and in the build()
wget it or something. then u can do whatever u want with it.
Well, if you read his post that is exactly what he wants to avoid. The whole idea of PKGBUILDs is that they are universal and can be distributed to other users (e.g. via AUR). This is defeated by the need to manually complete certain tasks.
Offline
i know,
i meant in the official pkgbuild .. yes it's hackish but, ...
The.Revolution.Is.Coming - - To fight, To hunger, To Resist!
Offline
yankees26 made a patch: http://www.archlinux.org/pipermail/pacm … 01048.html
Offline