blob: e45299d55551420a846e7d3ec0aceadfd0b28e92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=samba
pkgver=3.6.13
pkgrel=0
pkgdesc="Tools to access a server's filespace and printers via SMB"
url="http://www.samba.org"
arch="all"
license="GPL3"
subpackages="$pkgname-dev $pkgname-doc winbind $pkgname-common
$pkgname-initscript tdb libsmbclient $pkgname-client $pkgname-lang"
depends="samba-initscript samba-client"
makedepends="popt-dev ncurses-dev openldap-dev heimdal-dev e2fsprogs-dev
libiconv-dev talloc-dev cups-dev"
source="http://us1.$pkgname.org/$pkgname/ftp/stable/$pkgname-$pkgver.tar.gz
samba.initd
samba.confd
samba.logrotate
"
pkggroups="winbind"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"/source3
./configure --prefix=/usr \
--sysconfdir=/etc/samba \
--with-configdir=/etc/samba \
--localstatedir=/var \
--with-fhs \
--with-lockdir=/var/cache/samba \
--with-piddir=/var/run/samba \
--with-logfilebase=/var/log/samba \
--without-pam \
--with-ads \
--with-krb5 \
--with-libsmbclient \
--with-shared-modules=idmap_rid,imap_ad \
--enable-cups \
--enable-external-libtalloc \
--disable-nss-wrapper \
--disable-dnssd \
--disable-swat
make || return 1
}
package() {
cd "$_builddir"/source3
make DESTDIR="$pkgdir" install
install -d "$pkgdir"/var/log/samba \
"$pkgdir"/usr/share/doc/samba
cd "$srcdir"/$pkgname-$pkgver
cp -r examples "$pkgdir"/usr/share/doc/samba/
install -D packaging/RHEL/setup/smbusers "$pkgdir"/etc/samba/smbusers
install -Dm644 ../samba.logrotate "$pkgdir"/etc/logrotate.d/samba
}
initscript() {
pkgdesc="Init script for Samba"
depends=""
install -Dm755 $srcdir/samba.initd "$subpkgdir"/etc/init.d/samba
install -Dm644 $srcdir/samba.confd "$subpkgdir"/etc/conf.d/samba
}
_mv_files() {
local i
for i in "$@"; do
mkdir -p "$subpkgdir"/${i%/*}
mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
done
}
winbind() {
pkgdesc="Samba user and group resolver"
depends=
install="winbind.pre-install winbind.pre-upgrade winbind.post-install
winbind.post-upgrade"
replaces="samba"
cd "$pkgdir"
_mv_files \
usr/bin/wbinfo \
usr/bin/ntlm_auth \
usr/sbin/winbindd \
usr/lib/samba/idmap
install -d -g winbind -m 750 \
"$subpkgdir"/var/cache/samba/winbindd_privileged
}
common() {
pkgdesc="Samba common files for both client an servers"
depends=
# we have moved libwbclient and libnetapi to samba-common
replaces="winbind samba"
cd "$pkgdir"
_mv_files \
usr/bin/net \
usr/bin/nmblookup \
usr/bin/smbpasswd \
usr/bin/testparm \
usr/lib/samba/*.dat \
usr/lib/libnetapi.so.* \
usr/lib/libwbclient* \
var/run/samba \
var/cache/samba \
var/log/samba
}
tdb() {
pkgdesc="Trivial database"
depends=
cd "$pkgdir"
_mv_files \
usr/lib/libtdb* \
usr/bin/tdb*
}
libsmbclient() {
pkgdesc="The SMB client library"
replaces="samba"
depends=
cd "$pkgdir"
_mv_files \
usr/lib/libsmbclient.so.* \
usr/lib/libsmbsharemodes.so.* \
|| return 1
}
client() {
pkgdesc="Samba client program"
replaces="samba"
depends=
cd "$pkgdir"
_mv_files \
usr/bin/rpcclient \
usr/bin/smbcacls \
usr/bin/findsmb \
usr/bin/smbget \
usr/bin/smbclient \
usr/bin/smbcquotas \
usr/bin/smbspool \
usr/bin/smbtar \
usr/bin/smbtree \
usr/bin/sharesec \
|| return 1
}
md5sums="b9fe8413cbb6fa4b970a159968db2fb4 samba-3.6.13.tar.gz
044c756d3c33c2d610c40bcd76cfb75c samba.initd
c150433426e18261e6e3eed3930e1a76 samba.confd
b7cafabfb4fa5b3ab5f2e857d8d1c733 samba.logrotate"
sha256sums="992f8ad56717bf551b00ad1d31170588a087fb5c2d4d9cd38fd11544f2b8a596 samba-3.6.13.tar.gz
86646cb845aababd9e8655994379526f03327a2cc33b489c3a7dea83ab689c8f samba.initd
1d12f98a7727967b04eb123109b34cfffef320822dc0e8059286b6e3394c3fc0 samba.confd
4c2b7d529126b2fc4f62fb09d99e49a87632d723a2d9d289a61e37dd84145be1 samba.logrotate"
sha512sums="1b1d72a6166885d168a4892b1e8ed2f0affbcd76819bcbabc4093743b15d6e4972cffd53b7e9770baad95b900c3dbf66259fc410cf8421127585fdfb3ffb270a samba-3.6.13.tar.gz
59d05252b8ebbe6ba6a419edc86b66b9541d0bac9dbe810cccb20e64f6044e2900cc6c0979e077741ed00fbbf2d51f9184c83715013299782707b44e39aa99b1 samba.initd
4faf581ecef3ec38319e3c4ab6d3995c51fd7ba83180dc5553a2ff4dfb92efadb43030c543292130c4ed0c281dc0972c6973d52d48062c5edb39bb1c4bbb6dd6 samba.confd
f88ebe59ca3a9e9b77dd5993c13ef3e73a838efb8ed858088b464a330132d662f33e25c27819e38835389dee23057a3951de11bae1eef55db8ff5e1ec6760053 samba.logrotate"
|