Magellan Linux

Contents of /smage/trunk/core/samba/samba-3.6.9-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4387 - (show annotations) (download)
Fri Nov 16 15:08:49 2012 UTC (11 years, 6 months ago) by niro
File size: 3311 byte(s)
-fixed a typo
1 # $Id$
2
3 PNAME="samba"
4 PVER="3.6.9"
5 PBUILD="r1"
6
7 PCAT="net-fs"
8
9 DESCRIPTION="Samba provides seamless file and print services to SMB/CIFS clients."
10 HOMEPAGE="http://www.samba.org"
11
12 DEPEND=">= virtual/glibc
13 >= dev-libs/popt-1.16
14 >= sys-libs/ncurses-5.9
15 >= dev-libs/libcap-2"
16
17 SDEPEND=">= sys-dev/automake-4
18 >= sys-dev/autoconf-5
19 >= virtual/sed"
20
21 SRCFILE="${PNAME}-${PVER}.tar.gz"
22 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
23
24 FILESDIR="${SOURCEDIR}/samba"
25
26 sminclude mtools alx
27
28 NMBD_SVC_VER=1.2
29
30 SRC_URI=(
31 http://us1.samba.org/samba/ftp/stable/${SRCFILE}
32 mirror://${PNAME}/${SRCFILE}
33 mirror://${PNAME}/nmbd.service-${NMBD_SVC_VER}
34 )
35
36 UP2DATE="updatecmd http://ftp.samba.org/pub/samba | grep ${PNAME}-[0-9].* | lasttarball gz"
37
38 src_prepare()
39 {
40 munpack ${SRCFILE} || die
41 cd ${SRCDIR}
42
43 # examples: to be copied as docs
44 rm -rf ${SRCDIR}/examples.ORIG || die
45
46 # add our vendor suffix
47 sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source3/VERSION || die
48 cd ${SRCDIR}/source3
49 sh script/mkversion.sh || die
50
51 # compilation fix
52 # (u)mount.cifs is broken; missing include/version.h header
53 ln -snf ../include ${SRCDIR}/source3/client || die
54 }
55
56 src_compile()
57 {
58 cd ${SRCDIR}/source3
59
60 # remove swat completely now; since we have no httpd server yet
61 # if really needed we make an extra package to save diskspace
62 # --disable-swat option is there, no patches needed anymore ;)
63 mconfigure \
64 --with-fhs \
65 --sysconfdir=/etc/samba \
66 --localstatedir=/var \
67 --with-configdir=/etc/samba \
68 --libdir=/usr/$(mlibdir)/samba \
69 --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \
70 --with-piddir=/var/run/samba \
71 --with-lockdir=/var/cache/samba \
72 --with-logfilebase=/var/log/samba \
73 --with-privatedir=/var/lib/samba/private \
74 --enable-shared-libs \
75 --without-cifsmount \
76 --without-automount \
77 --without-libsmbclient \
78 --without-syslog \
79 --without-acl-support \
80 --disable-cups \
81 --without-krb5 \
82 --without-ldap \
83 --without-readline \
84 --without-winbind \
85 --without-pam \
86 --without-pam_smbpass \
87 --without-quotas \
88 --without-sys-quotas \
89 --disable-swat \
90 --disable-avahi \
91 --disable-developer \
92 --disable-dmalloc \
93 || die
94
95 mmake bin/nmbd || die
96 }
97
98 src_install()
99 {
100 cd ${SRCDIR}/source3
101
102 minstalldir /usr/sbin || die
103 minstallexec bin/nmbd /usr/sbin/nmbd || die
104 minstalldir /usr/$(mlibdir) || die
105 mcopy bin/lib*.so\* /usr/$(mlibdir) || die
106
107 # needed directories by samba at runtime
108 mkeepdir /var/run/samba || die
109 mkeepdir /var/lib/samba || die
110 mkeepdir /var/cache/samba || die
111
112 # install systemd units
113 minstallunit nmbd.service-${NMBD_SVC_VER} nmbd.service || die
114 minstalldir /etc/tmpfiles.d || die
115 MCONFIG=/etc/tmpfiles.d/samba.conf
116 mclearconfig || die
117 maddconfig 'd /run/samba 0755 root root -'
118
119 # create a mininmal configuration to get nmbd working
120 minstalldir /etc/samba || die
121 echo '[global]' > ${BINDIR}/etc/samba/smb.conf || die
122 echo 'workgroup = WORKGROUP' >> ${BINDIR}/etc/samba/smb.conf || die
123 echo '#netbios name = <name_of_this_server>' >> ${BINDIR}/etc/samba/smb.conf || die
124 echo 'dns proxy = no' >> ${BINDIR}/etc/samba/smb.conf || die
125 }
126
127 preinstall()
128 {
129 add_conf_prot_ignore /etc/samba/smb.conf /etc/tmpfiles.d/samba.conf
130 }
131
132 postinstall()
133 {
134 mstartunit nmbd.service
135 }
136
137 postremove()
138 {
139 mstopunit nmbd.service
140 }