You are not logged in.

#1 2015-04-29 14:26:01

HisDudeness
Member
From: Melzo, Milan (Italy)
Registered: 2014-09-29
Posts: 107

Build package from tarball

Hi everyone! I'm sorry if I missed some important and resolutive information anywhere, but a long search in the wiki, in the forum and on google led me to a dead end.

I'm trying to install a package which is nor in the repositories, neither in the AUR. Basically, I've downloaded a tarball and I'm trying to compile it.

The package is spacefm 1.0.0. I know it will be surely inserted in the repositories in little time, but the question isn't really about spacefm, it's about being able to build whichever unknown package nowhere to be found with Arch's traditional methods, or even just not using the repos or the AUR if I feel like it for no reason. Or to make a package to submit to the AUR out of a new tarball.

Question 1: will the classic

./configure
make
make install

do? Why is it not advisable, apart from package managers not keeping track of it?

Question 2: I was led to ABS. I installed it, I copied

/var/abs/community/spacefm/PKGBUILD

and modified it, changing the version number, the md5 and giving the link to download the tarball. But I don't know how to modify the install line. It keeps giving me this error:

install file (INSTALL) does not exist or is not a regular file.

What should I do?


The Dude minds.

Offline

#2 2015-04-29 14:32:24

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Build package from tarball

spacefm is in the community repo.

This long search in the wiki - what pages did you look at exactly? Building Arch packages is exhaustively documented.

Last edited by tomk (2015-04-29 14:34:06)

Offline

#3 2015-04-29 14:36:32

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: Build package from tarball

You can ususally get around the error you mentioned by doing an `autoreconf -i` in the prepare function.

Offline

#4 2015-04-29 14:39:42

HisDudeness
Member
From: Melzo, Milan (Italy)
Registered: 2014-09-29
Posts: 107

Re: Build package from tarball

tomk wrote:

spacefm is in the community repo.

This long search in the wiki - what pages did you look at exactly? Building Arch packages is exhaustively documented.

The package in the repo is outdated. It will surely get updated in little time, but however the question is generically about building any tarball this other way.

I've looked the ABS and the Creating Packages pages, primarily. But I'm not trying to build an Arch package, I'm trying to compile a source tarball. i.e., this

Last edited by HisDudeness (2015-04-29 14:42:35)


The Dude minds.

Offline

#5 2015-04-29 14:46:03

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: Build package from tarball

HisDudeness wrote:

But I'm not trying to build an Arch package, I'm trying to compile a source tarball.

And what, exactly, do you think an Arch package does?

Offline

#6 2015-04-29 14:48:46

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Build package from tarball

HisDudeness wrote:

I've looked the ABS and the Creating Packages pages, primarily. But I'm not trying to build an Arch package

Yes you are. Your first question is about not building an Arch package, but the second is about the ABS.

The install file specified in a PKGBUILD is a script for pacman to run after installation (it should also be in /var/abs/community/spacefm/). The INSTALL file in the (upstream) source tarball is (usually) a plain text file with installation instructions.

Offline

#7 2015-04-29 14:53:37

HisDudeness
Member
From: Melzo, Milan (Italy)
Registered: 2014-09-29
Posts: 107

Re: Build package from tarball

Scimmia wrote:
HisDudeness wrote:

But I'm not trying to build an Arch package, I'm trying to compile a source tarball.

And what, exactly, do you think an Arch package does?

My mistake, I'm still a little low on terminlogy, nd thought it meant "a package already covered either in the repos or in the AUR".

Anyway, I still couldn't get to understand what patch is. It seems to me that the article in the wiki already takes for granted the reader knows what a patch is for, and he/she's trying to apply an external one while building with ABS. So, I'm pretty much stuck at the prepare() function in my PKGBUILD, but the install line is before, so I stopped there when nothing I give in input seemed to work. Any clarifyng link you can send me about patches?


The Dude minds.

Offline

#8 2015-04-29 14:54:44

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Build package from tarball

Take a breath there, pause and read the available documentation properly.

Your thread title says you want to "Build package from tarball", but later you say "I'm not trying to build an Arch package" - which is it?

Last edited by tomk (2015-04-29 14:55:03)

Offline

#9 2015-04-29 14:59:47

HisDudeness
Member
From: Melzo, Milan (Italy)
Registered: 2014-09-29
Posts: 107

Re: Build package from tarball

tomk wrote:

Take a breath there, pause and read the available documentation properly.

Your thread title says you want to "Build package from tarball", but later you say "I'm not trying to build an Arch package" - which is it?

Ok, I'm getting I'm making one hell of a confusion here smile

Let's erase the ABS part, maybe I came to wrong conclusions.

Let's just say I have downloaded the tarball of a program from its developer site, and this program is nor in the repos, neither in the AUR. I'm wondering what I should do with that tarball to install the program in my sistem. Should I ./configure, make, make install?

Last edited by HisDudeness (2015-04-29 15:00:13)


The Dude minds.

Offline

#10 2015-04-29 15:06:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,599

Re: Build package from tarball

You can, but it's not recommended. As long as everything goes to /usr/local, you should be fine, but if it installs things to other locations in /usr, you really should be using the package manager. If you don't, you can run into all kinds of problems with untracked files.

Offline

#11 2015-04-29 16:01:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Build package from tarball

Offline

#12 2015-04-30 07:45:57

HisDudeness
Member
From: Melzo, Milan (Italy)
Registered: 2014-09-29
Posts: 107

Re: Build package from tarball

I think that's out of date as well.

So, if I wanted to create an Arch package out of it, I guess I should create a PKGBUILD and then use makepkg. I'll read the PKGBUILD page in the wiki through and if there's something I won't understand, I'll ask here.

Thanks for the patience!


The Dude minds.

Offline

#13 2015-04-30 07:58:57

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: Build package from tarball

A git package can't be out of date by definition. Oversimplification*: authors push their changes to a version control system (Git in this case), and take a "snapshot" from time to time while adding a certain version number. Hence, it's 1.0.0 that's "out of date".

*with spacefm, there's for example a master and next branch which are periodically synced.

Last edited by Alad (2015-04-30 08:01:34)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#14 2015-04-30 08:46:22

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Build package from tarball

You don't even need to create a PKGBUILD, you already got it from ABS. Just update it to use the current 1.0.0 release.

Offline

#15 2015-04-30 10:08:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,561
Website

Re: Build package from tarball

tomk wrote:

You don't even need to create a PKGBUILD, you already got it from ABS. Just update it to use the current 1.0.0 release.

And you'll need the install file from the ABS as well as is indicated in the first post.  When you sync the ABS tree you get more than PKGBUILDs, so the first command (followed by a build attempt) would lead to failure in many cases, but the second should work:

cp /var/abs/community/spacefm/PKGBUILD ./

cp /var/abs/community/spacefm/* ./

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB