Annotation of /smage/trunk/core/samba/samba-3.6.25-r2.smage2
Parent Directory | Revision Log
Revision 6683 -
(hide annotations)
(download)
Wed Jul 15 14:10:36 2015 UTC (9 years, 2 months ago) by niro
File size: 3374 byte(s)
Wed Jul 15 14:10:36 2015 UTC (9 years, 2 months ago) by niro
File size: 3374 byte(s)
auto added: ver bump to 3.6.25-r2
1 | niro | 6683 | # $Id$ |
2 | |||
3 | PNAME="samba" | ||
4 | PVER="3.6.25" | ||
5 | PBUILD="r2" | ||
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 | >= sys-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 | msetfeature "!check" # no check target in Makefile | ||
27 | sminclude mtools systemd alx | ||
28 | |||
29 | NMBD_SVC_VER=1.2 | ||
30 | |||
31 | SRC_URI=( | ||
32 | http://us1.samba.org/samba/ftp/stable/${SRCFILE} | ||
33 | mirror://${PNAME}/${SRCFILE} | ||
34 | mirror://${PNAME}/nmbd.service-${NMBD_SVC_VER} | ||
35 | ) | ||
36 | |||
37 | UP2DATE="updatecmd http://ftp.samba.org/pub/samba | grep '${PNAME}-3.6.*' | lasttarball gz" | ||
38 | |||
39 | src_prepare() | ||
40 | { | ||
41 | munpack ${SRCFILE} || die | ||
42 | cd ${SRCDIR} | ||
43 | |||
44 | # examples: to be copied as docs | ||
45 | rm -rf ${SRCDIR}/examples.ORIG || die | ||
46 | |||
47 | # add our vendor suffix | ||
48 | sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source3/VERSION || die | ||
49 | cd ${SRCDIR}/source3 | ||
50 | sh script/mkversion.sh || die | ||
51 | |||
52 | # compilation fix | ||
53 | # (u)mount.cifs is broken; missing include/version.h header | ||
54 | ln -snf ../include ${SRCDIR}/source3/client || die | ||
55 | } | ||
56 | |||
57 | src_compile() | ||
58 | { | ||
59 | cd ${SRCDIR}/source3 | ||
60 | |||
61 | # remove swat completely now; since we have no httpd server yet | ||
62 | # if really needed we make an extra package to save diskspace | ||
63 | # --disable-swat option is there, no patches needed anymore ;) | ||
64 | mconfigure \ | ||
65 | --with-fhs \ | ||
66 | --sysconfdir=/etc/samba \ | ||
67 | --localstatedir=/var \ | ||
68 | --with-configdir=/etc/samba \ | ||
69 | --libdir=/usr/$(mlibdir)/samba \ | ||
70 | --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \ | ||
71 | --with-piddir=/var/run/samba \ | ||
72 | --with-lockdir=/var/cache/samba \ | ||
73 | --with-logfilebase=/var/log/samba \ | ||
74 | --with-privatedir=/var/lib/samba/private \ | ||
75 | --enable-shared-libs \ | ||
76 | --without-cifsmount \ | ||
77 | --without-automount \ | ||
78 | --without-libsmbclient \ | ||
79 | --without-syslog \ | ||
80 | --without-acl-support \ | ||
81 | --disable-cups \ | ||
82 | --without-krb5 \ | ||
83 | --without-ldap \ | ||
84 | --without-readline \ | ||
85 | --without-winbind \ | ||
86 | --without-pam \ | ||
87 | --without-pam_smbpass \ | ||
88 | --without-quotas \ | ||
89 | --without-sys-quotas \ | ||
90 | --disable-swat \ | ||
91 | --disable-avahi \ | ||
92 | --disable-developer \ | ||
93 | --disable-dmalloc \ | ||
94 | || die | ||
95 | |||
96 | mmake bin/nmbd || die | ||
97 | } | ||
98 | |||
99 | src_install() | ||
100 | { | ||
101 | cd ${SRCDIR}/source3 | ||
102 | |||
103 | minstalldir /usr/sbin || die | ||
104 | minstallexec bin/nmbd /usr/sbin/nmbd || die | ||
105 | minstalldir /usr/$(mlibdir) || die | ||
106 | mcopy -a bin/lib*.so\* /usr/$(mlibdir) || die | ||
107 | |||
108 | # needed directories by samba at runtime | ||
109 | mkeepdir /var/run/samba || die | ||
110 | mkeepdir /var/lib/samba || die | ||
111 | mkeepdir /var/cache/samba || die | ||
112 | |||
113 | # install systemd units | ||
114 | minstallunit nmbd.service-${NMBD_SVC_VER} nmbd.service || die | ||
115 | minstalldir /etc/tmpfiles.d || die | ||
116 | MCONFIG=/etc/tmpfiles.d/samba.conf | ||
117 | mclearconfig || die | ||
118 | maddconfig 'd /run/samba 0755 root root -' | ||
119 | |||
120 | # create a mininmal configuration to get nmbd working | ||
121 | minstalldir /etc/samba || die | ||
122 | echo '[global]' > ${BINDIR}/etc/samba/smb.conf || die | ||
123 | echo 'workgroup = WORKGROUP' >> ${BINDIR}/etc/samba/smb.conf || die | ||
124 | echo '#netbios name = <name_of_this_server>' >> ${BINDIR}/etc/samba/smb.conf || die | ||
125 | echo 'dns proxy = no' >> ${BINDIR}/etc/samba/smb.conf || die | ||
126 | } | ||
127 | |||
128 | preinstall() | ||
129 | { | ||
130 | add_conf_prot_ignore /etc/samba/smb.conf /etc/tmpfiles.d/samba.conf | ||
131 | } | ||
132 | |||
133 | postinstall() | ||
134 | { | ||
135 | mstartunit nmbd.service | ||
136 | } | ||
137 | |||
138 | postremove() | ||
139 | { | ||
140 | mstopunit nmbd.service | ||
141 | } |