You are not logged in.
Hi All
I am trying to create a PKGBUILD for a package called cantera. This package uses the standard "configure", "make", and "make install" process; however, "--prefix" is supported but DESTDIR is not used. Unfortunately, this package is very large (many files) and "make install" install with absolute path names. Is there any strategies for handling this situation? An example of another package that handles this would be great.
Thanks
Kevin
Offline
Try this:
./configure --prefix=/usr
make || return 1
make prefix=$startdir/pkg/usr install
Offline
Seemed like a good idea. But it didn't work. Generally speaking, is it Makefile.in that I should look through when automake is used?
Kev
Offline
Try with:
./configure --prefix=$startdir/pkg/usr
make
make install
I downloaded the source and it seems that will work.
Offline
Thanks Snowman. That worked.
Kev
Offline
@Snowman: Just wondering: Is that a safe thing to do in most cases/always? Won't the program look for files in $startdir/pkg/usr hen it runs, or have i misunderstood something/how configure works?
Can someone give a good explanation of configure etc?
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
no, that's not safe to do in most cases. A lot of apps hardcode paths into their binaries.
The former method though, which looks like this:
./configure --prefix=/usr
make || return 1
make prefix=$startdir/pkg/usr install
should be safe most of the time.
Explanation?
Well, configure sets up various predefined variables, some of which the app might be hardcoding into its binaries. It also goes through and makes sure your system has all the needed libs, headers, and so forth, as well as stringing together compiler options to make it all work right. Then it goes on to generate a Makefile from a Makefile.in or similar, the "in" version being a generic version, and the final makefile being where things that are specific to the system have been filled in. Make will actually run the specified parts of the makefile, usually just plain "make" compiles everything, but does not install. "make install", obviously, installs, but one can add in variable names beteen the "make" and "install" to override variables in the make file, in this case we override prefix, often we'll override DESTDIR as well.
I hope that clears it up a bit.
The suggestion box only accepts patches.
Offline
It doesn't work for me, I get the following error:
/bin/install -c ijs_server_epsonepl -c /var/abs/local/epsoneplijs/pkg/usr/bin/ijs_server_epsonepl
/bin/install: cannot create regular file `/var/abs/local/epsoneplijs/pkg/usr/bin/ijs_server_epsonepl': No such file or directory
make: *** [install] Error 1
==> ERROR: Build Failed. Aborting...
So I have to create a folder called usr/bin in my pkg-folder, then it will work.
But this is stupid, can't makepkg create those folders by itself?
Hmm ok tried creating the folders and still the same error, here is my PKGBUILD:
pkgname=epsoneplijs
pkgver=0.4.0
pkgrel=1
pkgdesc="a Epson EPL printer driver for ghostscript"
url="http://sourceforge.net/projects/epsonepl/"
source=($pkgname-$pkgver.tgz)
md5sums=('8bc16b9df5b2a4168abc773745b9b2d7')
build() {
cd $startdir/src/$pkgname-$pkgver
./configure --prefix=/usr
make || return 1
make prefix=$startdir/pkg/usr install
}
Whats wrong, I don't get it...
digiKam developer - www.digikam.org
Offline
OK now it worked...
added in PKGBUILD the following line:
mkdir -p $startdir/pkg/usr/bin
digiKam developer - www.digikam.org
Offline
Stuff like this happens when Makefiles use cp instead of install -D.
In cases where neither DESTDIR nor prefix (or PREFIX) work correctly, it is a good solution to fix the Makefile, or Makefile.in.
Offline