Magellan Linux

Annotation of /trunk/core/samba/samba-3.4.2-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5360 - (hide annotations) (download)
Mon May 17 13:34:33 2010 UTC (14 years ago) by niro
File size: 7075 byte(s)
auto added: ver bump to 3.4.2-r3
1 niro 5360 # $Id$
2    
3     PNAME="samba"
4     PVER="3.4.2"
5     PBUILD="r3"
6    
7     PCATEGORIE="net-fs"
8     STATE="unstable"
9    
10     DESCRIPTION="Samba provides seamless file and print services to SMB/CIFS clients."
11     HOMEPAGE="http://www.samba.org"
12    
13     DEPEND=">= virtual/glibc
14     >= net-print/cups-1.4
15     >= dev-libs/popt-1.15
16     >= sys-libs/ncurses-5.7
17     >= sys-libs/readline-6
18     >= app-admin/fam-2.7.0
19     >= dev-libs/openssl-0.9.8
20     >= net-dns/avahi-0.6.25"
21    
22     SDEPEND=">= sys-dev/automake-4
23     >= sys-dev/autoconf-5
24     >= sys-apps/sed-4"
25    
26     SRCFILE="${PNAME}-${PVER}.tar.gz"
27     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
28    
29     FILESDIR="${SOURCEDIR}/samba"
30    
31     sminclude mtools
32    
33     SRC_URI=(
34     http://us1.samba.org/samba/ftp/stable/${SRCFILE}
35     mirror://${PNAME}/${SRCFILE}
36     mirror://${PNAME}/smb.conf-3.0.14a
37     mirror://${PNAME}/lmhosts
38     mirror://${PNAME}/smbusers
39     mirror://${PNAME}/samba.rc
40     # mirror://${PNAME}/samba-3.3.4-libdirsymlink.patch
41     # mirror://${PNAME}/samba-3.3.4-extrabins.patch
42     )
43    
44     UP2DATE="updatecmd http://ftp.samba.org/samba/ftp | grep ${PNAME}-[0-9].* | lasttarball gz"
45    
46     src_prepare()
47     {
48     munpack ${SRCFILE} || die
49     cd ${SRCDIR}
50    
51     # examples: to be copied as docs
52     rm -rf ${SRCDIR}/examples.ORIG || die
53    
54     # # patchwork
55     # mpatch samba-3.3.4-libdirsymlink.patch || die
56     # mpatch samba-3.3.4-extrabins.patch || die
57    
58     # add our vendor suffix
59     sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source3/VERSION || die
60     cd ${SRCDIR}/source3
61     sh script/mkversion.sh || die
62    
63     # compilation fix
64     # (u)mount.cifs is broken; missing include/version.h header
65     ln -snf ../include ${SRCDIR}/source3/client || die
66    
67     # # reconfigure makefiles
68     # cd ${SRCDIR}/source
69     # autoreconf -I. -Ilib/replace || die
70     # sh autogen.sh || die
71     }
72    
73     src_compile()
74     {
75     cd ${SRCDIR}/source3
76    
77     # remove swat completely now; since we have no httpd server yet
78     # if really needed we make an extra package to save diskspace
79     # --disable-swat option is there, no patches needed anymore ;)
80     mconfigure \
81     --with-fhs \
82     --sysconfdir=/etc/samba \
83     --localstatedir=/var \
84     --with-configdir=/etc/samba \
85     --libdir=/usr/$(mlibdir)/samba \
86     --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \
87     --with-piddir=/var/run/samba \
88     --with-lockdir=/var/cache/samba \
89     --with-logfilebase=/var/log/samba \
90     --with-privatedir=/var/lib/samba/private \
91     --enable-shared-libs \
92     --with-cifsmount \
93     --with-automount \
94     --with-libsmbclient \
95     --with-syslog \
96     --without-acl-support \
97     --enable-cups \
98     --without-krb5 \
99     --without-ldap \
100     --with-readline \
101     --with-winbind \
102     --without-pam \
103     --without-pam_smbpass \
104     --with-quotas \
105     --with-sys-quotas \
106     --with-cifsmount=no \
107     --disable-swat \
108     --enable-avahi \
109     --disable-developer \
110     --disable-dmalloc \
111     || die
112    
113     mmake proto || die
114     mmake everything || die
115    
116     # build mount.cifs separatly to fix pic issues
117     mmake bin/mount.cifs || die
118     mmake bin/umount.cifs || die
119     }
120    
121     src_install()
122     {
123     cd ${SRCDIR}/source3
124    
125     # needed directories
126     minstalldir /etc/samba || die
127     minstalldir /sbin || die
128     minstalldir /usr/$(mlibdir)/cups/backend || die
129     minstalldir /usr/share/doc/${PNAME}-${PVER}/examples || die
130    
131     # needed directories by samba at runtime
132     mkeepdir /var/log/samba || die
133     mkeepdir /var/run/samba || die
134     mkeepdir /var/cache/samba || die
135     mkeepdir /var/lib/samba/netlogon || die
136     mkeepdir /var/lib/samba/profiles || die
137     mkeepdir /var/lib/samba/printers/W32X86 || die
138     mkeepdir /var/lib/samba/printers/WIN40 || die
139     mkeepdir /var/lib/samba/printers/W32ALPHA || die
140     mkeepdir /var/lib/samba/printers/W32MIPS || die
141     mkeepdir /var/lib/samba/printers/W32PPC || die
142     mkeepdir /var/lib/samba/private || die
143     mkeepdir /var/spool/samba || die
144    
145     # fix permissions
146     mchmod 0700 /var/lib/samba/private || die
147     mchmod 1777 /var/spool/samba || die
148    
149     make DESTDIR=${BINDIR} install-everything || die
150    
151     # if exist remove *.old binaries
152     if [[ -n $(find ${BINDIR}/usr/bin -type f -name '*.old') ]]
153     then
154     for i in ${BINDIR}/usr/bin/*.old
155     do
156     [[ -e ${i} ]] && rm -f ${i} || die
157     done
158     fi
159    
160     # install wins nsswitch extensions
161     minstalldir /usr/$(mlibdir) || die
162     minstallfile ${SRCDIR}/nsswitch/libnss_wins.so /usr/$(mlibdir) || die
163     mlink libnss_wins.so /usr/$(mlibdir)/libnss_wins.so.2 || die
164     minstallfile ${SRCDIR}/nsswitch/libnss_winbind.so /usr/$(mlibdir) || die
165     mlink libnss_winbind.so /usr/$(mlibdir)/libnss_winbind.so.2 || die
166    
167     # install cifs tools
168     minstallexec bin/mount.cifs || die
169     minstallexec bin/umount.cifs || die
170     mchmod 4755 /usr/bin/mount.cifs || die
171     mchmod 4755 /usr/bin/umount.cifs || die
172    
173     # add support for mount
174     mlink ../usr/bin/mount.cifs /sbin/mount.cifs || die
175    
176     # samba doesn't create these symlinks anymore
177     mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so.0 || die
178     mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so || die
179     mlink samba/libtalloc.so /usr/$(mlibdir)/libtalloc.so.1 || die
180     mlink samba/libtalloc.so /usr/$(mlibdir)/libtalloc.so || die
181     mlink samba/libtdb.so /usr/$(mlibdir)/libtdb.so.1 || die
182     mlink samba/libtdb.so /usr/$(mlibdir)/libtdb.so || die
183     mlink samba/libwbclient.so /usr/$(mlibdir)/libwbclient.so.0 || die
184     mlink samba/libwbclient.so /usr/$(mlibdir)/libwbclient.so || die
185    
186     # add cups printing support
187     mlink ../../../bin/smbspool /usr/$(mlibdir)/cups/backend/smb || die
188    
189     # install our config files
190     # fake smb.conf to get smbmount work
191     memptyfile /etc/samba/smb.conf || die
192    
193     # our smb example config
194     minstalletc smb.conf-3.0.14a smb.conf.example /etc/samba || die
195    
196     # our lmhosts and smbusers config
197     minstalletc lmhosts lmhosts /etc/samba || die
198     minstalletc smbusers smbusers /etc/samba || die
199    
200     # our initscript
201     minstallrc samba.rc samba || die
202    
203     # # install example docs - not wanted anymore to save some space
204     # cp -a ${SRCDIR}/examples/* ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples || die
205     #
206     # # fix all permissions
207     # chmod -R 755 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples -type d) || die
208     # chmod -R 644 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples ! -type d) || die
209    
210     # # remove unneeded docs, this saves some space ;)
211     # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/help/{guide,howto,devel} || die
212     # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/using_samba || die
213    
214     # using a patch now
215     # # remove swat completely now; since we have no httpd server yet
216     # # if really needed we make an extra package to save diskspace
217     # rm -f ${BINDIR}/usr/sbin/swat || die
218     # rm -f ${BINDIR}/usr/share/man/man8/swat.8 || die
219     # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat || die
220    
221     # other docs
222     cd ${SRCDIR}
223     minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die
224     }
225    
226     postinstall()
227     {
228     echo
229     echo "To initialize samba's password database, please run:"
230     echo " pdbedit --force-initialized-passwords"
231     echo
232     echo "If you experience client locks in file transfers _only_, try the parameter"
233     echo " use sendfile = no (man smb.conf(5), man sendfile(2))"
234     echo
235     echo "There also seem some problems with the smbfs implementation of the recent 2.6 kernels."
236     echo "If you experience problems (lockups) with smbfs, try cifs as an alternative."
237     echo
238     }

Properties

Name Value
svn:keywords Id