41ebd8cebfb7230f803e141ce089dc8b33c8400e
[samba.git] / examples / redhat / samba-1.9.17a1.spec
1 Summary: SMB client and server
2 Name: samba
3 Version: 1.9.17a1
4 Release: 1
5 Copyright: GPL
6 Group: Networking
7 Source: ftp://samba.anu.edu.au/pub/samba/samba-1.9.17a1.tar.gz
8 Patch: samba-make.patch
9 Patch2: samba-axp.patch
10 Packager: John H Terpstra [Samba-Team] <jht@aquasoft.com.au>
11 Requires: pamconfig
12
13 %description
14 Samba provides an SMB server which can be used to provide network
15 services to SMB (sometimes called "Lan Manager") clients, including
16 various versions of MS Windows, OS/2, and other Linux machines.
17 Samba also provides some SMB clients, which complement the built-in
18 SMB filesystem in Linux.
19
20 Samba uses NetBIOS over TCP/IP (NetBT) protocols and does NOT need
21 NetBEUI (Microsoft Raw NetBIOS frame) protocol.
22
23 %prep
24 %setup
25 %patch -p1
26
27 %ifarch axp
28 %patch2 -p1
29 %endif
30
31 %build
32 cd source
33 make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
34
35 %install
36 cd source
37 cd ..
38 for i in nmblookup smbclient smbpasswd smbrun smbstatus testparm testprns
39 do
40         install -m755 -s source/$i /usr/bin
41         %attr(-,0,0) /usr/bin/$i
42 done
43 for i in addtosmbpass mksmbpasswd.sh smbtar 
44 do
45         install -m755 source/$i /usr/bin
46         %attr(-,0,0) /usr/bin/$i
47 done
48 for i in smbd nmbd
49 do
50         install -m755 -s source/$i /usr/sbin
51         %attr(-,0,0) /usr/bin/$i
52 done
53 for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1
54 do
55         install -m644 docs/$i /usr/man/man1
56         %attr(-,0,0) /usr/bin/$i
57 done
58 install -m644 docs/smb.conf.5 /usr/man/man5
59 %attr(-,0,0) /usr/man/man5/smb.conf.5
60 install -m644 docs/samba.7 /usr/man/man7
61 %attr(-,0,0) /usr/man/man7/samba.7
62 install -m644 docs/smbd.8 /usr/man/man8
63 %attr(-,0,0) /usr/man/man8/smbd.8
64 install -m644 docs/nmbd.8 /usr/man/man8
65 %attr(-,0,0) /usr/man/man8/nmbd.8
66 install -m644 examples/simple/smb.conf /etc/smb.conf.sampl
67 install -m644 examples/redhat/smb.conf /etc/smb.conf
68 %attr(-,0,0) /etc/smb.conf
69 install -m644 examples/printing/smbprint /usr/bin
70 %attr(-,0,0) /usr/bin/smbprint
71 install -m755 examples/redhat/smb.init /etc/rc.d/init.d/smb
72 %attr(-,0,0) /etc/rc.d/init.d/smb
73 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc3.d/S91smb
74 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc0.d/K35smb
75 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc6.d/K35smb
76 ln -sf /etc/rc.d/init.d/smb /etc/rc.d/rc1.d/K35smb
77 mkdir -p /home/samba
78 mkdir -p /var/lock/samba
79 chown root.nobody /home/samba
80 chmod 775 /home/samba
81 install -m 644 examples/redhat/samba.log /etc/logrotate.d/samba
82 %attr(-,0,0) /etc/logrotate.d/samba
83
84 %post
85 /sbin/pamconfig --add --service=samba --password=none --sesslist=none
86
87 if [ ! -f /var/log/samba ]; then
88         touch /var/log/samba
89         chmod 600 /var/log/samba
90 fi
91
92 %postun
93 if [ "$1" = 0 ] ; then
94   /sbin/pamconfig --remove --service=samba --password=none --sesslist=none
95 fi
96
97 %files
98 %doc docs/*.txt docs/INSTALL.sambatar docs/MIRRORS docs/PROJECTS 
99 %doc docs/README.DCEDFS docs/README.jis docs/README.sambatar 
100 %doc docs/SMBTAR.notes docs/THANKS docs/announce docs/history
101 %doc docs/samba.faq docs/samba.lsm docs/wfw_slip.htm 
102 %doc examples
103 /usr/sbin/smbd
104 /usr/bin/addtosmbpass
105 /usr/bin/mksmbpasswd.sh
106 /usr/bin/smbclient
107 /usr/sbin/nmbd
108 /usr/bin/testparm
109 /usr/bin/testprns
110 /usr/bin/smbrun
111 /usr/bin/smbstatus
112 /usr/bin/nmblookup
113 /usr/bin/smbpasswd
114 /usr/bin/smbtar
115 /usr/bin/smbprint
116 %config /etc/smb.conf
117 %config /etc/smb.conf.sampl
118 %config /etc/rc.d/init.d/smb
119 %config /etc/rc.d/rc3.d/S91smb
120 %config /etc/rc.d/rc0.d/K35smb
121 %config /etc/rc.d/rc1.d/K35smb
122 %config /etc/rc.d/rc6.d/K35smb
123 %config /etc/logrotate.d/samba
124 /usr/man/man1/smbstatus.1
125 /usr/man/man1/smbclient.1
126 /usr/man/man1/smbrun.1
127 /usr/man/man1/smbtar.1
128 /usr/man/man1/testparm.1
129 /usr/man/man1/testprns.1
130 /usr/man/man5/smb.conf.5
131 /usr/man/man7/samba.7
132 /usr/man/man8/smbd.8
133 /usr/man/man8/nmbd.8
134 %dir /home/samba
135 %dir /var/lock/samba