You are not logged in.

#1 2009-07-03 22:07:24

KRTac
Member
From: Croatia
Registered: 2008-07-01
Posts: 99

is make install necessary? [solved]

I'm updating a PKGBUILD from a previous owner. I'm new to building from source, as in I dont know exactly happens on make install. I know that with make install all the files are copied to their directorys, but does anything special ocurre other than that? I'm asking because when I do make install in my build() function, it copies the files (actually one file) to the desired directory on the system, and not in the pkg/ dir. My question is, could I skip make install and do copy the file to the pkg/ dir manualy?

The PKGBUILD:

# $Id$
# Maintainer: Dino Krtanjek <krtanjekdino@gmail.com>
pkgname=php-xcache
pkgver=1.2.2
pkgrel=4
pkgdesc="A fast and stable PHP opcode cacher"
arch=('i686' 'x86_64')
url="http://xcache.lighttpd.net/"
license=('BSD')
depends=('php')
install=php-xcache.install
backup=('etc/php/conf.d/xcache.ini')
source=(http://xcache.lighttpd.net/pub/Releases/$pkgver/xcache-$pkgver.tar.gz)
md5sums=('216dc533f63f738b824319ed1ba2c82f')
_admindir=/srv/http/xcache-admin

build() {
    cd "$srcdir/xcache-$pkgver"
    phpize || return 1
    ./configure --prefix=/usr --enable-xcache --enable-xcache-optimizer \
    --enable-xcache-coverager || return 1
    make || return 1
    make DESTDIR=$pkgdir install || return 1
    echo -e "
XCache has a admin panel written in php. The administration panel displays
useful information about cached scripts and memory usage. If u choose to
install it, it will be installed in the $_admindir directory. If you keep
your web documents elsewhere, just make a symlink (ln -s) to the $_admindir
directory. You could also copy the content of $_admindir to
the desired location, but then remember to manually copy the content again
on a package update.

NOTE: the administration is protected with a builtin http authentication
that does't always work. If you can't access the admin panel, try to
disable the authentification by setting xcache.admin.enable_auth to Off in
xcache.ini. However, this is not recommended, because then anybody can
access you're XCache admin panel. Try to set up some alternative
authentication approach.\n"
    install_admin=""
    while [[ "$install_admin" != "y" && "$install_admin" != "n" ]]; do
        read -p "Install the XCache admin panel? [y/n] " -n 1 install_admin
        echo -e "\n"
    done
    if [ "$install_admin" == "y" ]; then
        mkdir -p "$pkgdir$_admindir/"
        install -Dm644 admin/* "$pkgdir$_admindir/"
        echo -e "Installed admin panel to $_admindir.\n"
    fi
    install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
    install -Dm644 xcache.ini "$pkgdir/etc/php/conf.d/xcache.ini"
}

Last edited by KRTac (2009-07-06 00:55:41)

Offline

#2 2009-07-03 22:23:47

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: is make install necessary? [solved]

I'd suggest you to read the Makefile and learn how to specify the destination by changing the variables.


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#3 2009-07-03 22:27:22

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: is make install necessary? [solved]

You should post or look in the Makefile. I don't really know how they work, but it looks like it needs "make INSTALL_ROOT=$pkgdir install" instead of DESTDIR. I'm not sure though.

Offline

#4 2009-07-04 14:46:53

scio
Member
From: Buffalo, NY
Registered: 2008-08-05
Posts: 366

Re: is make install necessary? [solved]

I know for cmake, when it creates a makefile, make install removes the rpath from the executables allowing you to use LD_LIBRARY_PATH to specify shared libraries.  Bottom line, use make install.

Offline

#5 2009-07-06 00:55:22

KRTac
Member
From: Croatia
Registered: 2008-07-01
Posts: 99

Re: is make install necessary? [solved]

INSTALL_ROOT did the trick..thanks

Offline

Board footer

Powered by FluxBB