Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1558 - (show annotations) (download)
Mon May 11 14:05:06 2009 UTC (14 years, 11 months ago) by niro
File size: 6556 byte(s)
-fixed mount.cifs/umount.cifs installation
1 # $Id$
2
3 PNAME="samba"
4 PVER="3.3.4"
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.3
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-3
22 >= sys-dev/autoconf-4
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 client/mount.cifs || die
166 minstallexec client/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
177 # add cups printing support
178 mlink ../../../bin/smbspool /usr/$(mlibdir)/cups/backend/smb || die
179
180 # install our config files
181 # fake smb.conf to get smbmount work
182 memptyfile /etc/samba/smb.conf || die
183
184 # our smb example config
185 minstalletc smb.conf-3.0.14a smb.conf.example /etc/samba || die
186
187 # our lmhosts and smbusers config
188 minstalletc lmhosts lmhosts /etc/samba || die
189 minstalletc smbusers smbusers /etc/samba || die
190
191 # our initscript
192 minstallrc samba.rc samba || die
193
194 # # install example docs - not wanted anymore to save some space
195 # cp -a ${SRCDIR}/examples/* ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples || die
196 #
197 # # fix all permissions
198 # chmod -R 755 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples -type d) || die
199 # chmod -R 644 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples ! -type d) || die
200
201 # # remove unneeded docs, this saves some space ;)
202 # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/help/{guide,howto,devel} || die
203 # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/using_samba || die
204
205 # using a patch now
206 # # remove swat completely now; since we have no httpd server yet
207 # # if really needed we make an extra package to save diskspace
208 # rm -f ${BINDIR}/usr/sbin/swat || die
209 # rm -f ${BINDIR}/usr/share/man/man8/swat.8 || die
210 # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat || die
211
212 # other docs
213 cd ${SRCDIR}
214 minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die
215 }
216
217 postinstall()
218 {
219 echo
220 echo "To initialize samba's password database, please run:"
221 echo " pdbedit --force-initialized-passwords"
222 echo
223 echo "If you experience client locks in file transfers _only_, try the parameter"
224 echo " use sendfile = no (man smb.conf(5), man sendfile(2))"
225 echo
226 echo "There also seem some problems with the smbfs implementation of the recent 2.6 kernels."
227 echo "If you experience problems (lockups) with smbfs, try cifs as an alternative."
228 echo
229 }

Properties

Name Value
svn:keywords Id