Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id