You are not logged in.

#1 2009-07-22 02:26:17

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

[Request] Samba4 PKGBUILD - the proper way?

Hi, this is step one in my quest to get a working evolution-mapi plugin, and I'm already stuck... I have this PKGBUILD, half-copied from the existing samba PKGBUILD.

# $Id$
# Maintainer: judd <jvinet@zeroflux.org>
pkgname=samba4
pkgver=4.0.0A8
# We use the 'A' to fake out pacman's version comparators.  Samba chooses
# to append 'a','b',etc to their subsequent releases, which pamcan
# misconstrues as alpha, beta, etc.  Bad samba!
_realver=4.0.0alpha8
pkgrel=1
pkgdesc="Tools to access a server's filespace and printers via SMB. Now 
with AD support. "
arch=(i686 x86_64)
url="http://www.samba.org"
license=('GPL3')
backup=()
depends=('db>=4.7' 'popt' 'libcups' 'acl' 'libldap' 'libcap>=2.16' 'heimdal>=1.2-1' 'pam' 'fam' 'gnutls>=2.4.1' 'tdb=3.3.6')
options=(!makeflags)
source=(http://us1.samba.org/samba/ftp/samba4/samba-${_realver}.tar.gz)

build() {
  cd ${srcdir}/samba-${_realver}/source4
  ./configure --prefix=/opt --with-lockdir=/var/cache/samba4 \
        --with-piddir=/var/run/samba4 --enable-fhs \
        --libdir=/usr/lib/samba4 \
        --enable-external-libtalloc=no \
        --enable-external-libtdb=no \
        --enable-external-libtevent=no \
        --enable-external-libldb=no

  make || return 1
  make install
}
md5sums=('9ed6588e1e77f7a3f1a6c9fe3ebcefa3')

The configure and make work (I disable external libtalloc, libtdb, libtevent, and libldb because they were causing warnings in the configure process, since none of these exist/are high enough version on my system. The depends are simply copied from samba, I'm sure the version numbers have some problems there.

The main issue is what happens when I makepkg, the error message is:-

mkdir -p /opt/lib/python2.6/site-packages
mkdir: cannot create directory `/opt/lib': Permission denied
make: *** [installpython] Error 1

Within the source directory (./src/samba-4.0.0alpha8/source4), there's a Makefile and a mkconfig.mk file which perhaps have something to do with this error. I'm not sure how to modify them, or if I even need to. The original samba PKGBUILD is too complicated for me (have never created a successful PKGBUILD, only modified existing ones for my needs), lots of manual creation of directories and symlinking of stuff. I notice make install is not used.

Could someone point out what I need to change, or help me fix the above?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#2 2009-07-22 08:25:44

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

Re: [Request] Samba4 PKGBUILD - the proper way?

Typically, PKGBUILDs use 'make DESTDIR="$pkgdir/" install' so you could try that. However, if the devs don't use it for samba 3, there's a good chance it won't work for samba 4 either. You'd need to examine the Makefile and mkconfig.mk to work out exactly how to handle it.

Offline

#3 2009-07-22 08:38:05

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [Request] Samba4 PKGBUILD - the proper way?

Thanks tomk. I've got the Makefile and mkconfig.mk open, but its confusing (I've always let my IDE do the makefiles for me).

For example, near the start of the Makefile there's 'basedir = $(prefix)', and in mkconfig.mk there's 'prefix = /opt', which I guess is autogenerated from my configure line. This is as it should be, I thought, since my understanding was that makepkg would use fakeroot to 'fake' that $pkgdir is the base directory (sort of like chroot), but it seems not. Is it, then, not possible at all to just make install? My previous quick glance into the AUR howto indicated some apps work that way, I guess samba4 is a different beast...

And as I was typing that out, my makepkg is successful! Thanks for your help, tomk. Wonder if this will work as its supposed to.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2009-07-22 09:47:56

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

Re: [Request] Samba4 PKGBUILD - the proper way?

'make install' never works in a PKGBUILD, because it tries to install files into the root file system, and not $pkgdir as intended. fakeroot is used to install files with the correct ownership/permissions when building as user - the install dir must still be specified.

Anyway, glad it built for you.

Offline

#5 2009-07-23 05:10:09

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [Request] Samba4 PKGBUILD - the proper way?

And I'm done. Results are here.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB