updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / samba-3.5-git / PKGBUILD
blob36f117d7af2ab7e0607889653ac4ea1500f6ae90
1 pkgname=samba-3.5-git
2 pkgver=20100503
3 pkgrel=1
4 pkgdesc="Tools to access a server's filespace and printers via SMB"
5 arch=('i686' 'x86_64')
6 url="http://www.samba.org/"
7 license=('GPL3')
8 depends=('popt' 'libldap>=2.4.18-1' 'tdb' 'libcups' 'fam')
9 makedepends=('git' 'db>=4.7' 'popt' 'libcups' 'acl' 'libldap' 'libcap>=2.16'
10 'heimdal>=1.2-1' 'pam' 'fam' 'gnutls>=2.4.1' 'talloc' 'tdb')
11 provides=('samba' 'smbclient')
12 conflicts=('samba' 'smbclient')
13 ### UNINSTALL dmapi package before building!!!
14 backup=(etc/logrotate.d/samba 
15 etc/pam.d/samba 
16 etc/samba/smb.conf
17 etc/xinetd.d/swat
18 etc/conf.d/samba)
19 source=(samba.rc
20 samba.logrotate 
21 swat.xinetd 
22 samba.pam 
23 samba.conf.d)
24 md5sums=('e93533fa2296c07c1f645dfdd373657f'
25 '5697da77590ec092cc8a883bae06093c'
26 'a4bbfa39fee95bba2e7ad6b535fae7e6'
27 '96f82c38f3f540b53f3e5144900acf17'
28 'f2f2e348acd1ccb566e95fa8a561b828')
30 _gitroot=git://git.samba.org/samba.git
31 _gitname=samba
33 build() {
34   cd $srcdir
35   msg "Connecting git.samba.org server..."
37   if [ -d $_gitname ] ; then
38     cd $_gitname
39     git fetch origin || return 1
40   else
41     git clone $_gitroot $_gitname || return 1
42     cd $_gitname
43   fi
44   git checkout origin/v3-5-test || return 1
46   cd $srcdir/$_gitname/source3
47   ./autogen.sh || return 1
48   ./configure --prefix=/usr \
49     --libdir=/usr/lib/ \
50     --localstatedir=/var \
51     --with-configdir=/etc/samba \
52     --with-lockdir=/var/cache/samba \
53     --with-piddir=/var/run/samba \
54     --with-fhs \
55     --with-pam \
56     --with-pam_smbpass \
57     --with-pammodulesdir=/lib/security \
58     --with-ads \
59     --with-acl-support \
60     --with-cifsmount \
61     --with-libsmbclient \
62     --with-syslog \
63     --enable-external-libtalloc \
64     --disable-dnssd \
65     --disable-avahi \
66     --with-cifsumount \
67     --enable-external-libtdb
68   make || return 1
70   # manpages
71   cd ../docs-xml
72   make manpages3 || return 1
73   rm -rf ../docs/
74   mkdir -p ../docs/
75   mv output/manpages-3/ ../docs/manpages
78 package() {
79   cd $srcdir/$_gitname/source3
80   make DESTDIR=$pkgdir install || return 1
82   # samba
83   mkdir -p ${pkgdir}/var/log/samba
84   install -D -m755 ../../samba.rc ${pkgdir}/etc/rc.d/samba
85   install -D -m644 ../../samba.conf.d ${pkgdir}/etc/conf.d/samba
86   mkdir -p ${pkgdir}/etc/samba
87   cat ../examples/smb.conf.default | \
88     sed 's|log file = .*$|log file = /var/log/samba/log.%m|g' >${pkgdir}/etc/samba/smb.conf.default
89   install -D -m644 ../../samba.logrotate ${pkgdir}/etc/logrotate.d/samba
90   install -D -m644 ../../swat.xinetd ${pkgdir}/etc/xinetd.d/swat
91   install -D -m644 ../../samba.pam ${pkgdir}/etc/pam.d/samba
92   # spool directory
93   install -d -m1777 ${pkgdir}/var/spool/samba
94   sed -i 's|/usr/spool/samba|/var/spool/samba|g' ${pkgdir}/etc/samba/smb.conf.default
95   # fix logrotate
96   sed -i -e 's|log.%m|%m.log|g' ${pkgdir}/etc/samba/smb.conf.default
97   # nsswitch libraries
98   install -D -m755 ${srcdir}/samba/nsswitch/libnss_wins.so ${pkgdir}/lib/libnss_wins.so
99   ln -s libnss_wins.so ${pkgdir}/lib/libnss_wins.so.2
100   install -D -m755 ${srcdir}/samba/nsswitch/libnss_winbind.so ${pkgdir}/lib/libnss_winbind.so
101   # copy ldap example
102   install -D -m644 ${srcdir}/samba/examples/LDAP/samba.schema ${pkgdir}/usr/share/doc/samba/examples/LDAP/samba.schema
104   # smbclient
105   mkdir ${pkgdir}/sbin
106   install -m755 bin/{mount.cifs,umount.cifs} ${pkgdir}/sbin/
107   mkdir -p ${pkgdir}/usr/lib/cups/backend
108   ln -sf /usr/bin/smbspool ${pkgdir}/usr/lib/cups/backend/smb
110   # manpages
111   make DESTDIR=$pkgdir installman || return 1
112   # remove conflicting tdb man pages
113   rm -f $pkgdir/usr/share/man/man8/tdb{backup,dump,tool}.8 || return 1
116 # vim:set ts=2 sw=2 et: