Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3474 - (show annotations) (download)
Wed Oct 21 23:07:37 2009 UTC (14 years, 6 months ago) by niro
File size: 7019 byte(s)
-fixed libnss installation
1 # $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}/source3/VERSION || die
59 cd ${SRCDIR}/source3
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}/source3/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}/source3
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}/source3
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 minstalldir /usr/$(mlibdir) || die
160 minstallfile ${SRCDIR}/nsswitch/libnss_wins.so /usr/$(mlibdir) || die
161 mlink libnss_wins.so /usr/$(mlibdir)/libnss_wins.so.2 || die
162 minstallfile ${SRCDIR}/nsswitch/libnss_winbind.so /usr/$(mlibdir) || die
163 mlink libnss_winbind.so /usr/$(mlibdir)/libnss_winbind.so.2 || die
164
165 # install cifs tools
166 minstallexec bin/mount.cifs || die
167 minstallexec bin/umount.cifs || die
168 mchmod 4755 /usr/bin/mount.cifs || die
169 mchmod 4755 /usr/bin/umount.cifs || die
170
171 # add support for mount
172 mlink ../usr/bin/mount.cifs /sbin/mount.cifs || die
173
174 # samba doesn't create these symlinks anymore
175 mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so.0 || die
176 mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so || die
177 mlink samba/libtalloc.so /usr/$(mlibdir)/libtalloc.so.1 || die
178 mlink samba/libtalloc.so /usr/$(mlibdir)/libtalloc.so || die
179 mlink samba/libtdb.so /usr/$(mlibdir)/libtdb.so.1 || die
180 mlink samba/libtdb.so /usr/$(mlibdir)/libtdb.so || die
181 mlink samba/libwbclient.so /usr/$(mlibdir)/libwbclient.so.0 || die
182 mlink samba/libwbclient.so /usr/$(mlibdir)/libwbclient.so || die
183
184 # add cups printing support
185 mlink ../../../bin/smbspool /usr/$(mlibdir)/cups/backend/smb || die
186
187 # install our config files
188 # fake smb.conf to get smbmount work
189 memptyfile /etc/samba/smb.conf || die
190
191 # our smb example config
192 minstalletc smb.conf-3.0.14a smb.conf.example /etc/samba || die
193
194 # our lmhosts and smbusers config
195 minstalletc lmhosts lmhosts /etc/samba || die
196 minstalletc smbusers smbusers /etc/samba || die
197
198 # our initscript
199 minstallrc samba.rc samba || die
200
201 # # install example docs - not wanted anymore to save some space
202 # cp -a ${SRCDIR}/examples/* ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples || die
203 #
204 # # fix all permissions
205 # chmod -R 755 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples -type d) || die
206 # chmod -R 644 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples ! -type d) || die
207
208 # # remove unneeded docs, this saves some space ;)
209 # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/help/{guide,howto,devel} || die
210 # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/using_samba || die
211
212 # using a patch now
213 # # remove swat completely now; since we have no httpd server yet
214 # # if really needed we make an extra package to save diskspace
215 # rm -f ${BINDIR}/usr/sbin/swat || die
216 # rm -f ${BINDIR}/usr/share/man/man8/swat.8 || die
217 # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat || die
218
219 # other docs
220 cd ${SRCDIR}
221 minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die
222 }
223
224 postinstall()
225 {
226 echo
227 echo "To initialize samba's password database, please run:"
228 echo " pdbedit --force-initialized-passwords"
229 echo
230 echo "If you experience client locks in file transfers _only_, try the parameter"
231 echo " use sendfile = no (man smb.conf(5), man sendfile(2))"
232 echo
233 echo "There also seem some problems with the smbfs implementation of the recent 2.6 kernels."
234 echo "If you experience problems (lockups) with smbfs, try cifs as an alternative."
235 echo
236 }

Properties

Name Value
svn:keywords Id